Part of #3680
Review for v4 inclusion — evaluate against time constraints and value. This wraps a single existing Skia C++ factory for debugging/profiling visualization.
Summary
Expose SkOverdrawColorFilter::MakeWithSkColors(SkColor[6]) which maps overdraw counts (0-5+) to a 6-color palette. Used for rendering performance debugging — paints areas by how many times they were drawn over.
What exists today
| Layer |
Status |
| C++ |
✅ SkOverdrawColorFilter::MakeWithSkColors() in include/effects/SkOverdrawColorFilter.h |
| C API |
❌ No sk_colorfilter_new_overdraw |
| C# |
❌ Not exposed |
Proposed changes
- Add
sk_colorfilter_new_overdraw(sk_color_t colors[6]) to C API shim (~3 lines)
- Regenerate bindings
- Add
SKColorFilter.CreateOverdraw(SKColor[]) + ReadOnlySpan<SKColor> overload (~15 lines)
- Validate 6-element array constraint
- Tests (~30 lines)
Estimated effort
~3 hours, ~75 lines total. Follows SKColorFilter.CreateTable pattern.
Use case
Primarily a developer tool for profiling rendering performance. Could also be used in gallery samples to demonstrate overdraw analysis.
Part of #3680
Review for v4 inclusion — evaluate against time constraints and value. This wraps a single existing Skia C++ factory for debugging/profiling visualization.
Summary
Expose
SkOverdrawColorFilter::MakeWithSkColors(SkColor[6])which maps overdraw counts (0-5+) to a 6-color palette. Used for rendering performance debugging — paints areas by how many times they were drawn over.What exists today
SkOverdrawColorFilter::MakeWithSkColors()ininclude/effects/SkOverdrawColorFilter.hsk_colorfilter_new_overdrawProposed changes
sk_colorfilter_new_overdraw(sk_color_t colors[6])to C API shim (~3 lines)SKColorFilter.CreateOverdraw(SKColor[])+ReadOnlySpan<SKColor>overload (~15 lines)Estimated effort
~3 hours, ~75 lines total. Follows
SKColorFilter.CreateTablepattern.Use case
Primarily a developer tool for profiling rendering performance. Could also be used in gallery samples to demonstrate overdraw analysis.