Skip to content

Instantly share code, notes, and snippets.

@mattleibow
Created April 27, 2026 15:42
Show Gist options
  • Select an option

  • Save mattleibow/26277dd3e15214999eae086d261d3fa3 to your computer and use it in GitHub Desktop.

Select an option

Save mattleibow/26277dd3e15214999eae086d261d3fa3 to your computer and use it in GitHub Desktop.
Sample Scout: 437 Skia GMs analyzed with gallery-ready fields, prompts, and coverage status
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Skia GM Sample Scout</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
:root{--bg:#f6f8fa;--border:#d8dee4;--muted:#656d76;}
body{background:var(--bg);color:#1f2328;font-size:14px;}
.shell{max-width:1200px;}
.pill{display:inline-block;font-size:.68rem;font-weight:600;padding:1px 7px;border-radius:10px;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;}
.pill:hover{opacity:.8;}.pill.dim{opacity:.25;}
.i-high{background:#dcfce7;color:#166534;}.i-medium{background:#fef3c7;color:#92400e;}.i-low{background:#f3f4f6;color:#6b7280;}
.a-yes{background:#dcfce7;color:#166534;}.a-no{background:#fee2e2;color:#991b1b;}
.ss-none{background:#dbeafe;color:#1e40af;}.ss-similar{background:#fef3c7;color:#92400e;}.ss-existing{background:#f3f4f6;color:#6b7280;}
.row-item{border-bottom:1px solid #eaeef2;padding:7px 12px;cursor:pointer;}
.row-item:hover{background:#f0f4f8;}
.row-item.expanded{background:#fafbfc;}
.row-name{font-weight:600;font-size:.88rem;}
.row-chevron{color:#bbb;font-size:.7rem;margin-right:6px;transition:transform .15s;}
.row-item.expanded .row-chevron{transform:rotate(90deg);color:#666;}
.row-desc{color:var(--muted);font-size:.78rem;margin-top:2px;}
.row-detail{display:none;padding:8px 0 4px 0;font-size:.82rem;}
.row-item.expanded .row-detail{display:block;}
.detail-grid{display:grid;grid-template-columns:110px 1fr;gap:2px 12px;}
.detail-label{color:var(--muted);font-weight:600;font-size:.72rem;text-transform:uppercase;}
.detail-value{font-size:.82rem;}
.detail-value code{font-size:.78rem;background:#f0f4f8;padding:1px 4px;border-radius:3px;}
.summary-bar{background:#fff;border:1px solid var(--border);border-radius:8px;padding:12px 16px;margin-bottom:12px;}
.summary-num{font-size:1.5rem;font-weight:700;line-height:1;}
.summary-label{font-size:.65rem;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;}
.filter-bar{display:flex;flex-direction:column;gap:4px;padding:10px 12px;background:#fff;border:1px solid var(--border);border-radius:8px;margin-bottom:8px;}
.filter-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
.filter-label{font-size:.7rem;color:var(--muted);font-weight:600;width:80px;flex-shrink:0;text-align:right;padding-right:6px;}
.search-box{font-size:.8rem;padding:3px 10px;border:1px solid var(--border);border-radius:6px;width:300px;}
.ctrl-select{font-size:.78rem;padding:2px 8px;border:1px solid var(--border);border-radius:6px;background:#fff;color:#1f2328;}
.filter-count{font-size:.72rem;color:var(--muted);padding:0 12px 4px;}
.reset-btn{font-size:.7rem;color:#3730a3;cursor:pointer;border:none;background:none;padding:2px 6px;}
.reset-btn:hover{text-decoration:underline;}
.prompt-btn{font-size:.72rem;font-weight:600;padding:3px 10px;border:1px solid #3730a3;border-radius:6px;background:#fff;color:#3730a3;cursor:pointer;white-space:nowrap;}
.prompt-btn:hover{background:#e0e7ff;}
.dir-btn{font-size:.8rem;width:26px;height:26px;border:1px solid var(--border);border-radius:4px;background:#fff;cursor:pointer;color:#1e40af;font-weight:700;padding:0;line-height:26px;text-align:center;}
.dir-btn:hover{background:#f0f4f8;}
.group-header{font-weight:700;font-size:.82rem;padding:8px 12px 4px;color:#1e40af;border-bottom:2px solid #dbeafe;margin-top:12px;background:#f8faff;}
.count-badge{font-size:.6rem;background:#e5e7eb;color:#374151;padding:0 5px;border-radius:8px;margin-left:2px;vertical-align:middle;}
</style>
</head>
<body>
<div class="shell mx-auto px-3 py-3">
<div class="d-flex align-items-center mb-2">
<strong style="font-size:1.15rem">Skia GM Sample Scout</strong>
<span class="text-muted" style="font-size:.8rem;margin-left:8px">437 samples · 2026-04-27</span>
</div>
<div class="summary-bar d-flex gap-4 align-items-center flex-wrap" id="summary-bar"></div>
<div class="filter-bar">
<div class="filter-row">
<span class="filter-label">Search:</span>
<input type="text" class="search-box" id="search" placeholder="Search samples, APIs, descriptions..." oninput="applyFilters()">
</div>
<div class="filter-row"><span class="filter-label">Interest:</span><span id="fr-interest"></span></div>
<div class="filter-row"><span class="filter-label">APIs:</span><span id="fr-avail"></span></div>
<div class="filter-row"><span class="filter-label">Coverage:</span><span id="fr-status"></span></div>
<div class="filter-row">
<span class="filter-label">Group by:</span>
<select class="ctrl-select" id="group-by" onchange="applyFilters()">
<option value="none">None</option>
<option value="interesting">Interest</option>
<option value="sampleStatus" selected>Coverage</option>
<option value="apis_available">API Availability</option>
</select>
<button class="dir-btn" id="group-dir" onclick="this.textContent=this.textContent==='▼'?'▲':'▼';applyFilters()" title="Toggle group order"></button>
<span style="width:16px"></span>
<span class="filter-label" style="width:55px">Sort by:</span>
<select class="ctrl-select" id="sort-by" onchange="applyFilters()">
<option value="interest" selected>Interest</option>
<option value="name">Name</option>
<option value="file">File</option>
<option value="coverage">Coverage</option>
<option value="apis">API Availability</option>
</select>
<button class="dir-btn" id="sort-dir" onclick="this.textContent=this.textContent==='▼'?'▲':'▼';applyFilters()" title="Toggle sort order"></button>
</div>
</div>
<div class="d-flex justify-content-between" style="padding:0 12px 4px">
<span class="filter-count" id="filter-count"></span>
<button class="reset-btn" onclick="fI.clear();fA.clear();fS.clear();document.getElementById('search').value='';applyFilters()">Reset filters</button>
</div>
<div id="list"></div>
</div>
<script>
const DATA = [{"file": "3d.cpp", "name": "3D Perspective Rectangle", "description": "Demonstrates 3D perspective transforms using SkM44 to draw a rotated rectangle in 3D space, with both direct and picture-recorded rendering.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkM44::Perspective", "SkM44::LookAt", "SkM44::Rotate", "SkCanvas::concat", "SkCanvas::drawRect", "SkPictureRecorder", "SkCanvas::drawPicture"], "notes": "Simple but effective 3D demo. Uses SkM44 for camera/perspective/viewport matrices. Also tests drawPicture with 3D transforms.", "visualGoal": "A red rectangle rotated 30 degrees around the Y axis in 3D perspective, with a semi-transparent blue copy rendered through a picture on top.", "suggestedControls": ["Slider for Y-axis rotation angle (range 0-360)", "Slider for camera distance (range 0.5-5.0)", "Slider for field of view angle (range 15-120)"], "category": "Transforms", "skiaSharpApis": ["SKCanvas.Concat", "SKCanvas.DrawRect", "SKCanvas.Translate", "SKCanvas.DrawPicture", "SKMatrix44"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "aaa.cpp", "name": "Analytic Anti-Aliasing", "description": "Tests analytic anti-aliasing for convex shapes, general paths (star), and inverse-filled paths, including edge cases from specific bug reports.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkCanvas::drawCircle", "SkCanvas::drawPath", "SkCanvas::rotate", "SkPathBuilder::cubicTo", "SkPathBuilder::addRect", "SkPath::setFillType"], "notes": "Contains three GMs: analytic_antialias_convex, analytic_antialias_general, and analytic_antialias_inverse. Primarily a quality test for anti-aliasing correctness including bug regression tests (chrome:662914, skbug.com/40038820, skbug.com/40039068).", "visualGoal": "Convex GM: rotated red rectangles, thin rects, and a circle. General GM: a red 8-pointed star in fill and stroke, plus abutting rect pairs. Inverse GM: a red inverse-wound circle (everything outside the circle is filled).", "suggestedControls": ["Slider for rotation angle (range 0-10)", "Toggle anti-aliasing on/off"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.DrawCircle", "SKCanvas.DrawPath", "SKCanvas.RotateDegrees", "SKCanvas.Translate", "SKCanvas.Save", "SKCanvas.Restore", "SKPath.MoveTo", "SKPath.CubicTo", "SKPath.LineTo", "SKPath.AddRect", "SKPath.Close"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "aaclip.cpp", "name": "Anti-Aliased Clipping", "description": "Tests anti-aliased clipping of rectangles at various sub-pixel offsets, plus cubic path clipping against a rect region.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipRect", "SkCanvas::drawRect", "SkCanvas::drawPath", "SkCanvas::translate", "SkPathBuilder::cubicTo"], "notes": "Two GMs: 'aaclip' tests rect clipping at 0.2px increments to stress sub-pixel AA blitting. 'clipcubic' (skbug.com/40034846) tests cubic path clipping. The Mac-only 'cgimage' GM is platform-conditional and won't run on other platforms.", "visualGoal": "The aaclip GM shows blue centers with green 2px borders at 5 sub-pixel offsets — no red should be visible. The clipcubic GM shows vertical and horizontal cubic curves clipped to a rectangular region.", "suggestedControls": ["Slider for sub-pixel offset (range 0.0-1.0)"], "category": "Clipping", "skiaSharpApis": ["SKCanvas.ClipRect", "SKCanvas.DrawRect", "SKCanvas.DrawPath", "SKCanvas.Translate", "SKCanvas.Save", "SKCanvas.Restore", "SKPath.MoveTo", "SKPath.CubicTo"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "aarecteffect.cpp", "name": "AA Rect Effect (GPU)", "description": "Directly exercises a GPU GrFragmentProcessor that clips against rectangles with various edge types. GPU-only test using Ganesh internals.", "interesting": "low", "apis_available": false, "missing_apis": ["GrFragmentProcessor", "GrPaint", "SurfaceDrawContext", "GrPorterDuffXPFactory"], "key_apis": ["GrFragmentProcessor::Rect", "GrPaint", "SurfaceDrawContext::addDrawOp", "GrClipEdgeType"], "notes": "GPU-only GM that requires Ganesh backend. Uses GrFragmentProcessor and GrPaint directly, which are internal GPU APIs not exposed through SkiaSharp. Not portable to CPU rendering.", "visualGoal": "Grid of small black rectangles rendered with different GPU clip edge types (AA/non-AA, inclusive/exclusive), with reference rects drawn via normal API for comparison.", "suggestedControls": [], "category": "Advanced", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "aarectmodes.cpp", "name": "AA Rect Blend Modes", "description": "Tests all 12 Porter-Duff blend modes by compositing a blue oval (dst) with a red rectangle (src) at varying alpha levels over a checkerboard background.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkBlendMode", "SkCanvas::drawOval", "SkCanvas::drawRect", "SkCanvas::saveLayer", "SkPaint::setBlendMode", "SkPaint::setAlpha", "SkShader::MakeFromBitmap"], "notes": "Excellent educational demo showing all Porter-Duff blend modes. Uses a checkerboard shader background and saveLayer for compositing isolation. Shows 4 alpha combinations across columns.", "visualGoal": "Grid of blend mode cells: each cell shows a blue oval composited with a red rectangle using a different blend mode, over a checkerboard background. 12 modes × 4 alpha combinations.", "suggestedControls": ["Dropdown for blend mode selection", "Slider for source alpha (range 0-255)", "Slider for destination alpha (range 0-255)", "Color picker for source color", "Color picker for destination color"], "category": "Blending", "skiaSharpApis": ["SKPaint.BlendMode", "SKCanvas.DrawOval", "SKCanvas.DrawRect", "SKCanvas.SaveLayer", "SKCanvas.Restore", "SKCanvas.Translate", "SKPaint.Color", "SKPaint.IsAntialias", "SKShader.CreateBitmap"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "aaxfermodes.cpp", "name": "AA Transfer Modes", "description": "Comprehensive test of all Skia blend modes with four shape types (square, diamond, oval, concave) using both opaque and semi-transparent source colors.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkBlendMode", "SkCanvas::drawRect", "SkCanvas::drawPath", "SkCanvas::rotate", "SkCanvas::clipRect", "SkCanvas::saveLayer", "SkPaint::setBlendMode"], "notes": "Very thorough blend mode reference showing Porter-Duff and Advanced modes side by side. Each mode is labeled. Uses four different shapes to test AA quality with different geometries. Good candidate for an interactive gallery demo.", "visualGoal": "Two-column layout: 'Porter Duff' and 'Advanced' blend modes. Each row shows a labeled mode with four shapes (square, diamond, oval, concave) in two color variants (semi-transparent and opaque), all over a checkerboard background.", "suggestedControls": ["Dropdown for specific blend mode to highlight", "Toggle between opaque and transparent source", "Slider for background color"], "category": "Blending", "skiaSharpApis": ["SKPaint.BlendMode", "SKCanvas.DrawRect", "SKCanvas.DrawPath", "SKCanvas.RotateDegrees", "SKCanvas.ClipRect", "SKCanvas.SaveLayer", "SKCanvas.Restore", "SKCanvas.Translate", "SKPath.MoveTo", "SKPath.QuadTo"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "addarc.cpp", "name": "Add Arc Collection", "description": "Collection of arc-related GMs: nested colored arcs with animation, arc length measurement, animated stroke/fill circles, many sweep angles, and tiny-angle arc edge cases.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::addArc", "SkPathBuilder::arcTo", "SkPathMeasure", "SkCanvas::drawPath", "SkCanvas::drawOval", "SkCanvas::drawLine", "SkCanvas::rotate"], "notes": "Contains 6 GMs: 'addarc' (animated nested arcs), 'addarc_meas' (arc measurement visualization), 'strokecircle' (animated stroked ovals), 'fillcircle' (animated filled ovals), 'manyarcs' (sweep angle variations), 'tinyanglearcs' (edge case). The animated versions are especially visually appealing.", "visualGoal": "The main addarc GM shows concentric colorful arcs of decreasing size, each rotating at different speeds. The measurement GM shows radial lines from center with red measured positions on an oval. The circle GMs show nested colored ovals rotating.", "suggestedControls": ["Slider for sweep angle (range 0-360)", "Slider for stroke width (range 1-30)", "Slider for number of nested arcs (range 2-20)", "Toggle animation on/off"], "category": "Paths", "skiaSharpApis": ["SKPath.AddArc", "SKPath.ArcTo", "SKCanvas.DrawPath", "SKCanvas.DrawOval", "SKCanvas.DrawLine", "SKCanvas.RotateDegrees", "SKCanvas.Scale", "SKCanvas.Translate", "SKPaint.StrokeWidth", "SKPaint.IsAntialias", "SKPaint.IsStroke"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "all_bitmap_configs.cpp", "name": "All Bitmap Configurations", "description": "Displays the same image rendered in all supported bitmap color types (N32, RGB565, ARGB4444, RGBA_F16, Alpha8, Gray8) with labels, plus variants for premul/unpremul and color spaces.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap", "SkColorType", "SkAlphaType", "SkColorSpace", "SkCanvas::drawImage", "SkFont", "SkCanvas::drawSimpleText"], "notes": "Educational demo showing how the same image looks in different pixel formats. Contains three GMs: 'all_bitmap_configs', 'not_native32_bitmap_config', and 'all_variants_8888'. Requires resource image 'color_wheel.png'. Good for understanding color types.", "visualGoal": "Vertical stack of the same color wheel image rendered in different pixel formats (Native 32, RGB 565, ARGB 4444, RGBA F16, Alpha 8, Gray 8), each labeled with its format name over a checkerboard background.", "suggestedControls": ["Dropdown for color type to display"], "category": "Images", "skiaSharpApis": ["SKBitmap", "SKCanvas.DrawImage", "SKCanvas.DrawText", "SKColorType", "SKImageInfo", "SKImage.FromBitmap"], "sampleStatus": "none"}, {"file": "alpha_image.cpp", "name": "Alpha Image Effects", "description": "Tests drawing alpha-only (A8) images with combinations of color filters, mask filters (blur), and color shaders to demonstrate how effects interact with alpha-only bitmaps.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap (A8)", "SkColorFilters::Matrix", "SkMaskFilter::MakeBlur", "SkShaders::Color", "SkCanvas::drawImage"], "notes": "Shows four quadrants: top-left has color filter + blur, top-right has cyan shader, bottom-left has shader + color filter + blur, bottom-right has shader + color filter without blur. Also includes alpha_image_alpha_tint GM (skbug.com/40041892) testing paint alpha on alpha-only image shaders.", "visualGoal": "2×2 grid of an alpha gradient triangle image (upper-left to lower-right diagonal) rendered with different effect combinations: blurred with color matrix, tinted cyan, cyan with color filter and blur, cyan with color filter only.", "suggestedControls": ["Slider for blur sigma (range 0-20)", "Color picker for tint color", "Toggle color filter on/off", "Toggle mask filter on/off"], "category": "Filters", "skiaSharpApis": ["SKBitmap", "SKCanvas.DrawImage", "SKColorFilter.CreateColorMatrix", "SKMaskFilter.CreateBlur", "SKShader.CreateColor", "SKPaint.ColorFilter", "SKPaint.MaskFilter", "SKPaint.Shader"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "alphagradients.cpp", "name": "Alpha Gradients", "description": "Tests linear gradients transitioning from opaque colors to transparent, comparing premultiplied vs non-premultiplied interpolation across various color pairs.", "interesting": "high", "apis_available": false, "missing_apis": ["Gradient interpolation flags (SkGradient::Interpolation::InPremul)"], "key_apis": ["SkShaders::LinearGradient", "SkGradient::Interpolation", "SkCanvas::drawRect"], "notes": "Uses the newer Skia gradient API with SkGradient struct and Interpolation::InPremul control. Two columns: non-premul and premul interpolation. Shows visible differences in how colors fade to transparent. The SkGradient::Interpolation API is not yet exposed in SkiaSharp.", "visualGoal": "Two columns of horizontal gradient bars. Left column uses non-premul interpolation, right uses premul. Each row shows a different color-to-transparent gradient (white→transparent, white→red-transparent, red→transparent, blue→transparent, etc.).", "suggestedControls": ["Toggle premultiplied interpolation", "Color picker for start color", "Color picker for end color"], "category": "Shaders", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKCanvas.DrawRect"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "analytic_gradients.cpp", "name": "Analytic Gradient Intervals", "description": "Tests the analytic unrolled binary gradient colorizer with 1-8 interpolation intervals, using four modes that mix hardstops and smooth transitions.", "interesting": "medium", "apis_available": false, "missing_apis": ["Gradient interpolation flags (SkGradient struct with new API)"], "key_apis": ["SkShaders::LinearGradient", "SkGradient", "SkCanvas::drawRect"], "notes": "Comprehensive gradient test arranged as an 8×4 grid. Rows represent interval counts (1-8), columns represent transition modes (all smooth, all hardstop, alternating smooth-hard, alternating hard-smooth). Uses the newer SkGradient struct API not yet available in SkiaSharp.", "visualGoal": "8×4 grid of horizontal gradient rectangles. Each row increases the number of color stops. Columns vary between smooth transitions and hard stops, showing bands of dark gray, red, yellow, green, cyan, blue, magenta, black, and light gray.", "suggestedControls": ["Slider for number of intervals (range 1-8)", "Dropdown for transition mode (smooth/hardstop/alternating)"], "category": "Shaders", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKCanvas.DrawRect"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "androidblendmodes.cpp", "name": "Android Blend Modes", "description": "Recreates the Android documentation's blend mode reference images, showing a blue rectangle composited with a red circle using each Android-exposed blend mode.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkBlendMode", "SkCanvas::drawImage", "SkCanvas::saveLayer", "SkCanvas::clipRect", "SkCanvas::drawRect", "SkCanvas::drawCircle"], "notes": "Visually clean reference for 18 blend modes as seen on Android. Each tile shows the result with a labeled mode name. Uses pre-rendered src (blue rect) and dst (red circle) bitmaps composited via saveLayer. Great for an interactive Gallery demo.", "visualGoal": "5×4 grid of 256×256 tiles on a checkerboard background. Each tile shows a red circle (dst) composited with a blue rectangle (src) using a labeled blend mode: Add, Clear, Darken, Dst, DstATop, DstIn, DstOut, DstOver, Lighten, Multiply, Overlay, Screen, Src, SrcATop, SrcIn, SrcOut, SrcOver, Xor.", "suggestedControls": ["Dropdown for blend mode selection", "Color picker for source shape color", "Color picker for destination shape color", "Toggle between circle/rect source shapes"], "category": "Blending", "skiaSharpApis": ["SKPaint.BlendMode", "SKCanvas.DrawImage", "SKCanvas.SaveLayer", "SKCanvas.ClipRect", "SKCanvas.DrawRect", "SKCanvas.DrawCircle", "SKCanvas.Restore", "SKBitmap"], "sampleStatus": "existing", "matchedSample": "Blend Modes"}, {"file": "animated_gif.cpp", "name": "Animated GIF Player", "description": "Demonstrates animated GIF decoding using SkCodec, showing all frames in a row and animating through them with proper frame dependency handling.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCodec", "SkCodec::getFrameInfo", "SkCodec::getPixels", "SkCanvas::drawImage", "SkBitmap"], "notes": "Requires SK_ENABLE_SKOTTIE compile flag. Shows frame-by-frame decoding with dependency resolution (fRequiredFrame). Top row displays all frames, bottom shows animation. Also includes AnimCodecPlayerExifGM for EXIF-aware animated image playback. Requires resource GIF files.", "visualGoal": "Top row shows all decoded GIF frames side by side. Below that, a single frame animates through the sequence. Frame timing respects the GIF's duration metadata.", "suggestedControls": ["Slider for playback speed (range 0.1-3.0)", "Toggle loop on/off", "Slider to scrub through frames"], "category": "Animation", "skiaSharpApis": ["SKCodec", "SKCodec.FrameCount", "SKCodec.GetFrameInfo", "SKCanvas.DrawImage", "SKBitmap", "SKImageInfo"], "sampleStatus": "existing", "matchedSample": "GIF Player"}, {"file": "animated_image_orientation.cpp", "name": "Animated Image Orientation", "description": "Tests SkAnimatedImage with EXIF orientation, cropping, scaling, and round-rect post-processing across multiple frames and render methods.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkAnimatedImage", "SkAndroidCodec"], "key_apis": ["SkAnimatedImage", "SkAndroidCodec", "SkCodec::getOrigin", "SkEncodedOriginToMatrix", "SkPictureRecorder", "SkRRect"], "notes": "Uses Android-specific SkAnimatedImage and SkAndroidCodec APIs which are not available in SkiaSharp. Tests orientation handling, crop rects, scale factors (1.25x, 1x, 0.75x, 0.5x), and a round-rect post-processor. Compares makePictureSnapshot vs getCurrentFrame rendering.", "visualGoal": "Large grid showing animated images at 4 scales, with and without cropping, with and without round-rect post-processing, comparing picture snapshot vs direct frame rendering.", "suggestedControls": [], "category": "Animation", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "animatedimageblurs.cpp", "name": "Animated Image Blurs", "description": "Three animated GMs: bouncing circles with varying blur, tiled image blur with different tile modes, and animated backdrop blur over scrolling text.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkCanvas::saveLayer", "SkCanvas::drawRRect", "SkCanvas::drawImageRect", "SkTileMode", "SkImageFilters::Crop"], "notes": "Contains three visually appealing animated GMs. 'animated-image-blurs': 30 bouncing circles with oscillating blur. 'animated-tiled-image-blur': mandrill image with blur in 4 tile modes (decal/clamp/repeat/mirror). 'animated-backdrop-blur': blur applied as backdrop filter over scrolling text and image. All animate well.", "visualGoal": "Bouncing blur GM: 30 colored rounded-rect circles bouncing around with individually animating blur radii. Tiled blur GM: 2×2 grid of mandrill images with increasing then decreasing blur in different tile modes. Backdrop blur GM: text and image scrolling behind a blurred horizontal band.", "suggestedControls": ["Slider for maximum blur sigma (range 0-20)", "Slider for number of nodes (range 5-50)", "Slider for animation speed (range 0.1-3.0)", "Dropdown for tile mode (Decal/Clamp/Repeat/Mirror)"], "category": "Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKCanvas.SaveLayer", "SKCanvas.DrawRoundRect", "SKCanvas.DrawImage", "SKPaint.ImageFilter", "SKPaint.IsAntialias"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "anisotropic.cpp", "name": "Anisotropic Image Scaling", "description": "Demonstrates anisotropic image scaling by drawing a radial-lines test image at progressively smaller scales both horizontally and vertically, comparing linear, mipmapped, and anisotropic sampling.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImageRect", "SkCanvas::drawLine", "SkCanvas::drawImage", "SkSurface::makeImageSnapshot", "SkCanvas::translate"], "notes": "Tests image quality at different anisotropic scale factors. Three variants (linear, mip, aniso) and a separate AnisoMips GM. Good for demonstrating sampling quality differences but visually repetitive.", "visualGoal": "A grid of the same radial-lines image scaled to different aspect ratios, arranged in rows showing progressive squishing horizontally and vertically.", "suggestedControls": ["Dropdown for sampling mode (Linear, Mipmap, Anisotropic)", "Slider for scale factor (0.1-1.0)"], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.DrawLine", "SKCanvas.Translate", "SKSurface.Snapshot"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "annotated_text.cpp", "name": "Annotated Text with URL Links", "description": "Demonstrates PDF-style URL annotations by drawing clickable text with background rectangles and an annotation rect that links to a URL, including rotated text annotations.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawAnnotation", "SkCanvas::drawRect", "SkCanvas::drawSimpleText", "SkCanvas::clipRect", "SkCanvas::saveLayer", "SkCanvas::rotate"], "notes": "SkiaSharp has SKCanvas.DrawAnnotation. This is useful for PDF output scenarios. The rotated text annotation with saveLayer demonstrates how annotations interact with transforms.", "visualGoal": "White canvas with a clipped region containing clickable text 'Click this link!' drawn normally and rotated 90 degrees, each with a semi-transparent blue background rectangle.", "suggestedControls": ["Text input for URL", "Slider for rotation angle (0-360)"], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawAnnotation", "SKCanvas.DrawRect", "SKCanvas.DrawText", "SKCanvas.ClipRect", "SKCanvas.SaveLayer", "SKCanvas.RotateDegrees"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "arcofzorro.cpp", "name": "Arc of Zorro", "description": "Draws hundreds of colored arcs with slightly varying sweep angles arranged in a 'Z' pattern, stress-testing arc rendering near edge-case sweep values around 135 degrees.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawArc", "SkCanvas::translate", "SkCanvas::save", "SkCanvas::restore"], "notes": "Visually striking pattern of colorful thick stroked arcs in a Z-shape. Great for showing off arc rendering and would make an attractive gallery sample. Tests near-singularity sweep angles.", "visualGoal": "A vibrant Z-shaped arrangement of hundreds of randomly-colored thick stroked arcs, each with a slightly different sweep angle near 135 degrees.", "suggestedControls": ["Slider for base sweep angle (100-180)", "Slider for stroke width (5-50)", "Slider for arc count (50-500)"], "category": "Shapes", "skiaSharpApis": ["SKCanvas.DrawArc", "SKCanvas.Translate", "SKCanvas.Save", "SKCanvas.Restore"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "arcto.cpp", "name": "SVG Arc-To Path Commands", "description": "Demonstrates SVG-style arcTo path commands with various radii, rotation angles, large/small arc flags, and sweep directions, plus tests for zero-length arcs and round caps.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::arcTo", "SkCanvas::drawPath", "SkParsePath::FromSVGString", "SkPaint::setStrokeCap", "SkPaint::setStrokeWidth"], "notes": "Comprehensive demonstration of SVG arc path commands. Contains multiple GMs (arcto, parsedpaths, bug593049, bug583299). The main arcto GM is excellent for showing how arc parameters affect the curve. SkiaSharp has SKPath.ArcTo with all needed overloads.", "visualGoal": "Multiple stroked arc paths showing different combinations of radii, rotation, large/small arc sizes, and CW/CCW directions, with colored arcs (red, green, purple, blue) demonstrating the four arc flag combinations.", "suggestedControls": ["Slider for X radius (10-200)", "Slider for Y radius (10-200)", "Slider for rotation (0-90)", "Toggle for large arc flag", "Toggle for sweep direction"], "category": "Paths", "skiaSharpApis": ["SKPath.ArcTo", "SKCanvas.DrawPath", "SKPath.MoveTo", "SKPaint.StrokeCap", "SKPaint.StrokeWidth"], "sampleStatus": "none"}, {"file": "arithmode.cpp", "name": "Arithmetic Blend Mode", "description": "Demonstrates the arithmetic image filter compositing mode with various k-coefficient combinations, showing how two gradient images are blended using the formula k1*src*dst + k2*src + k3*dst + k4.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Arithmetic", "SkImageFilters::Image", "SkShaders::LinearGradient", "SkBlenders::Arithmetic", "SkCanvas::saveLayer"], "notes": "Excellent compositing demonstration. Shows arithmetic blend with 11 different k-coefficient sets, plus enforcePMColor comparison. The ArithmodeBlenderGM variant uses SkBlenders::Arithmetic and SkRuntimeEffect which are also available in SkiaSharp.", "visualGoal": "A grid showing source and destination gradient images alongside their arithmetic blend results for various k-coefficients, with text labels showing the coefficient values.", "suggestedControls": ["Slider for k1 (-1.0 to 1.0)", "Slider for k2 (-1.0 to 1.0)", "Slider for k3 (-1.0 to 1.0)", "Slider for k4 (-1.0 to 1.0)", "Toggle for enforcePremul"], "category": "Blending", "skiaSharpApis": ["SKImageFilter.CreateArithmetic", "SKShader.CreateLinearGradient", "SKCanvas.SaveLayer", "SKCanvas.DrawImage"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "asyncrescaleandread.cpp", "name": "Async Rescale and Read Pixels", "description": "Tests GPU async readback of pixels with rescaling, including RGBA, YUV, and YUVA readback from images and surfaces using asyncRescaleAndReadPixels.", "interesting": "low", "apis_available": false, "missing_apis": ["asyncRescaleAndReadPixels", "asyncRescaleAndReadPixelsYUV420", "GrDirectContext", "Graphite Context", "SkYUVAInfo", "SkYUVAPixmaps"], "key_apis": ["SkSurface::asyncRescaleAndReadPixels", "GrDirectContext", "SkYUVAInfo", "SkImage::makeTextureImage"], "notes": "Heavily GPU-dependent test for async pixel readback. Requires GrDirectContext/Graphite and async readback APIs not available in SkiaSharp. Not portable to a cross-platform gallery sample.", "visualGoal": "Rows of images showing the result of reading back a mandrill image at various rescaled sizes in RGBA, YUV, and YUVA formats.", "suggestedControls": [], "category": "Advanced", "skiaSharpApis": [], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "attributes.cpp", "name": "GPU Vertex Attributes", "description": "Tests GPU geometry processor vertex attribute configurations (auto, manual, wacky stride/offset layouts) by rendering colored rectangles through custom draw ops.", "interesting": "low", "apis_available": false, "missing_apis": ["GrGeometryProcessor", "GrRecordingContext", "SurfaceDrawContext", "GrDrawOp", "GrProgramInfo"], "key_apis": ["GrGeometryProcessor", "GrDrawOp", "SurfaceDrawContext::addDrawOp"], "notes": "Entirely GPU-backend internal test. Uses custom GrGeometryProcessor and GrDrawOp implementations that have no SkiaSharp equivalent. Not suitable for a gallery sample.", "visualGoal": "Three colored rectangles (red/green/yellow/magenta corners) stacked vertically, each rendered using a different vertex attribute configuration.", "suggestedControls": [], "category": "Advanced", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "b_119394958.cpp", "name": "Bug 119394958 - Circle and Arc Batching", "description": "Regression test for a bug where stroked arcs with round caps were incorrectly batched with filled circles, causing vertex data corruption.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawCircle", "SkCanvas::drawArc", "SkPaint::setStrokeCap", "SkPaint::setStyle"], "notes": "Bug regression test (b_ prefix file). Draws a filled blue circle, a green stroked circle, and a red stroked arc with round caps. Simple test with minimal visual interest for a gallery.", "visualGoal": "A blue filled circle with a green stroked circle inside it and a small red stroked arc with round caps.", "suggestedControls": [], "category": "Shapes", "skiaSharpApis": ["SKCanvas.DrawCircle", "SKCanvas.DrawArc", "SKPaint.StrokeCap", "SKPaint.Style"], "sampleStatus": "none"}, {"file": "backdrop.cpp", "name": "Backdrop Blur with SaveLayer", "description": "Demonstrates backdrop blur effects using saveLayer, showing how a Gaussian blur filter applied as a backdrop affects the content behind a layer, with variations for clip rects, hint rects, and scale factors.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkCanvasPriv::ScaledBackdropLayer"], "key_apis": ["SkImageFilters::Blur", "SkShaders::SweepGradient", "SkCanvas::saveLayer", "SkCanvas::clipRect", "SkCanvas::drawCircle"], "notes": "Uses internal SkCanvasPriv::ScaledBackdropLayer API not available in SkiaSharp. The backdrop blur concept is interesting but the internal API dependency makes direct porting difficult. Standard saveLayer backdrop is available but the scaled variant is not.", "visualGoal": "A 2x4 or 3x4 grid of colorful sweep-gradient circles, each with a blurred rectangular region in the center and a small yellow circle on top, demonstrating backdrop blur with different clip and hint rect settings.", "suggestedControls": ["Slider for blur sigma (1-30)", "Toggle for clip rect", "Toggle for hint rect"], "category": "Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKShader.CreateSweepGradient", "SKCanvas.SaveLayer", "SKCanvas.ClipRect", "SKCanvas.DrawCircle"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "backdrop_imagefilter_croprect.cpp", "name": "Backdrop Image Filter Crop Rect", "description": "Tests backdrop image filters with crop rectangles, demonstrating how color inversion and blur filters interact with save layers in both normal and backdrop modes, including rotated and perspective transforms.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::ColorFilter", "SkImageFilters::Blur", "SkColorFilters::Matrix", "SkCanvas::saveLayer", "SkCanvas::clipRect", "SkCanvas::drawRect", "SkCanvas::rotate"], "notes": "Good demonstration of image filter crop rects with backdrop layers. Multiple GMs show normal, rotated, perspective, and nested variants. The color inversion filter and blur filter are both available in SkiaSharp. Uses kInitWithPrevious_SaveLayerFlag for backdrop mode.", "visualGoal": "Pairs of colored rectangles (cyan/magenta) with inner rectangles (red/green) that are selectively inverted or blurred based on a crop rect, demonstrating how backdrop filters respect crop boundaries.", "suggestedControls": ["Dropdown for filter type (Invert, Blur)", "Slider for rotation (0-360)", "Slider for blur sigma (1-30)"], "category": "Filters", "skiaSharpApis": ["SKImageFilter.CreateColorFilter", "SKImageFilter.CreateBlur", "SKColorFilter.CreateColorMatrix", "SKCanvas.SaveLayer", "SKCanvas.DrawRect", "SKCanvas.RotateDegrees"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "badpaint.cpp", "name": "Bad Paint Edge Cases", "description": "Tests that drawing with invalid paint configurations (empty bitmap shader, non-invertible local matrix) correctly produces no visible output rather than crashing.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkBitmap::makeShader", "SkPaint::setShader"], "notes": "Edge case robustness test. The expected output is a blank canvas with no drawing, making it visually uninteresting for a gallery sample. Only useful for verifying error handling.", "visualGoal": "A blank 100x100 canvas with no visible drawing, confirming that invalid paints are handled gracefully.", "suggestedControls": [], "category": "Advanced", "skiaSharpApis": ["SKCanvas.DrawRect", "SKBitmap.ToShader", "SKPaint.Shader"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "batchedconvexpaths.cpp", "name": "Batched Convex Paths", "description": "Draws 10 nested convex paths built from cubic Bezier curves forming smooth rounded shapes of decreasing size, testing GPU path batching with anti-aliased semi-transparent fills.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::cubicTo", "SkCanvas::drawPath", "SkCanvas::translate", "SkCanvas::scale", "SkPaint::setAlphaf"], "notes": "Creates visually appealing nested rounded shapes using cubic curves. While the GM targets GPU batching optimization, the visual output of layered semi-transparent colorful rounded shapes is attractive. Uses GrContextOptions to disable atlas path renderer (GPU-specific) but the drawing itself is portable.", "visualGoal": "Concentric semi-transparent colorful rounded shapes of decreasing size, layered on a black background, creating a tunnel-like effect.", "suggestedControls": ["Slider for number of shapes (3-20)", "Slider for opacity (0.1-1.0)", "Slider for number of cubic segments (3-30)"], "category": "Paths", "skiaSharpApis": ["SKPath.CubicTo", "SKPath.MoveTo", "SKCanvas.DrawPath", "SKCanvas.Translate", "SKCanvas.Scale", "SKPaint.Color"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "bc1_transparency.cpp", "name": "BC1 Texture Compression Transparency", "description": "Tests BC1 (DXT1) texture compression transparency behavior by comparing RGB and RGBA variants, verifying that transparent blocks render correctly as opaque black vs transparent.", "interesting": "low", "apis_available": false, "missing_apis": ["SkImages::TextureFromCompressedTextureData", "SkImages::RasterFromCompressedTextureData", "GrDirectContext", "SkTextureCompressionType"], "key_apis": ["SkImages::TextureFromCompressedTextureData", "GrDirectContext", "SkCanvas::drawImage"], "notes": "GPU-specific test for BC1 compressed texture format handling. Requires compressed texture APIs not available in SkiaSharp. The visual output is tiny (16x8 pixel blocks) and highly specialized.", "visualGoal": "Two tiny rows of colored pixels (black, grey, white) showing the difference between BC1 RGB8 and RGBA8 transparency handling, with a green background showing through transparent pixels.", "suggestedControls": [], "category": "Advanced", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "beziereffects.cpp", "name": "Bezier Curve GPU Effects", "description": "Directly exercises GPU geometry processor effects for rendering Bezier conic and quadratic curves, using custom draw ops with GrConicEffect and GrQuadEffect.", "interesting": "low", "apis_available": false, "missing_apis": ["GrConicEffect", "GrQuadEffect", "GrGeometryProcessor", "GrRecordingContext", "SurfaceDrawContext", "GrMeshDrawOp"], "key_apis": ["GrConicEffect", "GrQuadEffect", "GrGeometryProcessor", "SurfaceDrawContext::addDrawOp"], "notes": "Entirely GPU-backend internal test. Uses custom GrMeshDrawOp subclasses with GrBezierEffect geometry processors. The control point visualization (red dots, grey lines, bounding boxes) is interesting conceptually but requires GPU internals not available in SkiaSharp.", "visualGoal": "Rows of bezier conic and quadratic curves with red control points, grey control polygons, and grey bounding boxes showing the geometric construction of each curve.", "suggestedControls": [], "category": "Advanced", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Path Builder"}, {"file": "beziers.cpp", "name": "Random Bezier Curves", "description": "Draws random quadratic and cubic Bezier curves with varying stroke widths and colors, demonstrating path rendering with thick anti-aliased strokes.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::quadTo", "SkPathBuilder::cubicTo", "SkCanvas::drawPath", "SkPaint::setStrokeWidth", "SkPaint::setAntiAlias"], "notes": "Simple but visually appealing demonstration of bezier curve rendering. Top half shows random quadratic curves, bottom half shows random cubic curves. All with random colors and varying stroke widths. Perfect for a gallery sample demonstrating path capabilities.", "visualGoal": "Two panels: the top filled with colorful randomly-generated thick quadratic bezier curves, and the bottom with colorful thick cubic bezier curves, creating an abstract art-like composition.", "suggestedControls": ["Slider for number of curves (5-50)", "Slider for max stroke width (1-20)", "Toggle between quad/cubic/both", "Button to regenerate random curves"], "category": "Paths", "skiaSharpApis": ["SKPath.QuadTo", "SKPath.CubicTo", "SKPath.MoveTo", "SKCanvas.DrawPath", "SKPaint.StrokeWidth", "SKPaint.IsAntialias"], "sampleStatus": "similar", "matchedSample": "Path Builder"}, {"file": "bicubic.cpp", "name": "Bicubic Resampling Comparison", "description": "Compares image upscaling quality using nearest, linear, and cubic (Mitchell, CatmullRom) sampling options. Draws a thin white line on a small image then scales it up to reveal resampling differences.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkCanvas::drawRect", "SkSamplingOptions", "SkCubicResampler::Mitchell", "SkCubicResampler::CatmullRom", "SkSurface", "SkImage::makeShader", "SkTileMode"], "notes": "Good educational sample showing how different resampling kernels affect upscaled image quality. SkiaSharp supports SKSamplingOptions with cubic resamplers.", "visualGoal": "Five horizontal bands showing the same thin line upscaled with different sampling: nearest (pixelated), linear (blurred), Mitchell cubic, CatmullRom via shader, and Mitchell via shader.", "suggestedControls": ["Dropdown to select sampling method", "Slider for scale factor", "Toggle between drawImage and shader-based rendering"], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.DrawRect", "SKSamplingOptions", "SKCubicResampler", "SKSurface", "SKImage.ToShader", "SKPaint.Shader", "SKCanvas.Scale", "SKCanvas.Translate"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "bigblurs.cpp", "name": "Big Blurred Rect Closeups", "description": "Tests blur mask filter nine-patching on very large rects (65536px). Renders close-up views of the 4 corners and center for each blur style (Normal, Solid, Outer, Inner) on both filled rects and rect-with-hole paths.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkMaskFilter::MakeBlur", "SkCanvas::drawRect", "SkCanvas::drawPath", "SkCanvas::clipRect", "SkBlurStyle"], "notes": "Demonstrates all four blur styles with close-up inspection. The rect-ori (rect with hole) path shows how blur affects compound shapes. Educational for understanding blur edge behavior.", "visualGoal": "Grid of close-up rectangles showing blur edges at corners and center for Normal, Solid, Outer, and Inner blur styles applied to both solid rects and rects with rectangular holes.", "suggestedControls": ["Slider for blur sigma", "Dropdown for blur style", "Toggle between filled rect and rect-with-hole"], "category": "Filters", "skiaSharpApis": ["SKMaskFilter.CreateBlur", "SKCanvas.DrawRect", "SKCanvas.DrawPath", "SKCanvas.ClipRect", "SKCanvas.Save", "SKCanvas.Restore", "SKCanvas.Translate", "SKPaint.MaskFilter", "SKBlurStyle"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "bigmatrix.cpp", "name": "Extreme Matrix Transforms", "description": "Draws primitives under an extreme transformation matrix (3000x scale, 33° rotation, large translation), then inverts the matrix to place tiny shapes at specific screen coordinates. Includes a tiled bitmap shader at minuscule scale.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkMatrix", "SkCanvas::concat", "SkCanvas::drawCircle", "SkCanvas::drawRect", "SkBitmap::makeShader", "SkTileMode", "SkSamplingOptions"], "notes": "Tests numerical stability of the matrix pipeline under extreme conditions. The bitmap shader portion demonstrates creating a repeating pattern at very small scale.", "visualGoal": "A small canvas with a tiny red circle, a tiny red rect, and a minuscule tiled bitmap pattern, all placed via inverse-mapped coordinates under extreme transforms.", "suggestedControls": ["Slider for rotation angle", "Slider for scale factor", "Toggle anti-aliasing"], "category": "Transforms", "skiaSharpApis": ["SKMatrix", "SKCanvas.Concat", "SKCanvas.DrawCircle", "SKCanvas.DrawRect", "SKBitmap.ToShader", "SKPaint.Shader", "SKSamplingOptions"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "bigrect.cpp", "name": "Big Rectangle Clipping Stress Test", "description": "Draws very large rectangles (up to 5e10 pixels wide) clipped to a small 35x35 viewport. Tests all combinations of fill/stroke, stroke width 0 vs 1, and anti-aliasing on/off with three size magnitudes.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkCanvas::clipRect", "SkPaint::setStyle", "SkPaint::setStrokeWidth", "SkPaint::setAntiAlias"], "notes": "Edge case stress test for the rect drawing pipeline with extreme coordinates. More of a regression test than a visual demo.", "visualGoal": "8x3 grid of small 35x35 closeup views showing horizontal/vertical bars and border rects drawn with different paint configurations and extreme sizes.", "suggestedControls": [], "category": "Shapes", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.ClipRect", "SKCanvas.Save", "SKCanvas.Restore", "SKCanvas.Translate", "SKPaint.Style", "SKPaint.StrokeWidth", "SKPaint.IsAntialias"], "sampleStatus": "none"}, {"file": "bigrrectaaeffect.cpp", "name": "Big RRect AA Effect (GPU)", "description": "GPU-only GM that tests GrRRectEffect fragment processor on large round rects (700px). Uses GrFragmentProcessor, GrPaint, and FillRectOp directly—entirely GPU internal APIs.", "interesting": "low", "apis_available": false, "missing_apis": ["GrFragmentProcessor", "GrRRectEffect", "GrPaint", "SurfaceDrawContext", "FillRectOp", "GrClipEdgeType"], "key_apis": ["GrRRectEffect::Make", "GrFragmentProcessor", "GrPaint", "SurfaceDrawContext::addDrawOp"], "notes": "Entirely GPU-internal test using Ganesh-specific APIs. Cannot be ported to SkiaSharp as it bypasses the public Skia API. Motivated by chromium:477684.", "visualGoal": "Two side-by-side panels showing AA-filled and inverse-AA-filled round rects rendered via GPU fragment processors.", "suggestedControls": [], "category": "Advanced", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "bigtext.cpp", "name": "Big Text Rendering", "description": "Draws extremely large text (1500pt font) to exercise Skia's outline-based glyph rendering path. Overlays a red forward slash and blue backslash centered on the canvas.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawSimpleText", "SkFont", "SkFont::measureText", "SkPaint"], "notes": "Interesting for demonstrating large text rendering and the switch from bitmap to outline glyphs at extreme sizes. The second GM tests a crbug regression with DirectWrite but uses a custom font resource.", "visualGoal": "A giant red forward slash overlaid with a giant blue backslash, centered on a 640x480 canvas, rendered at 1500pt font size.", "suggestedControls": ["Slider for font size", "Text input for custom character", "Color pickers for the two characters"], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawText", "SKFont", "SKFont.MeasureText", "SKPaint.Color", "SKPaint.IsAntialias"], "sampleStatus": "similar", "matchedSample": "Text Lab"}, {"file": "bigtileimagefilter.cpp", "name": "Tile Image Filter", "description": "Demonstrates SkImageFilters::Tile to repeat a small circle texture across a large canvas. Creates red and green circle textures, then tiles the red one across the full 512x512 area using an image filter chain.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Tile", "SkImageFilters::Image", "SkCanvas::saveLayer", "SkSurface", "SkCanvas::drawImageRect"], "notes": "Great demo of the tile image filter for creating repeating patterns from image filter sources. Shows two approaches: one tiling a filter source, another tiling canvas content.", "visualGoal": "A 512x512 canvas tiled with small red circle outlines on a black background, with a green circle inset at the bottom-right.", "suggestedControls": ["Slider for tile size", "Color picker for circle color", "Toggle between different tile source sizes"], "category": "Filters", "skiaSharpApis": ["SKImageFilter.CreateTile", "SKImageFilter.CreateImage", "SKCanvas.SaveLayer", "SKCanvas.Restore", "SKSurface.Create", "SKCanvas.DrawCircle", "SKCanvas.DrawImageRect"], "sampleStatus": "none"}, {"file": "bitmapcopy.cpp", "name": "Bitmap Color Type Copy", "description": "Creates a checkerboard bitmap (red, green, blue, yellow quadrants) and copies it to different color types (RGB_565, ARGB_4444, N32). Displays each copy with its color type label.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap", "SkBitmap::allocN32Pixels", "SkCanvas::drawImage", "SkCanvas::drawSimpleText", "SkFont", "SkColorType"], "notes": "Educational sample showing how pixel data looks after conversion between color types. The color fidelity loss in lower bit-depth formats is visible.", "visualGoal": "Three labeled columns showing the same four-color checkerboard pattern rendered in RGB_565, ARGB_4444, and RGBA_8888 color types.", "suggestedControls": ["Dropdown to select source color type", "Checkbox to show all available color types"], "category": "Images", "skiaSharpApis": ["SKBitmap", "SKBitmap.Copy", "SKCanvas.DrawImage", "SKCanvas.DrawText", "SKFont", "SKColorType", "SKImageInfo"], "sampleStatus": "none"}, {"file": "bitmapfilters.cpp", "name": "Bitmap Sampling Filters", "description": "Creates a tiny 2x2 RGBW bitmap, scales it up 32x, and compares nearest vs linear filtering with and without dithering, across three color types (4444, 565, N32). Also includes an extract-alpha test.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkSamplingOptions", "SkFilterMode", "SkPaint::setDither", "SkPaint::setAlphaf", "SkBitmap::extractAlpha"], "notes": "Good educational sample showing the visual difference between nearest and linear filtering on a tiny image. The extract-alpha portion demonstrates separating alpha from color.", "visualGoal": "Three rows of scaled-up 2x2 bitmaps (one per color type), each showing nearest, linear, and linear+dithered versions at full opacity and 50% alpha.", "suggestedControls": ["Toggle between nearest and linear filtering", "Slider for alpha", "Toggle dithering"], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKSamplingOptions", "SKFilterMode", "SKPaint.IsDither", "SKPaint.Color", "SKBitmap", "SKBitmap.ExtractAlpha"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "bitmapimage.cpp", "name": "Bitmap Image sRGB vs Legacy", "description": "Loads a JPEG image and its codec-decoded equivalent, then draws both to legacy (linear) and sRGB canvases side by side. Compares color space handling between SKImage and codec-decoded bitmap.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage", "SkCodec::MakeFromStream", "SkCodec::getImage", "SkCanvas::drawImage", "SkImageInfo::MakeN32", "SkImageInfo::MakeS32"], "notes": "Demonstrates the visual difference between sRGB-aware and legacy rendering pipelines. Requires the mandrill test image resource.", "visualGoal": "A 2x2 grid comparing image vs codec-bitmap rendering on legacy canvas (top) and sRGB canvas (bottom).", "suggestedControls": ["Toggle between sRGB and legacy canvas", "Image selector"], "category": "Color", "skiaSharpApis": ["SKImage", "SKCodec", "SKCanvas.DrawImage", "SKImageInfo", "SKBitmap", "SKColorSpace"], "sampleStatus": "similar", "matchedSample": "Image Decoder"}, {"file": "bitmappremul.cpp", "name": "Bitmap Premultiplication Verification", "description": "Verifies correct premultiplied alpha handling by creating gradients and stripes with manually set ARGB values. If unpremultiplication works correctly, the output should be entirely white. Also tests out-of-gamut images (RGB > A).", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap", "SkCanvas::drawImage", "SkPackARGB32", "SkBlendMode::kSrc", "SkColorType"], "notes": "Primarily a correctness verification test. The out-of-gamut portion (image_out_of_gamut GM) tests that Skia handles RGB > A gracefully. Not visually exciting but important for correctness.", "visualGoal": "Four white squares in a 2x2 grid (if premul is correct). Any grey gradients or stripes indicate premultiplication errors. Plus two small squares showing out-of-gamut pixel handling.", "suggestedControls": [], "category": "Color", "skiaSharpApis": ["SKBitmap", "SKCanvas.DrawImage", "SKBlendMode", "SKColorType", "SKImageInfo"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "bitmaprect.cpp", "name": "DrawImageRect Variations", "description": "Collection of GMs testing drawImageRect with various source rect configurations: normal sub-rects, out-of-bounds rects, partial source rects on a 3x3 color grid, large 4096px textures with XOR blending, and sub-pixel rounding precision.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImageRect", "SkCanvas::drawImage", "SkSamplingOptions", "SkBlendMode::kXor", "SkShaders::LinearGradient", "SkSurface"], "notes": "Comprehensive test of drawImageRect behavior. The 3x3 bitmap rect test and the rounding test are particularly instructive for understanding sub-pixel precision. Multiple GMs in one file.", "visualGoal": "Multiple sub-GMs: (1) gradient circle image drawn with 4 different source rects, (2) 3x3 color grid with partial source rect, (3) large texture with XOR blending, (4) pixel-precise bitmap rect alignment test.", "suggestedControls": ["Source rect adjuster (x, y, width, height)", "Toggle strict vs fast src rect constraint", "Blend mode selector"], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImageRect", "SKCanvas.DrawImage", "SKSamplingOptions", "SKBlendMode", "SKShader.CreateLinearGradient", "SKSurface.Create", "SKCanvas.Scale", "SKPaint.BlendMode"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "bitmaprecttest.cpp", "name": "Bitmap Rect Scaling Precision", "description": "Regression test for a bitmap shader fast-path bug where the last column of pixels was drawn twice when drawImageRect scaling nearly cancelled with matrix scaling (0.4726x scale + rect upscale).", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkCanvas::drawImageRect", "SkCanvas::scale", "SkPath::Polygon"], "notes": "Simple regression test. The visual shows a small triangle bitmap drawn at original size, scaled via drawImageRect, and mirrored. Not very interesting as a gallery sample.", "visualGoal": "Three copies of a small triangle-in-a-box bitmap: original, scaled down via drawImageRect, and horizontally mirrored.", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.DrawImageRect", "SKCanvas.Scale", "SKCanvas.Save", "SKCanvas.Restore", "SKPath"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "bitmapshader.cpp", "name": "Bitmap Shaders with Masks", "description": "Demonstrates bitmap shaders used with alpha mask images, circles, and colored rects. Shows how shader coordinates align with the CTM, how masks interact with bitmap shaders, and how tile mode repeating works with alpha masks.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage::makeShader", "SkTileMode", "SkCanvas::drawImage", "SkCanvas::drawCircle", "SkCanvas::drawRect", "SkMatrix"], "notes": "Excellent educational sample showing the interplay between bitmap shaders, alpha masks, tiling modes, and the CTM. The hugebitmapshader GM is a stress test for textures exceeding GL_MAX_TEXTURE_SIZE.", "visualGoal": "Grid showing: (1) bitmap shader drawn through alpha mask, (2) bitmap shader in circles, (3) solid color through mask, (4) alpha mask as repeating shader with color—all at 1x and 1.5x scale.", "suggestedControls": ["Scale slider", "Tile mode selector (Clamp, Repeat, Mirror)", "Color picker for tint color", "Toggle between bitmap and mask shader"], "category": "Shaders", "skiaSharpApis": ["SKImage.ToShader", "SKPaint.Shader", "SKCanvas.DrawImage", "SKCanvas.DrawCircle", "SKCanvas.DrawRect", "SKMatrix", "SKTileMode", "SKCanvas.Translate", "SKCanvas.Save", "SKCanvas.Restore"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "bitmaptiled.cpp", "name": "Bitmap Tiled Drawing with Fractional Offsets", "description": "GPU-focused test that exercises tiled bitmap drawing with fractional pixel offsets to catch gap/seam artifacts between tiles. Creates a very large bitmap (7 tiles) and draws 10 strips at varying sub-pixel offsets.", "interesting": "low", "apis_available": true, "missing_apis": ["SkTiledImageUtils"], "key_apis": ["SkCanvas::drawImageRect", "SkBitmap", "SkTiledImageUtils::DrawImageRect", "GrDirectContext"], "notes": "Primarily a GPU tiling regression test. The manual variants use SkTiledImageUtils which is not available in SkiaSharp. The non-manual variants are GPU-only GMs. Low value as a gallery sample.", "visualGoal": "10 white strips drawn on a black background with slight fractional offsets, testing that no gaps appear between tiled sections.", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImageRect", "SKBitmap", "SKSamplingOptions"], "sampleStatus": "none"}, {"file": "bleed.cpp", "name": "SrcRectConstraint / bleed_downscale", "description": "Tests drawImageRect with strict vs fast SrcRectConstraint across different filter qualities, matrices, and mask filters. Creates a ringed checkerboard image and draws sub-regions to verify border bleeding behavior.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawImage", "SKCanvas.DrawBitmap", "SKCanvas.ClipRect", "SKCanvas.Concat", "SKCanvas.Scale", "SKCanvas.RotateDegrees", "SKMaskFilter.CreateBlur", "SKSurface", "SKBitmap", "SKSamplingOptions"], "notes": "Focuses on sub-rect image drawing precision, verifying that borders don't bleed into the drawn area. GPU texture size overrides are not portable but the core concept is.", "visualGoal": "Grid of checkerboard sub-images drawn at different scales, rotations, and filter qualities; strict mode should show no red border bleed", "suggestedControls": ["SrcRectConstraint (Strict/Fast)", "Filter quality (None/Low/High)", "AntiAlias toggle"], "category": "Image Drawing", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.Scale", "SKCanvas.RotateDegrees", "SKCanvas.Concat", "SKCanvas.ClipRect", "SKMaskFilter.CreateBlur", "SKBitmap", "SKSurface", "SKSamplingOptions"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "blurcircles.cpp", "name": "BlurCircles", "description": "Draws a 4x4 grid of circles with varying circle radii (5, 10, 25, 50) and blur radii (1, 5, 10, 20), each with a slight rotation. Demonstrates how MaskFilter blur interacts with different circle sizes.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawCircle", "SKMaskFilter.CreateBlur", "SKCanvas.RotateDegrees", "SKCanvas.Scale", "SKCanvas.Translate"], "notes": "Clean, visually appealing grid that clearly shows blur radius vs shape radius interaction. Great introductory blur sample.", "visualGoal": "4x4 grid of blurred circles increasing in size left-to-right and blur intensity top-to-bottom", "suggestedControls": ["Blur radius slider", "Circle radius slider", "Blur style picker"], "category": "Blur Effects", "skiaSharpApis": ["SKCanvas.DrawCircle", "SKMaskFilter.CreateBlur", "SKCanvas.RotateDegrees", "SKCanvas.Scale", "SKCanvas.Translate"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "blurcircles2.cpp", "name": "BlurCircles2", "description": "Extended blur circles demo comparing perfectly circular drawCircle with an almost-circle path (355-degree arc) at varying radii and blur radii. Also includes an animated sample mode with ping-pong radius animation.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawCircle", "SKCanvas.DrawPath", "SKMaskFilter.CreateBlur", "SKPath.AddArc", "SKCanvas.Translate"], "notes": "The circle-vs-path comparison is educational for understanding how Skia optimizes circle blur vs general path blur. Animation adds interactivity.", "visualGoal": "Rows of blurred circles above corresponding almost-circle paths, separated by lines, showing how blur differs between circle and path rendering", "suggestedControls": ["Blur radius slider", "Circle radius slider", "Animate toggle"], "category": "Blur Effects", "skiaSharpApis": ["SKCanvas.DrawCircle", "SKCanvas.DrawPath", "SKMaskFilter.CreateBlur", "SKPath.AddArc", "SKCanvas.Translate", "SKCanvas.DrawLine"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "blurignorexform.cpp", "name": "BlurIgnoreXform", "description": "Tests MaskFilter blur with the respectCTM flag (ignore transform). Draws circles/rects/rrects at different canvas scales (1x, 0.5x, 2x) comparing normal blur that scales with CTM vs blur that ignores the transform.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKMaskFilter.CreateBlur", "SKCanvas.DrawCircle", "SKCanvas.DrawRect", "SKCanvas.DrawRoundRect", "SKCanvas.Scale"], "notes": "The 'respectCTM' parameter on MaskFilter.MakeBlur controls whether blur radius is affected by canvas transform. This is a practical and educational demo.", "visualGoal": "Two columns (normal vs ignore-transform blur) at three scale levels, showing how blur radius stays constant when ignoring transform", "suggestedControls": ["Shape type (Circle/Rect/RRect)", "Scale factor slider", "RespectCTM toggle"], "category": "Blur Effects", "skiaSharpApis": ["SKMaskFilter.CreateBlur", "SKCanvas.DrawCircle", "SKCanvas.DrawRect", "SKCanvas.DrawRoundRect", "SKCanvas.Scale", "SKCanvas.Translate"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "blurimagevmask.cpp", "name": "BlurImageVsMask", "description": "Side-by-side comparison of MaskFilter blur vs ImageFilter blur at multiple sigma values (3, 8, 16, 24, 32). Shows how the two blur approaches produce different visual results on rectangles.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKMaskFilter.CreateBlur", "SKImageFilter.CreateBlur", "SKCanvas.DrawRect", "SKCanvas.SaveLayer", "SKCanvas.DrawImage"], "notes": "Excellent educational sample showing the practical difference between mask blur and image filter blur. Also includes a blur_image GM drawing a blurred mandrill image.", "visualGoal": "Three columns per row: unblurred rect, mask-blurred rect, image-filter-blurred rect, at increasing sigma values", "suggestedControls": ["Sigma slider", "Blur type toggle (Mask vs ImageFilter)"], "category": "Blur Effects", "skiaSharpApis": ["SKMaskFilter.CreateBlur", "SKImageFilter.CreateBlur", "SKCanvas.DrawRect", "SKCanvas.SaveLayer", "SKCanvas.DrawImage", "SKCanvas.DrawString"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "blurpositioning.cpp", "name": "CheckSmallSigmaOffset", "description": "Verifies that small sigma blur values still center the blurred rectangle correctly within a red outline border. Tests sigma values from 0.0 to 1.2 to check positioning accuracy.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SKImageFilter.CreateBlur", "SKCanvas.DrawRect", "SKPaint"], "notes": "Edge-case test for blur positioning precision at small sigma values. Visually clear but somewhat narrow in scope.", "visualGoal": "Stacked rows of black rectangles inside red outlines, verifying centering is correct even with very small blur sigma", "suggestedControls": ["Sigma slider (0.0 to 2.0)"], "category": "Blur Effects", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKCanvas.DrawRect", "SKCanvas.Translate"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "blurquickreject.cpp", "name": "BlurQuickReject", "description": "Tests blur mask filter quick-reject bounds by drawing four colored blurred rects around a central clip rect. The rects are positioned just outside the clip but their blur extends into it, verifying 3-sigma bound correctness.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SKMaskFilter.CreateBlur", "SKCanvas.ClipRect", "SKCanvas.DrawRect"], "notes": "Technical test for blur clipping behavior. The visual result (colored blur spilling into a central clip) is moderately interesting.", "visualGoal": "Four colored blurred rectangles (red, green, blue, yellow) positioned around a central white-outlined clip area on black background, with blur bleeding into the clip", "suggestedControls": ["Blur radius slider", "Clip rect size slider"], "category": "Blur Effects", "skiaSharpApis": ["SKMaskFilter.CreateBlur", "SKCanvas.ClipRect", "SKCanvas.DrawRect", "SKCanvas.Translate", "SKCanvas.Clear"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "blurrect.cpp", "name": "BlurRect", "description": "Comprehensive blur rectangle test suite: draws rects, donuts (nested rect paths), and skewed donuts with all four blur styles (Normal, Inner, Outer, Solid) at multiple scales, with and without gradient shaders and clipping. Also includes blur_matrix_rect and blurrect_gallery GMs.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKMaskFilter.CreateBlur", "SKCanvas.DrawRect", "SKCanvas.DrawPath", "SKCanvas.ClipRect", "SKShader.CreateTwoPointConicalGradient", "SKCanvas.Scale", "SKCanvas.RotateDegrees"], "notes": "Very comprehensive blur demo showing all blur styles with shapes, shaders, clipping, and transforms. The gallery and matrix variants add even more coverage. Excellent reference sample.", "visualGoal": "Large grid showing all blur styles applied to filled rects, donut paths, and skewed donuts, with and without gradient shaders and clipping, at different scales", "suggestedControls": ["Blur style picker (Normal/Inner/Outer/Solid)", "Shape type (Rect/Donut/Skewed)", "Scale slider", "Shader toggle", "Clip toggle"], "category": "Blur Effects", "skiaSharpApis": ["SKMaskFilter.CreateBlur", "SKCanvas.DrawRect", "SKCanvas.DrawPath", "SKCanvas.ClipRect", "SKShader.CreateTwoPointConicalGradient", "SKCanvas.Scale", "SKCanvas.RotateDegrees", "SKCanvas.Concat", "SKPath"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "blurredclippedcircle.cpp", "name": "BlurredClippedCircle", "description": "Draws a large blurred oval with its center clipped out using RRect difference clipping, plus a color filter. Reproduces precision artifacts from crbug.com/560651 at 2x scale.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.ClipRoundRect", "SKCanvas.DrawRoundRect", "SKMaskFilter.CreateBlur", "SKColorFilter.CreateBlendMode", "SKCanvas.Scale", "SKCanvas.ClipRect"], "notes": "Visually striking ring effect created by difference clipping a blurred oval. Demonstrates advanced compositing with mask filters, color filters, and clip operations.", "visualGoal": "A red blurred ring (oval with center clipped out) on a white background at 2x scale, showing the ring glow effect", "suggestedControls": ["Blur sigma slider", "Scale factor slider", "Color picker"], "category": "Compositing", "skiaSharpApis": ["SKCanvas.ClipRoundRect", "SKCanvas.DrawRoundRect", "SKMaskFilter.CreateBlur", "SKColorFilter.CreateBlendMode", "SKCanvas.Scale", "SKCanvas.ClipRect", "SKCanvas.Save", "SKCanvas.Restore"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "blurroundrect.cpp", "name": "SimpleBlurRoundRect / BlurLargeRRects", "description": "Draws a grid of blurred round rects with varying blur radii (1, 5, 10, 20) and corner radii (1, 5, 10, 20), alternating between plain color and gradient shader fills. Also includes a large RRect blur test from crbug.com/1138810.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawRoundRect", "SKMaskFilter.CreateBlur", "SKShader.CreateTwoPointConicalGradient", "SKRoundRect", "SKCanvas.Scale", "SKCanvas.RotateDegrees"], "notes": "Excellent sample combining blurred rounded rectangles with gradient shaders. The grid format clearly shows how blur and corner radii interact. The large RRect test adds rotated colored variants.", "visualGoal": "4x8 grid of blurred rounded rectangles (alternating plain black and gradient-filled) with increasing blur and corner radii", "suggestedControls": ["Blur radius slider", "Corner radius slider", "Shader toggle (plain/gradient)"], "category": "Blur Effects", "skiaSharpApis": ["SKCanvas.DrawRoundRect", "SKMaskFilter.CreateBlur", "SKShader.CreateTwoPointConicalGradient", "SKRoundRect", "SKCanvas.Scale", "SKCanvas.Translate", "SKCanvas.RotateDegrees"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "blurs.cpp", "name": "Blurs", "description": "Canonical blur demo showing all four blur styles (None, Inner, Normal, Solid, Outer) applied to circles arranged in a cross pattern, plus blurred text with white text shadow. Includes blur2rects, BlurDrawImage, BlurBigSigma, BlurSmallSigma, and TiledBlurBigSigma variants.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKMaskFilter.CreateBlur", "SKCanvas.DrawCircle", "SKCanvas.DrawString", "SKCanvas.DrawPath", "SKCanvas.DrawImage", "SKImageFilter.CreateBlur", "SKColorFilter.CreateBlendMode", "SKCanvas.SaveLayer"], "notes": "The quintessential blur showcase. Five blur styles on circles plus blurred text make this ideal as a primary blur sample. The additional GMs cover nested rects, image blur, big/small sigma edge cases, and tiled rendering.", "visualGoal": "Five circles in cross pattern (center unblurred, four surrounding with different blur styles), plus blurred text below with white shadow offset", "suggestedControls": ["Blur style picker", "Blur radius slider", "Shape choice (circle/text/rect)"], "category": "Blur Effects", "skiaSharpApis": ["SKMaskFilter.CreateBlur", "SKCanvas.DrawCircle", "SKCanvas.DrawString", "SKCanvas.DrawPath", "SKCanvas.DrawImage", "SKImageFilter.CreateBlur", "SKColorFilter.CreateBlendMode", "SKCanvas.SaveLayer", "SKCanvas.ClipRect"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "blurtextsmallradii.cpp", "name": "BlurSmallRadii", "description": "Tests text rendering with small blur sigma values (0.25 to 2.5), drawing red blurred text overlaid with green un-blurred text to show the difference at each sigma level.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SKMaskFilter.CreateBlur", "SKCanvas.DrawString", "SKFont"], "notes": "Compact demo from Chrome bug 745290. Shows how small blur radii affect text legibility. The red/green overlay makes blur effect clearly visible.", "visualGoal": "Stacked rows of 'guest' text: red blurred underneath green sharp text, with increasing blur sigma from top to bottom", "suggestedControls": ["Sigma slider (0.0 to 3.0)"], "category": "Text Effects", "skiaSharpApis": ["SKMaskFilter.CreateBlur", "SKCanvas.DrawString", "SKFont", "SKCanvas.Translate"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "bmpfilterqualityrepeat.cpp", "name": "BmpFilterQualityRepeat", "description": "Draws a 4-color checkerboard bitmap as a repeating shader at different filter quality levels (None, Low, Medium, High) to test whether filtering respects tile seams in repeat mode.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKBitmap", "SKShader.CreateBitmap", "SKCanvas.DrawRect", "SKSamplingOptions", "SKCanvas.Scale"], "notes": "Great demo of bitmap tiling with different sampling options. Shows how filter quality affects tile seam visibility in repeat mode. The stretched matrix makes seams clearly visible.", "visualGoal": "Four columns showing the same repeating checkerboard pattern with different filter qualities, at two different scales", "suggestedControls": ["Filter quality picker", "Scale slider", "Tile mode picker"], "category": "Shaders & Tiling", "skiaSharpApis": ["SKBitmap", "SKShader.CreateBitmap", "SKCanvas.DrawRect", "SKSamplingOptions", "SKCanvas.Scale", "SKCanvas.Translate", "SKCanvas.DrawString"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "bug12866.cpp", "name": "Bug12866 / Bug40810065 / Bug41422450", "description": "Bug regression tests for stroking precision issues: path stroking with large resScale producing incorrect fill paths (quads, cubics, and conics). Tests stroke-to-fill conversion at extreme scales and with perspective matrices.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawPath", "SKPath", "SKPaint", "SKCanvas.Concat"], "notes": "Bug regression tests for internal stroker precision. Useful for verifying SkiaSharp handles these edge cases but not visually compelling as a sample.", "visualGoal": "Stroked and filled path comparisons showing stroking correctness at extreme scales", "suggestedControls": [], "category": "Path Stroking", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath", "SKPaint", "SKCanvas.Concat", "SKCanvas.Scale", "SKCanvas.Translate"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "bug5252.cpp", "name": "Bug5252", "description": "Bug regression test: draws a grid of small stroked rectangles and cubic paths clipped to an oval path, testing clipping correctness with specific oval dimensions that triggered a bug.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.ClipPath", "SKCanvas.DrawRect", "SKCanvas.DrawPath", "SKPath"], "notes": "Bug regression test for oval clip path issue. The grid-inside-oval visual is mildly interesting but the sample exists purely for regression testing.", "visualGoal": "Grid of small stroked rectangles and curved paths clipped inside an oval shape", "suggestedControls": [], "category": "Clipping", "skiaSharpApis": ["SKCanvas.ClipPath", "SKCanvas.DrawRect", "SKCanvas.DrawPath", "SKPath", "SKCanvas.Translate"], "sampleStatus": "similar", "matchedSample": "Path Builder"}, {"file": "bug530095.cpp", "name": "bug530095 / bug591993", "description": "Tests dash path effects on circular paths at different scales and phases, plus a dashed line with round cap. Regression tests for Skia bugs 530095 and 591993.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPath::Circle", "SkDashPathEffect::Make", "SkCanvas::drawPath", "SkCanvas::drawLine", "SkCanvas::scale", "SkCanvas::translate", "SkPaint::setStrokeWidth", "SkPaint::setStrokeCap"], "notes": "Bug regression test. Draws dashed circles at two scales (normal and 100x) with different dash phase values to verify correct rendering.", "visualGoal": "Grid of dashed circles and lines at different scales showing consistent dash rendering", "suggestedControls": ["dash interval", "dash phase", "stroke width", "scale factor"], "category": "path-effects", "skiaSharpApis": ["SKPath.CreateCircle", "SKPathEffect.CreateDash", "SKCanvas.DrawPath", "SKCanvas.DrawLine", "SKCanvas.Scale", "SKCanvas.Translate", "SKPaint.StrokeWidth", "SKPaint.StrokeCap"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "bug615686.cpp", "name": "bug615686", "description": "Tests stroking a self-intersecting cubic bezier path (a loop formed by cubicTo with swapped control points). Regression test for Skia bug 615686.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::cubicTo", "SkCanvas::drawPath", "SkPaint::setStrokeWidth"], "notes": "Bug regression test. Very simple — draws a single stroked cubic curve that forms a self-intersecting loop.", "visualGoal": "A thick stroked cubic bezier curve forming a self-intersecting loop", "suggestedControls": ["stroke width"], "category": "paths", "skiaSharpApis": ["SKPath.CubicTo", "SKCanvas.DrawPath", "SKPaint.StrokeWidth"], "sampleStatus": "none"}, {"file": "bug6643.cpp", "name": "bug6643", "description": "Tests a sweep gradient rendered into a picture, then used as a picture shader to paint the canvas. Regression test for bug where sweep gradient with transparency in a picture shader could fail.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::SweepGradient", "SkPictureRecorder", "SkPicture::makeShader", "SkCanvas::drawPaint", "SkCanvas::drawColor"], "notes": "Bug regression test. Demonstrates picture-shader compositing — a sweep gradient is recorded into a picture, then the picture is tiled as a shader.", "visualGoal": "A sweep gradient with transparency rendered through a tiled picture shader", "suggestedControls": [], "category": "shaders", "skiaSharpApis": ["SKShader.CreateSweepGradient", "SKPictureRecorder", "SKPicture.ToShader", "SKCanvas.DrawPaint", "SKCanvas.DrawColor"], "sampleStatus": "similar", "matchedSample": "Gradient"}, {"file": "bug6783.cpp", "name": "bug6783", "description": "Tests image shader repeat/mirror tiling with a skewed matrix transform. Regression test verifying correct tile edge rendering — previously produced jagged artifacts at tile boundaries.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkSurface", "SkImage::makeShader", "SkTileMode::kRepeat", "SkCanvas::drawPaint", "SkMatrix::Translate", "SkMatrix::Scale", "SkMatrix::preSkew"], "notes": "Bug regression test. Creates a half-yellow/half-blue 100x100 image, then draws it as a repeated shader with skew transform to test tile boundary quality.", "visualGoal": "Tiled blue/yellow stripes rendered with a skewed transform showing clean tile boundaries", "suggestedControls": ["skew amount", "tile mode"], "category": "shaders", "skiaSharpApis": ["SKSurface.Create", "SKImage.ToShader", "SKTileMode.Repeat", "SKCanvas.DrawPaint", "SKMatrix.CreateTranslation", "SKMatrix.CreateScale"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "bug9331.cpp", "name": "bug9331", "description": "Tests dashed stroked rectangles drawn within clip rects, verifying consistent rendering between debug and release builds. Regression test for Skia bug 9331.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkDashPathEffect::Make", "SkCanvas::clipRect", "SkCanvas::drawRect", "SkPaint::setStrokeWidth", "SkPaint::setPathEffect"], "notes": "Bug regression test. Draws a dashed stroked rectangle clipped to two different regions (one at origin, one offset) to verify consistent dash rendering.", "visualGoal": "Two dashed stroked rectangles at different vertical positions with a red clip visualization", "suggestedControls": ["dash intervals", "dash phase", "stroke width"], "category": "path-effects", "skiaSharpApis": ["SKPathEffect.CreateDash", "SKCanvas.ClipRect", "SKCanvas.DrawRect", "SKPaint.StrokeWidth", "SKPaint.PathEffect"], "sampleStatus": "similar", "matchedSample": "Path Effects Lab"}, {"file": "circle_sizes.cpp", "name": "circle_sizes", "description": "Draws a 4x4 grid of filled circles with radii increasing from 1 to 16 pixels. Tests correct rendering of small circles at various sizes.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawCircle", "SkPaint::setAntiAlias"], "notes": "Simple rendering quality test for Chrome bug 772953. Minimal code, but demonstrates how circle rendering quality varies with radius.", "visualGoal": "4x4 grid of black filled circles progressively increasing in size from 1px to 16px radius", "suggestedControls": ["anti-alias toggle"], "category": "basic-shapes", "skiaSharpApis": ["SKCanvas.DrawCircle", "SKPaint.IsAntialias"], "sampleStatus": "none"}, {"file": "circulararcs.cpp", "name": "circular_arcs (10 GMs: fill, hairline, stroke_butt/square/round, weird, onebadarc, crbug_888453, stroke_matrix, crbug_1472747, bug406747427)", "description": "Comprehensive arc drawing showcase with grids of arcs at various start/sweep angles, stroke styles (fill, hairline, stroke with different caps), dash effects, matrix transforms, and edge cases. The most thorough arc rendering test in Skia.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawArc", "SkPaint::setStrokeCap", "SkPaint::setStrokeWidth", "SkPaint::setStyle", "SkDashPathEffect::Make", "SkPathBuilder::arcTo", "SkCanvas::concat", "SkMatrix"], "notes": "Exceptionally rich demo with 10 separate GMs. Shows arcs with complement overlays (red+blue=magenta), varying caps, AA modes, useCenter toggle, matrix transformations, and numerous edge cases. Excellent sample-scout candidate for a comprehensive arc gallery page.", "visualGoal": "Grids of red and blue arc pairs showing all combinations of start angles, sweep angles, fill modes, stroke caps, and anti-aliasing", "suggestedControls": ["start angle", "sweep angle", "stroke width", "stroke cap", "use center", "anti-alias", "fill/stroke mode"], "category": "arcs", "skiaSharpApis": ["SKCanvas.DrawArc", "SKPaint.StrokeCap", "SKPaint.StrokeWidth", "SKPaint.Style", "SKPathEffect.CreateDash", "SKPath.ArcTo", "SKCanvas.Concat", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "circularclips.cpp", "name": "circular-clips", "description": "Tests circular clip path combinations with Intersect and Difference clip ops, including inverse fill type toggling. Draws overlapping circle clips with a giant background clip.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipPath", "SkPath::Circle", "SkClipOp::kDifference", "SkClipOp::kIntersect", "SkPath::toggleInverseFillType", "SkCanvas::drawRect", "SkCanvas::scale"], "notes": "Demonstrates clip path operations with circular paths — shows difference/intersect combos with normal and inverse fill types. Good for teaching clip ops visually.", "visualGoal": "Grid of overlapping circular clip regions showing intersect and difference operations with normal and inverted fills", "suggestedControls": ["clip operation", "inverse fill toggle", "circle positions"], "category": "clipping", "skiaSharpApis": ["SKCanvas.ClipPath", "SKPath.CreateCircle", "SKClipOperation.Difference", "SKClipOperation.Intersect", "SKPath.FillType", "SKCanvas.DrawRect", "SKCanvas.Scale"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "clear_swizzle.cpp", "name": "clear_swizzle", "description": "GPU-only test that clears offscreen surfaces with swizzled color channels (BGRA) and blits them to the canvas. Tests GPU color channel reordering on clear operations.", "interesting": "low", "apis_available": false, "missing_apis": ["DEF_SIMPLE_GPU_GM", "GrRecordingContextPriv", "SurfaceFillContext", "skgpu::Swizzle", "blitTexture"], "key_apis": ["GrRecordingContextPriv", "SurfaceFillContext", "skgpu::Swizzle", "blitTexture"], "notes": "Entirely GPU-internal (Ganesh). Uses private APIs like SurfaceFillContext, skgpu::Swizzle, and blitTexture that have no SkiaSharp equivalent. Cannot be ported.", "visualGoal": "Grid of colored rectangles (red, green, blue, magenta) demonstrating correct swizzle behavior on GPU clears", "suggestedControls": [], "category": "gpu-internals", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "clip_error.cpp", "name": "cliperror", "description": "Tests that text glyphs too large for the GPU glyph atlas are correctly translated and clipped when drawn with a large blur mask filter.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipRect", "SkCanvas::drawTextBlob", "SkCanvas::drawRect", "SkTextBlob::MakeFromText", "SkMaskFilter::MakeBlur", "SkFont"], "notes": "Uses SkBlurMask::ConvertRadiusToSigma which is internal, but the sigma value can be computed directly. ToolUtils::DefaultPortableTypeface is test-only but can be replaced with any typeface. Core drawing APIs are all available.", "visualGoal": "Large blurred text 'hambur' drawn in two clip regions showing correct glyph clipping behavior", "suggestedControls": ["font size", "blur sigma", "clip rect position"], "category": "text", "skiaSharpApis": ["SKCanvas.ClipRect", "SKCanvas.DrawText", "SKTextBlob.Create", "SKMaskFilter.CreateBlur", "SKFont", "SKPaint"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "clip_sierpinski_region.cpp", "name": "clip_sierpinski_region", "description": "Creates a Sierpinski carpet fractal pattern using iterative region union operations, then uses it as a clip region to fill with red paint. Demonstrates programmatic fractal generation with region ops.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkRegion", "SkRegion::op", "SkCanvas::clipRegion", "SkCanvas::saveLayer", "SkCanvas::drawPaint", "SkCanvas::rotate"], "notes": "Visually striking fractal pattern. Builds a Sierpinski carpet by iteratively adding center-third rectangles at increasing subdivision levels using region union operations. Tests that clip region ignores CTM (canvas is rotated but clip should not be affected).", "visualGoal": "Red Sierpinski carpet fractal pattern created through region clipping — a square grid with recursive center holes", "suggestedControls": ["number of subdivision steps", "fill color", "rotation angle"], "category": "regions", "skiaSharpApis": ["SKRegion", "SKRegion.Op", "SKCanvas.ClipRegion", "SKCanvas.SaveLayer", "SKCanvas.DrawPaint", "SKCanvas.RotateDegrees"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "clip_strokerect.cpp", "name": "clip_strokerect", "description": "Tests interaction between clip rects and thick stroked rectangles. Verifies correct rendering when a stroked rect extends beyond the clip boundary, with a subtle edge case when clip height is 19 vs 20.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipRect", "SkCanvas::drawRect", "SkPaint::setStrokeWidth", "SkPaint::setStyle"], "notes": "Edge case test — the comment notes that setting clip height to 19 causes rendering failure. Demonstrates clip/stroke boundary interaction. Two test cases with different clip heights.", "visualGoal": "Two thick red stroked rectangles clipped at different boundaries, with thin blue rectangles showing the clip regions", "suggestedControls": ["stroke width", "clip rect height"], "category": "clipping", "skiaSharpApis": ["SKCanvas.ClipRect", "SKCanvas.DrawRect", "SKPaint.StrokeWidth", "SKPaint.Style"], "sampleStatus": "none"}, {"file": "clipdrawdraw.cpp", "name": "clipdrawdraw / clip_region", "description": "Two GMs: (1) clipdrawdraw tests a clip-draw-draw pattern where a black rect drawn through a clip followed by a white rect over it can leave 1px remnants; (2) clip_region tests region clipping with save layers.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipRect", "SkCanvas::clipRegion", "SkCanvas::drawRect", "SkCanvas::drawColor", "SkCanvas::saveLayer", "SkRegion"], "notes": "The clipdrawdraw GM is a regression test for crbug.com/423834. The clip_region GM is a clean demo of region clipping combined with saveLayer. Good teaching example for region-based clipping.", "visualGoal": "First GM: gray background with black/white rect overlaps showing no pixel remnants. Second GM: red region with blue layer inside.", "suggestedControls": [], "category": "clipping", "skiaSharpApis": ["SKCanvas.ClipRect", "SKCanvas.ClipRegion", "SKCanvas.DrawRect", "SKCanvas.DrawColor", "SKCanvas.SaveLayer", "SKRegion"], "sampleStatus": "none"}, {"file": "clippedbitmapshaders.cpp", "name": "clipped-bitmap-shaders (tile/mirror/clamp × normal/hq)", "description": "Draws a 3x3 grid (center excluded) of rectangles filled with a tiny 2x2 bitmap shader positioned at the center. Tests Repeat, Mirror, and Clamp tile modes when the pattern origin is outside the clip, with both nearest and high-quality sampling.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap::makeShader", "SkTileMode", "SkCanvas::clipRect", "SkCanvas::drawRect", "SkMatrix", "SkSamplingOptions"], "notes": "Six GM variants (3 tile modes × 2 quality levels). Good demonstration of bitmap shader tiling behavior when the shader origin is deliberately placed outside visible clip regions. Useful for teaching tile modes.", "visualGoal": "3x3 grid with center gap showing a 2x2 colored pixel pattern (red/green/black/blue) tiled in repeat, mirror, or clamp modes", "suggestedControls": ["tile mode", "sampling quality", "shader scale"], "category": "shaders", "skiaSharpApis": ["SKBitmap.ToShader", "SKShaderTileMode", "SKCanvas.ClipRect", "SKCanvas.DrawRect", "SKMatrix", "SKSamplingOptions"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "clipshader.cpp", "name": "clipshadermatrix", "description": "Tests SkCanvas::clipShader with matrix transforms — uses an oval-shaped alpha mask as a clip shader, then applies perspective/skew/rotation transforms before drawing a radial gradient.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkCanvas::clipShader"], "key_apis": ["SkCanvas::clipShader", "SkSurface", "SkImage::makeShader", "SkShaders::RadialGradient", "SkCanvas::concat", "SkMatrix"], "notes": "Uses SkCanvas::clipShader which is NOT available in SkiaSharp. This API clips rendering using a shader's alpha channel as a mask. The rest of the APIs (surface, image shader, radial gradient, matrix concat) are all available, but without clipShader the core technique cannot be reproduced.", "visualGoal": "2x2 grid of oval-clipped regions showing colorful radial gradients rendered with perspective and skew transforms", "suggestedControls": [], "category": "clipping", "skiaSharpApis": ["SKSurface.Create", "SKImage.ToShader", "SKShader.CreateRadialGradient", "SKCanvas.Concat", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "clockwise.cpp", "name": "ClockwiseGM", "description": "GPU-only test that verifies SkSL sk_Clockwise correctly identifies triangle winding direction across different render target origins. Draws clockwise triangles green and counter-clockwise red using custom GrGeometryProcessor and GrDrawOp.", "interesting": "low", "apis_available": false, "missing_apis": ["GrDirectContext", "GrGeometryProcessor", "GrDrawOp", "SurfaceDrawContext"], "key_apis": ["GrRecordingContext", "GrGeometryProcessor", "GrDrawOp", "GrPipeline", "GrProgramInfo"], "notes": "Entirely GPU-internal test using custom geometry processors and draw ops. Cannot be ported to SkiaSharp as it requires Ganesh GPU backend internals.", "visualGoal": "Three columns of green/red rectangle pairs showing clockwise winding detection across different render target origins", "suggestedControls": [], "category": "gpu-internals", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Shader Playground"}, {"file": "closedcappedhairlines.cpp", "name": "HairlinesCapped", "description": "Tests hairline stroke rendering with different cap styles (butt, round, square) on both open and closed contours. Draws line, quad, and cubic segments at pixel-aligned and half-pixel-offset positions, then scales up 4x to visualize sub-pixel behavior.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawPath", "SKCanvas.DrawLine", "SKCanvas.DrawImage", "SKPaint.StrokeCap", "SKPaint.StrokeWidth", "SKPath", "SKSurface"], "notes": "Good edge-case test for hairline rendering precision. The magnified view makes sub-pixel rendering artifacts visible. Demonstrates offscreen rendering and magnification pattern.", "visualGoal": "Grid of hairline path contours (line, quad, cubic) at normal and 4x magnified scale, with red highlight boxes marking cap locations on open contours", "suggestedControls": ["Cap style (butt/round/square)", "Anti-aliasing toggle"], "category": "path-rendering", "skiaSharpApis": ["SKCanvas.DrawPath", "SKCanvas.DrawLine", "SKCanvas.DrawImage", "SKCanvas.Scale", "SKPaint.StrokeCap", "SKPaint.StrokeWidth", "SKPaint.IsAntialias", "SKPath", "SKSurface"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "collapsepaths.cpp", "name": "CollapsePaths", "description": "Tests rendering of paths with nearly-collapsing edges — very thin paths where edges nearly overlap. Includes 10 test cases with various path configurations using EvenOdd fill type, testing the path rasterizer's ability to handle degenerate geometry.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawPath", "SKPath", "SKPathFillType.EvenOdd"], "notes": "Edge-case regression test for path rendering. Not visually interesting for a gallery — draws tiny, nearly-invisible thin shapes. Useful for testing but not for demo purposes.", "visualGoal": "Collection of very thin filled paths that stress-test the rasterizer with nearly-collapsing edges", "suggestedControls": [], "category": "path-rendering", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath", "SKPaint.IsAntialias"], "sampleStatus": "none"}, {"file": "color4f.cpp", "name": "Color4f", "description": "Demonstrates Color4f (wide color) support with three sub-GMs: drawing with opaque/alpha shaders through various color filters on null vs sRGB surfaces; color shaders in different color spaces (sRGB, color-spin); and blend-mode color filters across color spaces.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawRect", "SKShader.CreateColor", "SKColorFilter.CreateColorMatrix", "SKColorFilter.CreateBlendMode", "SKColorSpace.CreateSrgb", "SKSurface"], "notes": "Excellent demonstration of color space management in SkiaSharp. Shows how color filters, shaders, and color spaces interact. Three logical sub-GMs that could be individual samples.", "visualGoal": "Grid of colored rectangles showing color filter and color space interactions: saturation matrices, blend mode filters, and color-spin color spaces producing visually different results", "suggestedControls": ["Color space selection (null/sRGB/spin)", "Color filter type", "Alpha value"], "category": "color-management", "skiaSharpApis": ["SKCanvas.DrawRect", "SKPaint.Shader", "SKPaint.ColorFilter", "SKShader.CreateColor", "SKColorFilter.CreateColorMatrix", "SKColorFilter.CreateBlendMode", "SKColorFilter.CreateCompose", "SKColorSpace.CreateSrgb", "SKSurface.Create"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "coloremoji.cpp", "name": "ColorEmoji", "description": "Comprehensive color emoji rendering test: draws emoji at multiple sizes (10/30/50/256pt), with fake bold, with various combinations of linear gradient shader, blur image filter, grayscale filter, lighting color filter, and alpha. Also tests emoji rendering under different clip rectangles.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawText", "SKFont", "SKPaint.Shader", "SKPaint.ImageFilter", "SKPaint.ColorFilter", "SKImageFilter.CreateBlur", "SKImageFilter.CreateColorFilter", "SKColorFilter.CreateLighting", "SKCanvas.ClipRect"], "notes": "Excellent showcase of text rendering with effects. Color emoji rendering is supported in SkiaSharp via SKTypeface/SKFont. The combination matrix of effects (shader × blur × grayscale × color mode × alpha) is particularly instructive.", "visualGoal": "Emoji characters rendered at various sizes and with combinations of blur, grayscale, color lighting, gradient shader, and alpha effects, plus clipped emoji rendering", "suggestedControls": ["Font size", "Blur toggle", "Grayscale toggle", "Color filter toggle", "Alpha slider", "Shader toggle"], "category": "text-rendering", "skiaSharpApis": ["SKCanvas.DrawText", "SKFont", "SKPaint.Shader", "SKPaint.ImageFilter", "SKPaint.ColorFilter", "SKPaint.Alpha", "SKImageFilter.CreateBlur", "SKImageFilter.CreateColorFilter", "SKColorFilter.CreateColorMatrix", "SKColorFilter.CreateLighting", "SKShader.CreateLinearGradient", "SKCanvas.ClipRect"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "coloremoji_blendmodes.cpp", "name": "ColorEmojiBlendModes", "description": "Draws a single color emoji character with each of the 29 standard blend modes over a checkerboard background. Each cell shows the blend mode name above the emoji composited onto a tiled pattern.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawText", "SKFont", "SKPaint.BlendMode", "SKCanvas.ClipRect", "SKCanvas.DrawRect", "SKBitmap.MakeShader"], "notes": "Visually compelling grid showing how every blend mode affects color emoji rendering. Great educational sample for understanding blend modes. The checkerboard background makes transparency effects visible.", "visualGoal": "5-column grid of 29 cells, each showing a color emoji composited with a different blend mode over a checkerboard pattern, with blend mode labels", "suggestedControls": ["Blend mode selector (to highlight one)", "Background pattern"], "category": "compositing", "skiaSharpApis": ["SKCanvas.DrawText", "SKFont", "SKPaint.BlendMode", "SKCanvas.ClipRect", "SKCanvas.DrawRect", "SKBitmap", "SKShader.CreateBitmap"], "sampleStatus": "existing", "matchedSample": "Blend Modes"}, {"file": "colorfilteralpha8.cpp", "name": "ColorFilterAlpha8", "description": "Tests applying a color matrix filter to an Alpha8-format bitmap. The matrix converts alpha into opaque gray, drawn over a red background to verify correct alpha-to-color transformation.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawImage", "SKBitmap", "SKPaint.ColorFilter", "SKColorFilter.CreateColorMatrix", "SKImageInfo.MakeA8"], "notes": "Simple but instructive test of color filter behavior on alpha-only images. Shows how a color matrix can convert alpha channel data into visible color. Good for understanding the Alpha8 pixel format.", "visualGoal": "A gray semi-transparent square rendered over a red background, demonstrating alpha-to-color conversion via color matrix", "suggestedControls": ["Color matrix values"], "category": "color-filters", "skiaSharpApis": ["SKCanvas.DrawImage", "SKBitmap", "SKPaint.ColorFilter", "SKColorFilter.CreateColorMatrix", "SKImageInfo"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "colorfilterimagefilter.cpp", "name": "ColorFilterImageFilter", "description": "Three sub-GMs demonstrating color filters used as image filters: (1) brightness adjustments with symmetrical dim/bright chains, (2) combinations of brightness+grayscale+blur+colorize in different orders, (3) color filter composed with various shaders including conical gradient. Also tests saveLayer with color filter.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKImageFilter.CreateColorFilter", "SKImageFilter.CreateBlur", "SKColorFilter.CreateColorMatrix", "SKColorFilter.CreateBlendMode", "SKColorFilter.CreateLighting", "SKShader.CreateLinearGradient", "SKShader.CreateTwoPointConicalGradient", "SKCanvas.SaveLayer"], "notes": "Excellent comprehensive demo of the image filter pipeline. Shows how color filters can be chained as image filters, and how filter order matters. The shader+colorfilter combo section is particularly useful for understanding makeWithColorFilter.", "visualGoal": "Rows of colored rectangles showing brightness curves, filter composition order effects, and shader-with-colorfilter combinations across gradient and image shaders", "suggestedControls": ["Brightness slider", "Filter type selector", "Filter order toggle", "Shader type"], "category": "image-filters", "skiaSharpApis": ["SKImageFilter.CreateColorFilter", "SKImageFilter.CreateBlur", "SKColorFilter.CreateColorMatrix", "SKColorFilter.CreateBlendMode", "SKPaint.ImageFilter", "SKPaint.ColorFilter", "SKShader.CreateLinearGradient", "SKShader.CreateTwoPointConicalGradient", "SKCanvas.SaveLayer", "SKCanvas.ClipRect"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "colorfilters.cpp", "name": "ColorFilters", "description": "Two sub-GMs: (1) LightingColorFilter applied to a rainbow gradient with various multiply/add color combinations, (2) HSLAMatrix color filter applied to image and sweep gradient shaders, sweeping through hue, saturation, and lightness ranges.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKColorFilter.CreateLighting", "SKColorFilter.CreateHslaColorMatrix", "SKShader.CreateLinearGradient", "SKShader.CreateSweepGradient", "SKCanvas.DrawRect", "SKImage"], "notes": "The HSLA matrix filter demo is particularly visually impressive — a grid showing how hue/saturation/lightness adjustments affect different source images. Great for photo editing UI demos.", "visualGoal": "Gradient strips with lighting filters showing channel isolation, plus a large grid of images/gradients with progressive HSL adjustments creating rainbow color shifts", "suggestedControls": ["Hue shift slider", "Saturation slider", "Lightness slider", "Source image/gradient selector"], "category": "color-filters", "skiaSharpApis": ["SKColorFilter.CreateLighting", "SKColorFilter.CreateHslaColorMatrix", "SKShader.CreateLinearGradient", "SKShader.CreateSweepGradient", "SKPaint.Shader", "SKPaint.ColorFilter", "SKCanvas.DrawRect", "SKImage"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "colormatrix.cpp", "name": "ColorMatrix", "description": "Demonstrates SkColorMatrix operations on solid and transparent gradient images: identity, desaturation at 0/0.5/1.0/2.0 levels, and a custom matrix that moves red channel into alpha while setting color to white.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKColorFilter.CreateColorMatrix", "SKCanvas.DrawImage", "SKBitmap", "SKImage", "SKColorMatrix"], "notes": "Classic color matrix demo showing saturation control and channel manipulation. The transparent gradient row shows how color matrices interact with alpha. Very practical for image processing demos.", "visualGoal": "Two rows (solid and transparent gradient images) each showing identity, desaturation levels 0/0.5/1/2, and a red-to-alpha channel swap, on a gray background", "suggestedControls": ["Saturation slider (0-2)", "Custom matrix editor", "Source image toggle (solid vs transparent)"], "category": "color-filters", "skiaSharpApis": ["SKColorFilter.CreateColorMatrix", "SKCanvas.DrawImage", "SKBitmap", "SKImage", "SKPaint.ColorFilter", "SKPaint.BlendMode"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "colorspace.cpp", "name": "ColorSpace", "description": "Self-consistency test for color space management: draws the same mandrill image converted through every combination of 7 transfer functions (sRGB, 2.2, linear, Rec2020, PQ, HLG, Rec709) × 5 gamuts (sRGB, AdobeRGB, DisplayP3, Rec2020, XYZ), verifying that imgCS→midCS→dstCS round-trips produce visually identical results.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SKColorSpace.CreateRgb", "SKImage", "SKCanvas.DrawImage", "SKSurface"], "notes": "Impressive grid showing color space round-trip consistency. All cells should look identical if color management is working correctly. Educational for understanding transfer functions and gamuts, but visually repetitive.", "visualGoal": "7×5 grid of the same mandrill image, each converted through a different intermediate color space, all appearing visually identical to demonstrate color management consistency", "suggestedControls": ["Transfer function selector", "Gamut selector", "Strategy toggle (image vs surface)"], "category": "color-management", "skiaSharpApis": ["SKColorSpace.CreateRgb", "SKImage", "SKCanvas.DrawImage", "SKSurface.Create"], "sampleStatus": "none"}, {"file": "colorwheel.cpp", "name": "ColorWheel", "description": "Tests image decoder color accuracy by drawing the same color wheel image in PNG, GIF, WebP, and JPEG formats. Letters R/G/B/C/M/Y/K on colored backgrounds verify each channel decodes correctly. Also includes a native text rendering test and an alpha-type comparison showing premul vs unpremul filtering artifacts.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawImage", "SKCanvas.DrawString", "SKCanvas.DrawImageRect", "SKImage", "SKFont"], "notes": "The colorwheel_alphatypes sub-GM is particularly interesting — it visually demonstrates the dark fringe artifact from filtering in unpremul space. Good educational value for understanding premultiplied alpha.", "visualGoal": "Four color wheel images (PNG, GIF, WebP, JPEG) on a checkerboard, plus magnified comparison of premul vs unpremul alpha filtering showing dark fringe artifacts", "suggestedControls": ["Image format selector", "Alpha type toggle (premul/unpremul)", "Zoom level"], "category": "image-decoding", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.DrawImageRect", "SKCanvas.DrawString", "SKImage", "SKFont", "SKData"], "sampleStatus": "similar", "matchedSample": "GIF Player"}, {"file": "colrv1.cpp", "name": "ColrV1", "description": "Comprehensive COLRv1 color font test suite: renders test glyphs at multiple sizes with various font variations covering gradient stops, sweep gradients, paint transforms (scale/rotate/skew/translate), composite modes, extend modes, foreground color, clip boxes, and variable alpha. Dozens of GM variants with different variation axis combinations.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.DrawText", "SKFont", "SKTypeface", "SKPaint"], "notes": "While SkiaSharp can render COLRv1 fonts via SKTypeface/SKFont, this sample requires a specific test font (test_glyphs-glyf_colr_1.ttf) that isn't bundled with SkiaSharp. The rendering itself works through standard text APIs. Could be adapted with a suitable COLRv1 font.", "visualGoal": "Rows of colorful COLRv1 glyphs at increasing sizes (12-120pt) showing gradients, transforms, composite modes, and variable font features in multiple colors", "suggestedControls": ["Font size", "Variation axis sliders", "Foreground color", "Skew/rotation controls"], "category": "text-rendering", "skiaSharpApis": ["SKCanvas.DrawText", "SKFont", "SKTypeface", "SKPaint"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "complexclip.cpp", "name": "ComplexClip", "description": "Tests complex clipping scenarios: two paths clipped with intersect/difference ops, with combinations of inverted/non-inverted fill types, AA/BW modes, and optional saveLayer. Also includes extensive clip-shader sub-GMs demonstrating clipShader with intersect/difference ops, nested shader clips, perspective transforms, and shader+rrect/path combinations.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.ClipPath", "SKCanvas.ClipRect", "SKCanvas.ClipRRect", "SKCanvas.SaveLayer", "SKCanvas.DrawPath", "SKCanvas.DrawRect", "SKCanvas.DrawRoundRect", "SKPath", "SKPaint"], "notes": "Very comprehensive clipping demo. The clip_shader sub-GMs are particularly impressive, showing shader-based clipping with various geometric primitives. The perspective + clip shader combination is advanced and visually striking. Note: ClipShader may not be available in SkiaSharp.", "visualGoal": "Grid of path intersections showing clipping with inverted fills and different ops, plus shader-clipped shapes including perspective-transformed clip regions", "suggestedControls": ["Clip operation (intersect/difference)", "Anti-aliasing toggle", "Invert clip A/B toggles", "SaveLayer toggle"], "category": "clipping", "skiaSharpApis": ["SKCanvas.ClipPath", "SKCanvas.ClipRect", "SKCanvas.ClipRRect", "SKCanvas.SaveLayer", "SKCanvas.Save", "SKCanvas.Restore", "SKCanvas.DrawPath", "SKCanvas.DrawRect", "SKPath", "SKPaint"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "complexclip2.cpp", "name": "ComplexClip2", "description": "Tests complex clipping with 5 overlapping colored rectangles/rounded-rects/paths, each clipped with random intersect/difference operations in a 5×5 grid. Supports rect, rrect, and path clip modes with both AA and BW rendering.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SKCanvas.ClipRect", "SKCanvas.ClipRRect", "SKCanvas.ClipPath", "SKCanvas.DrawRect", "SKCanvas.DrawRRect", "SKCanvas.DrawPath", "SKPath", "SKRoundRect"], "notes": "Good demonstration of multiple overlapping clip regions with different operations. The 5×5 grid with random op combinations creates visually interesting patterns. Simpler than complexclip.cpp but still instructive for understanding clip composition.", "visualGoal": "5×5 grid of cells, each showing 5 colored overlapping shapes with random intersect/difference clip operations producing unique green fill patterns", "suggestedControls": ["Clip type (rect/rrect/path)", "Anti-aliasing toggle", "Randomize ops button"], "category": "clipping", "skiaSharpApis": ["SKCanvas.ClipRect", "SKCanvas.ClipRRect", "SKCanvas.ClipPath", "SKCanvas.DrawRect", "SKCanvas.DrawRRect", "SKCanvas.DrawPath", "SKPath", "SKRoundRect", "SKPaint"], "sampleStatus": "none"}, {"file": "complexclip3.cpp", "name": "Complex Clip with Path Combinations", "description": "Tests complex clipping with two clip paths using intersect/difference operations, inverse fill types, and AA/non-AA combinations.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipPath", "SkClipOp::kIntersect", "SkClipOp::kDifference", "SkPath::setFillType", "SkPath::Circle", "SkPathBuilder::arcTo"], "notes": "Tests internal rendering of clip combinations; educational but not visually exciting", "visualGoal": "A grid showing rectangles clipped by overlapping circle and arc paths with various fill type and AA combinations.", "suggestedControls": ["Clip op toggle (Intersect/Difference)", "Fill type toggle (Normal/Inverse)", "Anti-alias toggle"], "category": "Clipping", "skiaSharpApis": ["SKCanvas.ClipPath", "SKPath.AddCircle", "SKPath.ArcTo", "SKPath.FillType"], "sampleStatus": "none"}, {"file": "complexclip4.cpp", "name": "Android Framework Replace Clip", "description": "Tests Android framework clip replacement behavior using device clip restriction and reset-clip APIs for rect, rrect, and path clips.", "interesting": "low", "apis_available": false, "missing_apis": ["SkCanvasPriv::ResetClip", "SkCanvas::androidFramework_setDeviceClipRestriction"], "key_apis": ["SkCanvasPriv::ResetClip", "SkCanvas::clipRect", "SkCanvas::clipRRect", "SkCanvas::clipPath"], "notes": "Android framework internal API test; uses private canvas APIs not relevant to SkiaSharp", "visualGoal": "Colored rectangles clipped by rect, diamond path, and round rect clips demonstrating device-space clip replacement.", "suggestedControls": [], "category": "Clipping", "skiaSharpApis": ["SKCanvas.ClipRect", "SKCanvas.ClipRoundRect", "SKCanvas.ClipPath"], "sampleStatus": "none"}, {"file": "complexclip_blur_tiled.cpp", "name": "Complex Clip with Blur Tiled Rendering", "description": "Tests tiled rendering of a blurred rounded-rect difference clip, drawing to tile surfaces and compositing to canvas.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkRRect::MakeRectXY", "SkCanvas::clipRRect", "SkClipOp::kDifference", "SkCanvas::saveLayer", "SkSurface::makeImageSnapshot"], "notes": "Demonstrates tiled rendering technique with blur and clip; combines well with blur samples", "visualGoal": "A blurred vignette effect created by a rounded-rect difference clip with Gaussian blur, rendered in tiles.", "suggestedControls": ["Blur sigma slider (1-20)", "Corner radius slider (5-50)", "Tile size slider (64-256)"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKRoundRect", "SKCanvas.ClipRoundRect", "SKCanvas.SaveLayer", "SKSurface.Snapshot"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "composecolorfilter.cpp", "name": "Composed Color Filters with Tint Effect", "description": "Demonstrates composing color filters: a luma filter piped into a color matrix to create a tint effect, implemented both with makeComposed and runtime SkSL.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkColorFilter::makeComposed", "SkLumaColorFilter::Make", "SkColorFilters::Matrix", "SkRuntimeEffect::MakeForColorFilter", "SkShaders::SweepGradient", "SkImageFilters::Compose"], "notes": "Excellent demo of color filter composition and tinting; shows both classic API and SkSL approach", "visualGoal": "Sweep gradient rectangles with red and green tint effects applied via composed color filters, comparing classic and SkSL implementations.", "suggestedControls": ["Tint color low picker", "Tint color high picker", "Implementation toggle (Classic/SkSL)"], "category": "Color Filters", "skiaSharpApis": ["SKColorFilter.CreateCompose", "SKColorFilter.CreateColorMatrix", "SKColorFilter.CreateLumaColor", "SKRuntimeEffect", "SKShader.CreateSweepGradient"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "composeshader.cpp", "name": "Compose Shader Blend Modes", "description": "Comprehensive demo of SkShaders::Blend composing gradient and bitmap shaders with various blend modes, alpha values, and local matrices.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::Blend", "SkShaders::LinearGradient", "SkBlendMode", "SkImage::makeShader", "SkShader::makeWithLocalMatrix"], "notes": "Excellent showcase of shader composition across all 16 Porter-Duff blend modes with alpha variations", "visualGoal": "A grid of 4x4 blend mode cells showing composed gradient shaders at full and partial alpha, with cell-level and composed rendering comparison.", "suggestedControls": ["Blend mode selector", "Alpha slider (0-255)", "Shader type toggle (gradient/bitmap)"], "category": "Shaders", "skiaSharpApis": ["SKShader.CreateBlend", "SKShader.CreateLinearGradient", "SKBlendMode", "SKImage.ToShader"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "compositor_quads.cpp", "name": "Compositor Edge-AA Quads", "description": "GPU-only test for experimental_DrawEdgeAAQuad and DrawEdgeAAImageSet with various transforms and edge AA flags.", "interesting": "low", "apis_available": false, "missing_apis": ["SkCanvas::experimental_DrawEdgeAAQuad", "SkCanvas::experimental_DrawEdgeAAImageSet"], "key_apis": ["SkCanvas::experimental_DrawEdgeAAQuad", "SkCanvas::experimental_DrawEdgeAAImageSet"], "notes": "GPU-only; uses experimental APIs not exposed in SkiaSharp", "visualGoal": "Grid of colored quads with various edge anti-aliasing configurations under different transforms.", "suggestedControls": [], "category": "GPU", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "compressed_textures.cpp", "name": "Compressed GPU Textures", "description": "GPU-only test for ETC2 and BC1 compressed texture formats with mipmaps, testing normal, non-power-of-two, and non-multiple-of-four dimensions.", "interesting": "low", "apis_available": false, "missing_apis": ["GrDirectContext", "SkImages::TextureFromCompressedTextureData", "SkTextureCompressionType"], "key_apis": ["GrDirectContext", "SkImages::TextureFromCompressedTextureData", "SkCompressedDataSize"], "notes": "GPU-only; tests compressed texture support not relevant to SkiaSharp CPU rendering", "visualGoal": "Gear shapes rendered at different mipmap levels in ETC2 and BC1 compressed texture formats with distinct colors per level.", "suggestedControls": [], "category": "GPU", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "concavepaths.cpp", "name": "Concave Path Tessellation Showcase", "description": "Comprehensive test of concave path filling: bowtie, star, fish, holes, coincident edges, and various monotone cases.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPath::Polygon", "SkPathBuilder::addPolygon", "SkPathBuilder::quadTo"], "notes": "Good reference for concave path rendering edge cases; educational for tessellation", "visualGoal": "A grid of small concave polygon shapes including bowties, stars, fish, holes, and edge case geometries.", "suggestedControls": ["Anti-alias toggle", "Fill type selector (Winding/EvenOdd)"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.AddPoly", "SKPath.QuadTo"], "sampleStatus": "none"}, {"file": "conicpaths.cpp", "name": "Conic Path Curves", "description": "Tests conic curve rendering with various weights producing circles, hyperbolas, ellipses, and near-parabolas, plus arcs and large ovals.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::conicTo", "SkPathBuilder::rConicTo", "SkCanvas::drawPath", "SkCanvas::drawCircle", "SkCanvas::drawOval", "SkPathBuilder::arcTo"], "notes": "Great showcase of conic curves with different weights; visually interesting and educational", "visualGoal": "A grid of conic curves at varying weights (circle, ellipse, hyperbola) rendered with fill and stroke at different alpha and AA settings.", "suggestedControls": ["Conic weight slider (0.1-5.0)", "Anti-alias toggle", "Fill/Stroke toggle", "Alpha slider"], "category": "Paths", "skiaSharpApis": ["SKPath.ConicTo", "SKPath.RConicTo", "SKCanvas.DrawPath", "SKCanvas.DrawCircle", "SKCanvas.DrawOval"], "sampleStatus": "none"}, {"file": "constcolorprocessor.cpp", "name": "Constant Color Fragment Processor", "description": "GPU-only test that directly exercises GrFragmentProcessor::MakeColor and ModulateRGBA via Ganesh internals.", "interesting": "low", "apis_available": false, "missing_apis": ["GrFragmentProcessor", "GrPaint", "SurfaceDrawContext"], "key_apis": ["GrFragmentProcessor::MakeColor", "GrFragmentProcessor::ModulateRGBA", "GrFPArgs"], "notes": "GPU-only; directly exercises Ganesh fragment processors not available in SkiaSharp", "visualGoal": "Grid of small colored rectangles showing constant color and modulated RGBA fragment processor outputs.", "suggestedControls": [], "category": "GPU", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "convex_all_line_paths.cpp", "name": "Convex Line-Only Paths", "description": "Tests convex paths composed entirely of line segments: narrow rects, teardrops, n-gons, with shrinking scales and direction changes.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::lineTo", "SkPathBuilder::close", "SkPaint::kStrokeAndFill_Style"], "notes": "Tests convex line-only path edge cases; good stress test but not very visually compelling", "visualGoal": "Rows of convex polygons (narrow rects, teardrops, n-gons) drawn at progressively smaller scales with CW/CCW winding.", "suggestedControls": ["Stroke width slider (0-20)", "Fill style toggle", "Anti-alias toggle"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.LineTo", "SKPath.Close"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "convexpaths.cpp", "name": "Convex Paths Showcase", "description": "Comprehensive convex path showcase with quads, cubics, rects, circles, ovals, round rects, high-vertex-count paths, and degenerate cases.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::quadTo", "SkPathBuilder::cubicTo", "SkPath::Circle", "SkPath::Oval", "SkPath::RRect"], "notes": "Good reference of convex path types; many degenerate edge cases included", "visualGoal": "A grid of randomly colored convex paths including curves, circles, ovals, round rects, and degenerate geometries.", "suggestedControls": ["Path type selector", "Anti-alias toggle"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.QuadTo", "SKPath.CubicTo", "SKPath.AddCircle", "SKPath.AddOval", "SKPath.AddRoundRect"], "sampleStatus": "none"}, {"file": "convexpolyclip.cpp", "name": "Convex Polygon Clipping", "description": "Tests convex polygon clips (triangle, hexagon, scaled hexagon, rect, rotated rect) applied to image and text draws with AA/non-AA and saveLayer variants.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipPath", "SkCanvas::clipRect", "SkClipOp::kIntersect", "SkCanvas::saveLayer", "SkShaders::RadialGradient"], "notes": "Good demonstration of polygon-based clipping; combines with images and text", "visualGoal": "Rows of clipped images and text using triangle, hexagon, rect, and rotated rect clips with and without anti-aliasing.", "suggestedControls": ["Clip shape selector (Triangle/Hexagon/Rect/Rotated)", "Anti-alias toggle", "SaveLayer toggle"], "category": "Clipping", "skiaSharpApis": ["SKCanvas.ClipPath", "SKCanvas.ClipRect", "SKCanvas.SaveLayer", "SKShader.CreateRadialGradient"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "convexpolyeffect.cpp", "name": "Convex Polygon Effect (GPU)", "description": "GPU-only test that directly exercises GrConvexPolyEffect fragment processor for convex polygon rendering.", "interesting": "low", "apis_available": false, "missing_apis": ["GrConvexPolyEffect", "GrPaint", "SurfaceDrawContext"], "key_apis": ["GrConvexPolyEffect::Make", "GrClipEdgeType", "GrPaint", "SurfaceDrawContext"], "notes": "GPU-only; directly exercises Ganesh fragment processors not available in SkiaSharp", "visualGoal": "Convex polygons rendered via GPU fragment processor with different edge types.", "suggestedControls": [], "category": "GPU", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "coordclampshader.cpp", "name": "Coordinate Clamp Shader", "description": "Demonstrates SkShaders::CoordClamp which clamps texture coordinates to a sub-rect, tested with rotations, mipmaps, and various sampling modes.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkShaders::CoordClamp"], "key_apis": ["SkShaders::CoordClamp", "SkImage::makeShader", "SkShader::makeWithLocalMatrix", "SkSamplingOptions"], "notes": "CoordClamp shader not yet exposed in SkiaSharp; interesting for texture clamping demos", "visualGoal": "An image rendered with clamped texture coordinates under rotations and various sampling/mipmap modes, preventing border artifacts.", "suggestedControls": ["Clamp rect inset slider", "Rotation angle slider", "Sampling mode selector"], "category": "Shaders", "skiaSharpApis": ["SKImage.ToShader", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "copy_to_4444.cpp", "name": "Copy to ARGB4444 Color Type", "description": "Tests copying an image from 8888 to ARGB_4444 color type, demonstrating dithering behavior.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap::asImage", "SkImageInfo::Make", "kARGB_4444_SkColorType", "SkBitmap::writePixels"], "notes": "Basic color type conversion test; not visually interesting", "visualGoal": "Side-by-side comparison of an image in native 8888 color vs dithered 4444 color.", "suggestedControls": [], "category": "Bitmap", "skiaSharpApis": ["SKBitmap", "SKImageInfo", "SKColorType.Argb4444"], "sampleStatus": "none"}, {"file": "crbug_1041204.cpp", "name": "Bug Regression: Large Transform Discard", "description": "Regression test for crbug.com/1041204: drawing a rect with extremely large coordinate transforms that could be improperly discarded.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::concat", "SkMatrix::MakeAll", "SkCanvas::drawRect"], "notes": "Bug regression test for improper discard with large transforms", "visualGoal": "A blue rectangle visible through an extreme perspective/scale transform.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.Concat", "SKMatrix", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "crbug_1073670.cpp", "name": "Bug Regression: Gradient Text", "description": "Regression test for crbug.com/1073670: drawing large text filled with a linear gradient shader.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawString", "SkShaders::LinearGradient", "SkFont"], "notes": "Bug regression test; gradient text is a common use case though", "visualGoal": "Large 'Gradient' text filled with a red-to-blue vertical linear gradient.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawText", "SKShader.CreateLinearGradient", "SKFont"], "sampleStatus": "similar", "matchedSample": "Gradient"}, {"file": "crbug_1086705.cpp", "name": "Bug Regression: Dense Circle Vertices", "description": "Regression test for crbug.com/1086705: stroking a circle made of 700 near-duplicate vertices that collapsed to a triangle.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::lineTo", "SkPaint::kStroke_Style"], "notes": "Bug regression test for convex path rendering with many near-duplicate vertices", "visualGoal": "A stroked tiny circle built from 700 line segments.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.LineTo"], "sampleStatus": "similar", "matchedSample": "Vertex Mesh"}, {"file": "crbug_1113794.cpp", "name": "Bug Regression: Dash Path Effect with Zero Phase", "description": "Regression test for crbug.com/1113794: applying a dash path effect with zero phase to a vertical line.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkDashPathEffect::Make", "SkCanvas::drawPath", "SkMatrix::RectToRectOrIdentity"], "notes": "Bug regression test for dash path effect edge case", "visualGoal": "A dashed vertical line scaled up via a viewBox-like matrix.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKPathEffect.CreateDash", "SKCanvas.DrawPath"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "crbug_1139750.cpp", "name": "Bug Regression: Round Rect Stroke with Zero Inner Radii", "description": "Regression test for crbug.com/1139750: stroking a round rect where stroke width equals double the radii, causing zero inner radii.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRRect", "SkRRect::MakeRectXY", "SkPaint::kStroke_Style"], "notes": "Bug regression test for GPU elliptical round-rect rendering edge case", "visualGoal": "A small stroked round rect that should remain visible despite zero inner radii.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawRoundRect", "SKRoundRect"], "sampleStatus": "none"}, {"file": "crbug_1156804.cpp", "name": "Bug Regression: Blur with Border Padding", "description": "Regression test for crbug.com/1156804: blur image filter with small vs large sigma and narrow vs wide transparent border padding.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkImageFilters::Crop", "SkTileMode::kClamp"], "notes": "Bug regression test for blur border hardening; demonstrates Crop+Blur interaction", "visualGoal": "Four blurred colored squares comparing narrow vs wide transparent borders at different sigma values.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "crbug_1162942.cpp", "name": "Bug Regression: Perspective Quad Inset Degeneration", "description": "Regression test for crbug.com/1162942: perspective quad AA insetting that degenerates to a triangle with vertices far from the original quad.", "interesting": "low", "apis_available": false, "missing_apis": ["SkCanvas::experimental_DrawEdgeAAQuad"], "key_apis": ["SkCanvas::experimental_DrawEdgeAAQuad", "SkCanvas::QuadAAFlags", "SkMatrix::MakeAll"], "notes": "Bug regression test; uses experimental DrawEdgeAAQuad API not in SkiaSharp", "visualGoal": "Thin perspective-projected quads with various edge AA flag combinations.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "crbug_1167277.cpp", "name": "Bug Regression: Quad Inset Triangle Degeneration", "description": "Regression test for crbug.com/1167277: quad that degenerates when inset, producing a triangle point far outside the original quad.", "interesting": "low", "apis_available": false, "missing_apis": ["SkCanvas::experimental_DrawEdgeAAQuad"], "key_apis": ["SkCanvas::experimental_DrawEdgeAAQuad", "SkCanvas::QuadAAFlags"], "notes": "Bug regression test; uses experimental DrawEdgeAAQuad API", "visualGoal": "Perspective-transformed quads with various AA flags exercising degenerate inset cases.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "crbug_1174186.cpp", "name": "Bug Regression: Thin Quad AA Outsetting", "description": "Regression test for crbug.com/1174186: very thin near-line quads whose AA outsetting goes haywire at large coordinate values.", "interesting": "low", "apis_available": false, "missing_apis": ["SkCanvas::experimental_DrawEdgeAAQuad"], "key_apis": ["SkCanvas::experimental_DrawEdgeAAQuad", "SkMatrix::MakeAll"], "notes": "Bug regression test; uses experimental DrawEdgeAAQuad API", "visualGoal": "Nearly invisible thin quads at large coordinates with various AA flag permutations.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "crbug_1174354.cpp", "name": "Bug Regression: Background Blur Border Bleed", "description": "Regression test for crbug.com/1174354: backdrop blur that incorrectly brings in transparency from outside source bounds when downsampling.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkTileMode::kClamp", "SkCanvas::SaveLayerRec", "SkShaders::SweepGradient"], "notes": "Bug regression test for backdrop blur border contamination", "visualGoal": "Four sweep-gradient squares with backdrop blur at increasing sigma, showing clean edges without transparency bleed.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKCanvas.SaveLayer", "SKShader.CreateSweepGradient"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "crbug_1177833.cpp", "name": "Bug Regression: Quad Inset Point Collapse", "description": "Regression test for crbug.com/1177833: bad quads where inset collapses to a point or triangle without enough degrees of freedom.", "interesting": "low", "apis_available": false, "missing_apis": ["SkCanvas::experimental_DrawEdgeAAQuad"], "key_apis": ["SkCanvas::experimental_DrawEdgeAAQuad", "SkCanvas::QuadAAFlags"], "notes": "Bug regression test; uses experimental DrawEdgeAAQuad API", "visualGoal": "Very thin lines from degenerate perspective quads that should render correctly without artifacts.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "crbug_1257515.cpp", "name": "Bug Regression: SVG Stroke Line Path", "description": "Regression test for crbug.com/1257515: SVG-like stroked polyline paths with round cap/join and bevel join rendering.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPaint::kStroke_Style", "SkPaint::kRound_Cap", "SkPaint::kBevel_Join"], "notes": "Bug regression test for stroke rendering of polyline paths", "visualGoal": "Two stroked polyline paths: one red with round cap/join, one blue with butt cap and bevel join.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPaint.StrokeCap", "SKPaint.StrokeJoin"], "sampleStatus": "none"}, {"file": "crbug_1313579.cpp", "name": "Bug Regression: Backdrop Blur Near-Integer Scale", "description": "Regression test for crbug.com/1313579: backdrop blur with near-integer scale-and-translate matrix causing color bleed from extra pixel rows.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkTileMode::kClamp", "SkCanvas::SaveLayerRec"], "notes": "Bug regression test for near-integer matrix backdrop blur artifact", "visualGoal": "A white square with backdrop blur that should not show green bleed from the surrounding area.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKCanvas.SaveLayer"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "crbug_224618.cpp", "name": "Bug Regression: 3D Panorama Cube", "description": "Animated 3D cube panorama using SkM44 perspective projection, testing stability of covering rects across perspective matrices.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkM44"], "key_apis": ["SkM44", "SkM44::Rotate", "SkM44::Translate", "SkCanvas::concat(SkM44)", "SkShaders::RadialGradient"], "notes": "Interesting 3D cube demo but requires SkM44 which is not in SkiaSharp; animated", "visualGoal": "A 3D rotating cube with colored faces and gradient textures rendered in perspective.", "suggestedControls": ["FOV slider", "Rotation speed slider"], "category": "3D", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.DrawImageRect", "SKShader.CreateRadialGradient"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "crbug_478659067.cpp", "name": "Bug Regression: Graphite Font Cache Overflow", "description": "Graphite-specific test for font glyph cache page overflow with device-independent fonts.", "interesting": "low", "apis_available": false, "missing_apis": ["Graphite Recorder", "SkSurfaceProps::kUseDeviceIndependentFonts_Flag"], "key_apis": ["SkSurfaces::RenderTarget", "SkSurfaceProps::kUseDeviceIndependentFonts_Flag", "SkCanvas::drawSimpleText"], "notes": "Graphite-specific test; not relevant to SkiaSharp", "visualGoal": "Multiple lines of skewed text testing font cache overflow.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Text Lab"}, {"file": "crbug_691386.cpp", "name": "Bug Regression: SVG Arc Stroke", "description": "Regression test for crbug.com/691386: parsing and stroking an SVG arc path.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkParsePath::FromSVGString", "SkCanvas::drawPath", "SkPaint::kStroke_Style"], "notes": "Bug regression test for SVG arc parsing and stroke rendering", "visualGoal": "A thin stroked SVG arc (half-circle) scaled up to be visible.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKPath.ParseSvgPathData", "SKCanvas.DrawPath"], "sampleStatus": "similar", "matchedSample": "Path Builder"}, {"file": "crbug_788500.cpp", "name": "Bug Regression: Empty Path Move-Move-Cubic", "description": "Regression test for crbug.com/788500: path with multiple moveTo followed by a cubic, using even-odd fill.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::cubicTo", "SkPathBuilder::setFillType", "SkPathFillType::kEvenOdd"], "notes": "Bug regression test for path with multiple moveTos and cubic", "visualGoal": "A small cubic curve from a path with leading moveTo commands.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKPath.CubicTo", "SKPath.FillType"], "sampleStatus": "none"}, {"file": "crbug_847759.cpp", "name": "Bug Regression: Hairline Cubic Oval", "description": "Regression test for crbug.com/847759: hairline stroke of a squashed oval cubic path with slightly non-vertical tangents at tips.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::cubicTo", "SkCanvas::drawPath", "SkPaint::kStroke_Style"], "notes": "Bug regression test for hairline path rendering at oval tips", "visualGoal": "A thin hairline-stroked squashed oval built from cubic curves.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKPath.CubicTo", "SKCanvas.DrawPath"], "sampleStatus": "similar", "matchedSample": "Path Builder"}, {"file": "crbug_884166.cpp", "name": "Bug Regression: Concave Path Fill", "description": "Regression test for crbug.com/884166: filling a specific concave polygon path.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::lineTo"], "notes": "Bug regression test for concave path fill", "visualGoal": "A filled concave polygon shape.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.LineTo"], "sampleStatus": "none"}, {"file": "crbug_887103.cpp", "name": "Bug Regression: Overlapping Triangle Fill", "description": "Regression test for crbug.com/887103: filling multiple overlapping triangles from separate sub-paths.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::moveTo", "SkPathBuilder::lineTo"], "notes": "Bug regression test for overlapping triangle path fill", "visualGoal": "Three overlapping triangles filled as a single path.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.MoveTo", "SKPath.LineTo"], "sampleStatus": "none"}, {"file": "crbug_892988.cpp", "name": "Bug Regression: AA Bloat Outside Clip", "description": "Regression test for crbug.com/892988: anti-aliased geometry drawing outside clip bounds during dst-copy blending.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipRect", "SkBlendMode::kSrc", "SkCanvas::drawRect"], "notes": "Bug regression test for AA bloat with clip and blend modes", "visualGoal": "A stroked rect with a clipped semi-transparent rect drawn inside using Src blend mode.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.ClipRect", "SKBlendMode.Src", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "crbug_899512.cpp", "name": "Bug Regression: Mirrored Blur with Color Filter", "description": "Regression test for crbug.com/899512: drawing a rect with blur mask filter and SrcIn color filter under a mirroring matrix.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkMaskFilter::MakeBlur", "SkColorFilters::Blend", "SkBlendMode::kSrcIn", "SkMatrix"], "notes": "Bug regression test for blur + color filter under negative scale matrix", "visualGoal": "A blurred black rectangle with SrcIn color filter drawn under a horizontal mirror transform.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKMaskFilter.CreateBlur", "SKColorFilter.CreateBlendMode", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "crbug_905548.cpp", "name": "Bug Regression: Image Filter Blend Chain", "description": "Regression test for crbug.com/905548: chaining blur, erode, and blend image filters on a circle drawn to an offscreen surface.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkImageFilters::Erode", "SkImageFilters::Blend", "SkImageFilters::Arithmetic", "SkImageFilters::Image"], "notes": "Bug regression test for image filter composition chain", "visualGoal": "A circle with blur-erode-blend and blur-erode-arithmetic filter chains applied.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKImageFilter.CreateErode", "SKImageFilter.CreateBlendMode", "SKImageFilter.CreateArithmetic"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "crbug_908646.cpp", "name": "Bug Regression: Even-Odd Nested Triangles", "description": "Regression test for crbug.com/908646: even-odd fill with nested triangles inside a rectangle sub-path.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathFillType::kEvenOdd", "SkPathBuilder::lineTo"], "notes": "Bug regression test for even-odd fill with nested geometry", "visualGoal": "A rectangle with even-odd filled nested triangles creating a star-of-David cutout effect.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.FillType"], "sampleStatus": "none"}, {"file": "crbug_913349.cpp", "name": "Bug Regression: Concave 5-Vertex Path", "description": "Regression test for crbug.com/913349: a specific 5-vertex concave path reduction that caused rendering issues.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::lineTo"], "notes": "Bug regression test for concave path fill with 5 vertices", "visualGoal": "A small filled concave polygon from 5 vertices.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.LineTo"], "sampleStatus": "none"}, {"file": "crbug_918512.cpp", "name": "Bug Regression: Luma Color Filter with SaveLayer", "description": "Regression test for crbug.com/918512: PDF backend correctness with luma color filter applied via DstIn blend mode in nested save layers.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkLumaColorFilter::Make", "SkBlendMode::kDstIn", "SkCanvas::saveLayer"], "notes": "Bug regression test for luma color filter with nested layers; PDF backend focus", "visualGoal": "A yellow background with cyan overlaid, masked by a gray/transparent luma split creating a half-visible result.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKColorFilter.CreateLumaColor", "SKBlendMode.DstIn", "SKCanvas.SaveLayer"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "crbug_938592.cpp", "name": "Bug Regression: Hard Stop Gradient Jagginess", "description": "Regression test for crbug.com/938592: hard-stop gradient applied to a rect with mirrored rendering, testing interpolant consistency.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient", "SkCanvas::scale"], "notes": "Bug regression test for hard-stop gradient rendering consistency", "visualGoal": "Four mirrored copies of a rect with a blue-red-green hard-stop gradient that should appear smooth.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKCanvas.Scale"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "crbug_946965.cpp", "name": "Bug Regression: Rotated Ellipse Radii", "description": "Regression test for crbug.com/946965: ellipse rendering with wrong radii under 90-degree rotation.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRRect", "SkRRect::MakeRectXY", "SkCanvas::rotate"], "notes": "Bug regression test for rotated elliptical round rect rendering", "visualGoal": "A filled and stroked round rect drawn with 90-degree rotation and non-uniform scale.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawRoundRect", "SKRoundRect", "SKCanvas.RotateDegrees"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "crbug_947055.cpp", "name": "Bug Regression: Perspective Rect Corner Outsets", "description": "Regression test for crbug.com/947055: perspective-projected rectangle with extreme corner outsetting artifacts.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::concat", "SkMatrix::MakeAll", "SkCanvas::drawRect"], "notes": "Bug regression test for perspective rect AA corner artifacts", "visualGoal": "A red perspective rectangle overlapping a green reference rectangle, showing correct AA without extreme outsets.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.Concat", "SKMatrix", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "crbug_996140.cpp", "name": "Bug Regression: Tiny Arc Fill", "description": "Regression test for crbug.com/996140: a very small circle drawn via arcTo that disappeared under high scaling on GPU.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::arcTo", "SkCanvas::drawPath", "SkCanvas::scale"], "notes": "Bug regression test for small arc vanishing under high zoom on GPU", "visualGoal": "A blue stroked circle and red filled tiny circle visible under extreme magnification.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKPath.ArcTo", "SKCanvas.DrawPath", "SKCanvas.Scale"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "crop_imagefilter.cpp", "name": "Crop Image Filter with Tile Modes", "description": "Comprehensive test of SkImageFilters::Crop with all 4 tile modes for both input and output, showing 5×4 grid of crop/content/output bound relationships.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkImageFilters::Crop with SkTileMode"], "key_apis": ["SkImageFilters::Crop", "SkImageFilters::Blur", "SkTileMode", "SkCanvas::saveLayer"], "notes": "Crop image filter with tile modes not fully exposed in SkiaSharp; complex but educational", "visualGoal": "A 5×4 grid showing cropped and blurred content with various tile modes (decal, clamp, repeat, mirror) and bound relationships.", "suggestedControls": ["Input tile mode selector", "Output tile mode selector", "Crop rect adjustment"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKCanvas.SaveLayer"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "croppedrects.cpp", "name": "Cropped Rectangles Pre-Clipping", "description": "Tests three draw codepaths (drawPaint, drawImageRect, drawPath with stroke) with clip-based pre-cropping to eliminate out-of-bounds red regions.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipRect", "SkCanvas::drawPaint", "SkCanvas::drawImageRect", "SkCanvas::drawPath", "SkImage::makeShader"], "notes": "Internal GPU pre-clipping optimization test; not visually interesting for gallery", "visualGoal": "Three green rectangles with no visible red background, drawn via paint, image rect, and stroked path with clipping.", "suggestedControls": [], "category": "Rendering", "skiaSharpApis": ["SKCanvas.ClipRect", "SKCanvas.DrawPaint", "SKCanvas.DrawImageRect", "SKCanvas.DrawPath"], "sampleStatus": "none"}, {"file": "crosscontextimage.cpp", "name": "Cross-Context GPU Image", "description": "GPU-only test for cross-context image creation with CrossContextTextureFromPixmap.", "interesting": "low", "apis_available": false, "missing_apis": ["GrDirectContext", "SkImages::CrossContextTextureFromPixmap"], "key_apis": ["GrDirectContext", "SkImages::CrossContextTextureFromPixmap", "SkImages::DeferredFromEncodedData"], "notes": "GPU-only; tests Ganesh cross-context texture sharing not relevant to SkiaSharp", "visualGoal": "Three columns of mandrill images created via different texture sharing methods.", "suggestedControls": [], "category": "GPU", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "cubicpaths.cpp", "name": "Cubic Path Showcase", "description": "Comprehensive cubic path rendering test with various fill/stroke styles, cap/join types, and transforms across multiple cubic curve shapes.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::cubicTo", "SkCanvas::drawPath", "SkPaint::Cap", "SkPaint::Join", "SkPaint::Style"], "notes": "Good reference for cubic path rendering with various paint styles", "visualGoal": "A grid of cubic curve shapes rendered with different stroke caps, joins, widths, and fill styles in various colors.", "suggestedControls": ["Stroke cap selector", "Stroke join selector", "Stroke width slider", "Fill style toggle"], "category": "Paths", "skiaSharpApis": ["SKPath.CubicTo", "SKCanvas.DrawPath", "SKPaint.StrokeCap", "SKPaint.StrokeJoin"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "daa.cpp", "name": "Delta-Based Anti-Aliasing Test", "description": "Tests delta-based rasterizer correctness by covering a red rect with green triangles/rects wound different ways.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::addPolygon", "SkPath::Polygon"], "notes": "Internal rasterizer test for anti-aliasing correctness; not visually interesting", "visualGoal": "Five rows of green squares that should fully cover red backgrounds, testing various polygon winding combinations.", "suggestedControls": [], "category": "Rendering", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.AddPoly"], "sampleStatus": "none"}, {"file": "dashcircle.cpp", "name": "Dashed Circle Path Effects", "description": "Animated dashed circles with various dash patterns, wedge counts, and transforms including mirrors, rotations, and thin strokes.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkDashPathEffect::Make", "SkCanvas::drawPath", "SkCanvas::drawOval", "SkPath::Circle", "SkPathBuilder::arcTo"], "notes": "Visually interesting animated dash patterns on circles; great gallery sample", "visualGoal": "Animated dashed circles with varying dash patterns (short dashes, long gaps, etc.) and reference arc overlays showing correct dash alignment.", "suggestedControls": ["Dash pattern selector", "Wedge count slider (6/12/36)", "Rotation angle slider", "Stroke width slider"], "category": "Path Effects", "skiaSharpApis": ["SKPathEffect.CreateDash", "SKCanvas.DrawPath", "SKCanvas.DrawOval", "SKPath.AddCircle"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "dashcubics.cpp", "name": "Dashed Cubic Flower with Trim", "description": "Dashed cubic Bezier flower pattern plus SkTrimPathEffect demo showing animated path trimming with start/stop offsets.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkDashPathEffect::Make", "SkTrimPathEffect::Make", "SkParsePath::FromSVGString", "SkCanvas::drawPath"], "notes": "Beautiful dashed flower pattern and animated trim effect; excellent gallery samples", "visualGoal": "A dashed SVG flower pattern with different dash intervals and join types, plus animated path trim effect on cubic curves.", "suggestedControls": ["Dash interval sliders", "Trim start/stop sliders", "Trim mode toggle (Normal/Inverted)", "Animation speed"], "category": "Path Effects", "skiaSharpApis": ["SKPathEffect.CreateDash", "SKPathEffect.CreateTrim", "SKPath.ParseSvgPathData", "SKCanvas.DrawPath"], "sampleStatus": "existing", "matchedSample": "Path Effects Lab"}, {"file": "dashing.cpp", "name": "Dashing Path Effect Comprehensive", "description": "Comprehensive test of dash path effects on lines, rects, and paths with various stroke widths, dash intervals, and transforms.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkDashPathEffect::Make", "SkCanvas::drawLine", "SkCanvas::drawRect", "SkCanvas::drawPath"], "notes": "Good reference for dash path effect behavior; many edge cases covered", "visualGoal": "Grid of dashed lines, rectangles, and paths with varying dash patterns, stroke widths, and paint caps.", "suggestedControls": ["Dash on/off lengths", "Stroke width slider", "Cap style selector"], "category": "Path Effects", "skiaSharpApis": ["SKPathEffect.CreateDash", "SKCanvas.DrawLine", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "degeneratesegments.cpp", "name": "Degenerate Path Segments", "description": "Tests rendering of degenerate path segments (zero-length lines, quads, cubics) combined with normal segments in random combinations.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder", "SkPaint::Cap", "SkPaint::Join", "SkPaint::Style", "SkPathFillType"], "notes": "Stress test for degenerate path segment handling; not visually interesting", "visualGoal": "A grid of random path combinations with degenerate and normal segments rendered with various fill, stroke, cap, and join styles.", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath", "SKPaint.StrokeCap", "SKPaint.StrokeJoin"], "sampleStatus": "none"}, {"file": "destcolor.cpp", "name": "Destination Color Read-Back Blender", "description": "Uses a runtime blender to read the destination color and invert it, drawing an inverted oval over a mandrill image.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkRuntimeEffect::MakeForBlender", "SkRuntimeEffect::makeBlender", "SkPaint::setBlender", "SkCanvas::drawOval"], "notes": "Excellent demo of runtime blenders for custom compositing; reads dst color for inversion effect", "visualGoal": "A mandrill image with an oval region where colors are inverted using a custom runtime blender.", "suggestedControls": ["Blender SkSL code editor", "Oval position/size controls"], "category": "Shaders", "skiaSharpApis": ["SKRuntimeEffect", "SKBlender", "SKCanvas.DrawOval"], "sampleStatus": "none"}, {"file": "dftext.cpp", "name": "Distance Field Text Rendering", "description": "GPU-specific distance field text rendering test with scaling, rotation, skew, perspective, gamma-correction, and emoji.", "interesting": "low", "apis_available": false, "missing_apis": ["SkSurfaceProps::kUseDeviceIndependentFonts_Flag"], "key_apis": ["SkSurface::RenderTarget", "SkSurfaceProps::kUseDeviceIndependentFonts_Flag", "SkCanvas::drawSimpleText", "SkTextBlob"], "notes": "GPU-specific distance field text test; requires GPU surface props not in SkiaSharp", "visualGoal": "Text rendered at various scales, rotations, and perspectives using distance field technique with gamma-corrected blending.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawText", "SKTextBlob", "SKFont"], "sampleStatus": "similar", "matchedSample": "Color Fonts"}, {"file": "dftext_blob_persp.cpp", "name": "Distance Field Text Blob Perspective", "description": "GPU-specific test for reusing text blobs with distance fields under various perspective matrices, clips, and draw positions.", "interesting": "low", "apis_available": false, "missing_apis": ["SkSurfaceProps::kUseDeviceIndependentFonts_Flag"], "key_apis": ["SkTextBlob::MakeFromPosGlyphs", "SkSurfaceProps::kUseDeviceIndependentFonts_Flag", "SkMatrix::setPerspX"], "notes": "GPU-specific distance field text perspective test; not relevant to SkiaSharp", "visualGoal": "Text blobs rendered under perspective transforms with and without clipping.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKTextBlob", "SKFont"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "discard.cpp", "name": "Surface Discard", "description": "Tests SkSurface::discard() by creating an offscreen surface, discarding and redrawing it in a 10×10 grid.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkSurface::getCanvas()->discard", "SkSurface::draw", "SkSurfaces::Raster"], "notes": "Internal surface management test; not visually interesting", "visualGoal": "A 10×10 grid of randomly colored small squares drawn from a repeatedly discarded offscreen surface.", "suggestedControls": [], "category": "Rendering", "skiaSharpApis": ["SKSurface", "SKCanvas.DrawColor"], "sampleStatus": "none"}, {"file": "displacement.cpp", "name": "Displacement Map Image Filter", "description": "Comprehensive test of SkImageFilters::DisplacementMap with various channel selectors, scales, crop rects, and displacement image sizes.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::DisplacementMap", "SkColorChannel", "SkImageFilters::Image"], "notes": "Excellent demo of displacement mapping; shows different channels, scales, crops, and image sizes", "visualGoal": "A 6×5 grid of a glyph image displaced by a checkerboard pattern using different color channels, scales, and crop rects.", "suggestedControls": ["X channel selector (R/G/B/A)", "Y channel selector (R/G/B/A)", "Scale slider (-64 to 64)", "Crop rect toggle"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateDisplacementMapEffect", "SKColorChannel", "SKImageFilter.CreateImage"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "distantclip.cpp", "name": "Distant Clip Path Recording", "description": "Tests that clip paths at large vertical offsets work correctly during picture recording and playback.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPictureRecorder", "SkCanvas::clipPath", "SkPicture::playback"], "notes": "Internal rendering correctness test for distant clips", "visualGoal": "A circle clipped at a large vertical offset, recorded to and played back from a picture.", "suggestedControls": [], "category": "Rendering", "skiaSharpApis": ["SKPictureRecorder", "SKCanvas.ClipPath", "SKPicture"], "sampleStatus": "none"}, {"file": "draw_bitmap_rect_skbug4374.cpp", "name": "Bug Regression: DrawImageRect Fractional Inset", "description": "Regression test for skbug.com/4374: drawing an image rect with fractionally-inset source rect and 8× scale.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImageRect", "SkCanvas::kStrict_SrcRectConstraint"], "notes": "Bug regression test for drawImageRect with fractional src rect inset", "visualGoal": "A scaled-up image drawn with a slightly inset source rectangle.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawImageRect"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "drawable.cpp", "name": "SkDrawable Custom Drawing", "description": "Tests SkDrawable with translate, matrix transforms, and direct draw calls using a custom conic-based drawable.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkDrawable", "SkCanvas::drawDrawable", "SkPathBuilder::conicTo"], "notes": "Demonstrates custom drawable pattern; good for teaching drawable reuse", "visualGoal": "Multiple instances of a conic-curve drawable rendered with different transforms.", "suggestedControls": [], "category": "Drawing", "skiaSharpApis": ["SKDrawable", "SKCanvas.DrawDrawable", "SKPath.ConicTo"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "drawatlas.cpp", "name": "Draw Atlas Transforms", "description": "Comprehensive drawAtlas demo with RSXform transforms, text-on-path via atlas, and comparison of atlas vs vertices rendering.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawAtlas", "SkRSXform", "SkTextBlob::MakeFromRSXform", "SkPathMeasure", "SkVertices"], "notes": "Excellent showcase of drawAtlas for sprite-like rendering and text on path", "visualGoal": "Text characters placed along a curved path using atlas transforms, with atlas vs vertices comparison.", "suggestedControls": ["Number of sprites slider", "Path curvature controls", "Blend mode selector"], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawAtlas", "SKRotationScaleMatrix", "SKTextBlob", "SKPathMeasure", "SKVertices"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "drawatlascolor.cpp", "name": "Draw Atlas Color Blend Modes", "description": "Tests drawAtlas with per-sprite colors across all 29 blend modes, with and without paint alpha.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawAtlas", "SkBlendMode", "SkRSXform"], "notes": "Good reference for drawAtlas color blending behavior across all modes", "visualGoal": "Rows of atlas sprites colored with different blend modes, comparing with and without paint.", "suggestedControls": ["Blend mode selector", "Sprite color picker", "Paint alpha slider"], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawAtlas", "SKBlendMode", "SKRotationScaleMatrix"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "drawbitmaprect.cpp", "name": "Draw Bitmap Rect Strategies", "description": "Draws sub-rects of a large image at various src sizes into fixed dst rects, testing bitmap, subset, image, and image-subset draw strategies.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImageRect", "SkImage::makeSubset", "SkBitmap::extractSubset", "SkMaskFilter::MakeBlur"], "notes": "Good reference for drawImageRect with various source rect configurations", "visualGoal": "Rows of image sub-regions drawn into fixed destination rectangles with blur mask filter, comparing draw strategies.", "suggestedControls": ["Source rect size", "Draw strategy selector"], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawImageRect", "SKImage.Subset", "SKMaskFilter.CreateBlur"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "drawglyphs.cpp", "name": "Draw Glyphs on Arc Path", "description": "Tests SkCanvas::drawGlyphs and drawGlyphsRSXform rendering text characters placed along a curved arc path.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkCanvas::drawGlyphs", "SkCanvas::drawGlyphsRSXform"], "key_apis": ["SkCanvas::drawGlyphs", "SkCanvas::drawGlyphsRSXform", "SkFont::textToGlyphs", "SkRSXform"], "notes": "drawGlyphs API not directly exposed in SkiaSharp; text on path can be done via TextBlob RSXform", "visualGoal": "Text characters placed along a circular arc using glyph-level positioning and RSXform transforms.", "suggestedControls": ["Arc radius slider", "Font size slider", "Text input"], "category": "Text", "skiaSharpApis": ["SKFont.GetGlyphs", "SKRotationScaleMatrix"], "sampleStatus": "similar", "matchedSample": "Path Builder"}, {"file": "drawimageset.cpp", "name": "Draw Edge-AA Image Set", "description": "Tests experimental_DrawEdgeAAImageSet with tiled images under various transforms and edge AA flags.", "interesting": "low", "apis_available": false, "missing_apis": ["SkCanvas::experimental_DrawEdgeAAImageSet"], "key_apis": ["SkCanvas::experimental_DrawEdgeAAImageSet", "SkCanvas::QuadAAFlags"], "notes": "Uses experimental API not exposed in SkiaSharp", "visualGoal": "Tiled image grids rendered with edge AA under rotation, perspective, and skew transforms.", "suggestedControls": [], "category": "GPU", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "drawlines_with_local_matrix.cpp", "name": "Draw Lines with Shader Local Matrix", "description": "Draws thick lines using drawPoints with a radial gradient shader, verifying shader local-matrix interaction with line geometry.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPoints", "SkShaders::RadialGradient", "SkPaint::setStrokeCap"], "notes": "Demonstrates shader interaction with point/line drawing; good for understanding local matrices", "visualGoal": "Thick lines drawn with a radial gradient shader showing correct shader coordinate mapping.", "suggestedControls": ["Stroke width slider", "Cap style selector", "Gradient center position"], "category": "Shaders", "skiaSharpApis": ["SKCanvas.DrawPoints", "SKShader.CreateRadialGradient", "SKPaint.StrokeCap"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "drawminibitmaprect.cpp", "name": "Draw Mini Bitmap Rect Stress Test", "description": "Repeatedly calls drawImageRect on the same large texture with varying src sizes and random rotations, testing GPU draw-op combining.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImageRect", "SkCanvas::kFast_SrcRectConstraint"], "notes": "GPU stress test for draw-op combining; not visually interesting as gallery sample", "visualGoal": "Many small randomly-rotated image rectangles tiled across the canvas.", "suggestedControls": [], "category": "Rendering", "skiaSharpApis": ["SKCanvas.DrawImageRect"], "sampleStatus": "none"}, {"file": "drawquadset.cpp", "name": "Draw Quad Set (GPU)", "description": "GPU-only test for experimental_DrawEdgeAAQuad and fillRectWithEdgeAA with gradient/color tiles under various transforms.", "interesting": "low", "apis_available": false, "missing_apis": ["experimental_DrawEdgeAAQuad", "SurfaceDrawContext::fillRectWithEdgeAA"], "key_apis": ["experimental_DrawEdgeAAQuad", "SurfaceDrawContext::fillRectWithEdgeAA", "GrQuadAAFlags"], "notes": "GPU-only; uses experimental and Ganesh-internal APIs", "visualGoal": "Grid of colored quads with edge AA under identity, translate, rotate, skew, and perspective transforms.", "suggestedControls": [], "category": "GPU", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "drawregion.cpp", "name": "Draw Region Checkerboard", "description": "Draws a checkerboard-pattern SkRegion built from 1×1 pixel union operations.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRegion", "SkRegion::op"], "notes": "Simple but demonstrates SkRegion drawing capability", "visualGoal": "A checkerboard pattern drawn using an SkRegion composed of 1×1 pixel rects.", "suggestedControls": ["Grid size slider", "Color picker"], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawRegion", "SKRegion"], "sampleStatus": "none"}, {"file": "drawregionmodes.cpp", "name": "Draw Region with Paint Effects", "description": "Draws an L-shaped region with various paint effects: image filter blur, mask filter blur, dash path effect, and gradient shader.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRegion", "SkImageFilters::Blur", "SkMaskFilter::MakeBlur", "SkDashPathEffect::Make"], "notes": "Good demo of combining regions with various paint effects", "visualGoal": "An L-shaped region drawn four times with blur, mask blur, dashing, and gradient effects.", "suggestedControls": ["Effect type selector", "Blur sigma slider"], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawRegion", "SKImageFilter.CreateBlur", "SKMaskFilter.CreateBlur", "SKPathEffect.CreateDash"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "dropshadowimagefilter.cpp", "name": "Drop Shadow Image Filter", "description": "Tests SkImageFilters::DropShadow and DropShadowOnly on paint, path, text, and bitmap with various offsets, sigma, crop rects, and color filters.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::DropShadow", "SkImageFilters::DropShadowOnly", "SkImageFilters::ColorFilter", "SkCanvas::saveLayer"], "notes": "Excellent drop shadow demo; comprehensive coverage of shadow parameters and content types", "visualGoal": "Rows of shapes (rect, path, text, bitmap) with drop shadows at varying offsets and blur radii, plus shadow-only variants.", "suggestedControls": ["Shadow offset X/Y sliders", "Shadow sigma slider", "Shadow color picker", "Shadow-only toggle"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateDropShadow", "SKImageFilter.CreateDropShadowOnly", "SKCanvas.SaveLayer"], "sampleStatus": "none"}, {"file": "drrect.cpp", "name": "Double Round Rect Combinations", "description": "Draws all combinations of outer (rect/oval/roundrect) and inner (empty/rect/oval/roundrect) double round rects.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawDRRect", "SkRRect::setRectRadii", "SkRRect::setOval"], "notes": "Good reference for drawDRRect (drawRoundRectDifference in SkiaSharp) with all shape combos", "visualGoal": "A grid showing all outer×inner round rect type combinations creating ring-like and frame-like shapes.", "suggestedControls": ["Outer shape type selector", "Inner shape type selector", "Corner radii sliders"], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawRoundRectDifference", "SKRoundRect"], "sampleStatus": "none"}, {"file": "drrect_small_inner.cpp", "name": "Double Round Rect Small Inner Oval", "description": "Tests drawDRRect with very small inner ovals (radii down to 0.01px) exercising GPU fast-path edge cases.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawDRRect", "SkRRect::MakeOval"], "notes": "Edge case test for very small inner radii in double round rects", "visualGoal": "Ring shapes with progressively smaller inner ovals approaching zero radius.", "suggestedControls": [], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawRoundRectDifference", "SKRoundRect"], "sampleStatus": "none"}, {"file": "dstreadshuffle.cpp", "name": "Destination Read Shuffle Blend", "description": "Renders overlapping shapes with kColorBurn blend mode to test GPU destination-read operation combining.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkBlendMode::kColorBurn", "SkCanvas::drawCircle", "SkCanvas::drawRoundRect", "SkCanvas::drawPath"], "notes": "GPU rendering correctness test for dst-read blending; not visually interesting", "visualGoal": "Overlapping circles, round rects, and paths with color burn blending on an offscreen surface.", "suggestedControls": [], "category": "Rendering", "skiaSharpApis": ["SKBlendMode.ColorBurn", "SKCanvas.DrawCircle", "SKCanvas.DrawRoundRect"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "ducky_yuv_blend.cpp", "name": "Bug Regression: YUV Image Blend Modes", "description": "Tests blending a JPEG image over a PNG using all non-coefficient blend modes; regression for skbug.com/40040948 with YUV planes.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImageRect", "SkBlendMode"], "notes": "Bug regression test for YUV image blending; GPU YUV path is specific to Ganesh", "visualGoal": "Grid of duck image blended over ducky PNG using various non-coefficient blend modes.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawImageRect", "SKBlendMode"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "emboss.cpp", "name": "Emboss Mask Filter", "description": "Tests SkEmbossMaskFilter on images, stroked circles, and text with various directions, blend modes, and color filters.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkEmbossMaskFilter"], "key_apis": ["SkEmbossMaskFilter::Make", "SkColorFilters::Blend", "SkMaskFilter"], "notes": "Emboss mask filter not exposed in SkiaSharp; could be interesting visual effect if added", "visualGoal": "Images, circles, and text with emboss effect applied at various light directions and intensities.", "suggestedControls": ["Light direction sliders (X/Y/Z)", "Ambient/Specular sliders", "Blur sigma slider"], "category": "Mask Filters", "skiaSharpApis": ["SKMaskFilter"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "emptypath.cpp", "name": "Empty Path Rendering", "description": "Tests rendering of empty paths with all fill types and styles, plus degenerate move/close/line paths.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathFillType", "SkPaint::Style"], "notes": "Edge case test for empty/degenerate path rendering; not visually interesting", "visualGoal": "Grid of empty and degenerate paths rendered with various fill types and stroke styles, mostly showing nothing or minimal marks.", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.FillType", "SKPaint.Style"], "sampleStatus": "none"}, {"file": "emptyshader.cpp", "name": "Empty and Degenerate Shaders", "description": "Tests that empty shader and degenerate gradients (zero-radius radial, coincident points, etc.) produce transparent output.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::RadialGradient", "SkShaders::LinearGradient", "SkShaders::SweepGradient"], "notes": "Edge case test for shader degenerate inputs; not visually interesting", "visualGoal": "Grid showing that degenerate gradient shaders produce transparent/empty output.", "suggestedControls": [], "category": "Shaders", "skiaSharpApis": ["SKShader.CreateRadialGradient", "SKShader.CreateLinearGradient", "SKShader.CreateSweepGradient"], "sampleStatus": "similar", "matchedSample": "Gradient"}, {"file": "encode.cpp", "name": "Image Encode PNG/JPEG", "description": "Encodes a mandrill image to PNG and JPEG, decodes both, and draws side-by-side to verify visual identity.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPngEncoder::Encode", "SkJpegEncoder::Encode", "SkImages::DeferredFromEncodedData"], "notes": "Basic encode/decode roundtrip test; not visually interesting for gallery", "visualGoal": "Three mandrill images side by side: original, PNG-encoded, and JPEG-encoded.", "suggestedControls": [], "category": "Encoding", "skiaSharpApis": ["SKImage.Encode", "SKData", "SKImage.FromEncodedData"], "sampleStatus": "similar", "matchedSample": "Image Decoder"}, {"file": "encode_alpha_jpeg.cpp", "name": "JPEG Alpha Encoding Options", "description": "Tests JPEG encoding with AlphaOption::kIgnore vs kBlendOnBlack across premul/unpremul N32 and F16 pixel formats.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkJpegEncoder::Encode", "SkJpegEncoder::AlphaOption"], "notes": "JPEG alpha handling test; specialized encoding topic", "visualGoal": "Grid of JPEG-encoded images showing different alpha handling options across pixel formats.", "suggestedControls": [], "category": "Encoding", "skiaSharpApis": ["SKImage.Encode"], "sampleStatus": "existing", "matchedSample": "Image Decoder"}, {"file": "encode_color_types.cpp", "name": "WebP Encoding Color Types", "description": "Encodes images across many color/alpha types to WebP (lossy and lossless), then decodes and draws original vs encoded pairs.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkWebpEncoder::Encode", "SkImages::DeferredFromEncodedData"], "notes": "WebP encoding across color types test; specialized encoding topic", "visualGoal": "Grid of original vs WebP-encoded image pairs across many color type combinations.", "suggestedControls": [], "category": "Encoding", "skiaSharpApis": ["SKImage.Encode", "SKEncodedImageFormat.Webp"], "sampleStatus": "similar", "matchedSample": "Image Decoder"}, {"file": "encode_platform.cpp", "name": "Platform Encoding PNG/JPEG/WebP", "description": "Encodes opaque, premul, and unpremul bitmaps to PNG, JPEG, and WebP, then decodes and draws in a grid.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPngEncoder::Encode", "SkJpegEncoder::Encode", "SkWebpEncoder::Encode"], "notes": "Platform encoding roundtrip test across formats and alpha types", "visualGoal": "Grid of bitmaps encoded to and decoded from PNG, JPEG, and WebP with different alpha types.", "suggestedControls": [], "category": "Encoding", "skiaSharpApis": ["SKImage.Encode", "SKEncodedImageFormat"], "sampleStatus": "similar", "matchedSample": "Image Decoder"}, {"file": "encode_srgb.cpp", "name": "sRGB Encoding Across Color Types", "description": "Tests encoding across color types, alpha types, and with/without sRGB color space for PNG/JPEG/WebP.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPngEncoder", "SkJpegEncoder", "SkWebpEncoder", "SkColorSpace::MakeSRGB"], "notes": "sRGB color space encoding test; specialized topic", "visualGoal": "Grid of images encoded with and without sRGB color space across multiple formats and color types.", "suggestedControls": [], "category": "Encoding", "skiaSharpApis": ["SKImage.Encode", "SKColorSpace.CreateSrgb"], "sampleStatus": "similar", "matchedSample": "Image Decoder"}, {"file": "exoticformats.cpp", "name": "Exotic Compressed Texture Formats", "description": "GPU-only test loading ETC1 (KTX) and BC1 (DDS) compressed textures and creating GPU texture images.", "interesting": "low", "apis_available": false, "missing_apis": ["GrDirectContext", "SkImages::TextureFromCompressedTextureData"], "key_apis": ["GrDirectContext", "SkImages::TextureFromCompressedTextureData", "SkTextureCompressionType"], "notes": "GPU-only; compressed texture loading not relevant to SkiaSharp", "visualGoal": "Compressed texture images (ETC1 and BC1) loaded from KTX and DDS files.", "suggestedControls": [], "category": "GPU", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "fadefilter.cpp", "name": "Fade Color Matrix Filter", "description": "Applies a color matrix image filter that adds 0.5 to RGB channels, creating a fade/brighten effect.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkColorFilters::Matrix", "SkImageFilters::ColorFilter"], "notes": "Simple but demonstrates color matrix as image filter for fade/brighten effect", "visualGoal": "A rectangle with a color matrix filter that brightens/fades all colors by adding to RGB channels.", "suggestedControls": ["Fade amount slider (0-1)", "Channel selection toggles (R/G/B)"], "category": "Color Filters", "skiaSharpApis": ["SKColorFilter.CreateColorMatrix", "SKImageFilter.CreateColorFilter"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "fatpathfill.cpp", "name": "Fat Path Fill Visualization", "description": "Zooms into pixel-level rendering of FillPathWithPaint to visualize the filled geometry of stroked diagonal lines at large scale.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["skpathutils::FillPathWithPaint", "SkPath::Line", "SkSurface"], "notes": "Educational for understanding how stroke-to-fill conversion works at pixel level", "visualGoal": "Zoomed-in pixel grid showing the exact fill geometry produced by stroking diagonal lines.", "suggestedControls": ["Stroke width slider", "Line angle slider", "Zoom level slider"], "category": "Paths", "skiaSharpApis": ["SKPaint.GetFillPath", "SKPath", "SKSurface"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "fiddle.cpp", "name": "Fiddle Stub", "description": "Empty stub GM for pasting fiddle.skia.org code; draws nothing by default.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": [], "notes": "Empty placeholder GM; no visual output", "visualGoal": "Empty canvas - this is a placeholder for fiddle.skia.org code snippets.", "suggestedControls": [], "category": "Utility", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "fillrect_gradient.cpp", "name": "Fill Rect with Gradients", "description": "Creates linear and radial gradients matching Chromium test cases, showing various color stop configurations including disjoint and unsorted stops.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient", "SkShaders::RadialGradient", "SkCanvas::drawRect"], "visualGoal": "A grid of small rectangles showing linear (left) and radial (right) gradients with various color stop configurations.", "suggestedControls": [], "category": "Gradients", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKShader.CreateRadialGradient", "SKCanvas.DrawRect"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "filltypes.cpp", "name": "Path Fill Types", "description": "Demonstrates the four path fill types (Winding, EvenOdd, InverseWinding, InverseEvenOdd) with overlapping circles.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathFillType", "SkCanvas::drawPath", "SkPathBuilder::addCircle"], "visualGoal": "A 4x4 grid of overlapping circles rendered with different fill types and anti-aliasing settings.", "suggestedControls": ["Fill type selector", "Anti-alias toggle", "Scale slider"], "category": "Paths", "skiaSharpApis": ["SKPath.FillType", "SKCanvas.DrawPath", "SKPath.AddCircle"], "sampleStatus": "none"}, {"file": "filltypespersp.cpp", "name": "Path Fill Types with Perspective", "description": "Same as filltypes but with perspective transforms and gradient-shaded paths.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathFillType", "SkMatrix::setPerspX", "SkShaders::RadialGradient"], "visualGoal": "Overlapping circles with gradient fills rendered under perspective transformation.", "suggestedControls": ["Perspective X/Y sliders"], "category": "Paths", "skiaSharpApis": ["SKPath.FillType", "SKMatrix", "SKShader.CreateRadialGradient"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "filterbug.cpp", "name": "Filter Bug Regression", "description": "Reproduces crbug.com/673261 testing image shader filtering at specific coordinates.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage::makeShader", "SkCanvas::drawRect"], "visualGoal": "Three stacked rectangles with image shader tiling to verify filtering correctness.", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKImage.ToShader", "SKCanvas.DrawRect"], "sampleStatus": "none"}, {"file": "filterfastbounds.cpp", "name": "Image Filter Fast Bounds", "description": "Visualizes computed fast bounds for various image filters applied to different geometry types.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkImageFilters::DropShadow", "SkImageFilters::Offset", "SkPaint::computeFastBounds"], "visualGoal": "Grid showing geometry with image filters, with red outlines for original bounds and blue for computed fast bounds.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKImageFilter.CreateDropShadow", "SKImageFilter.CreateOffset"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "filterindiabox.cpp", "name": "Filter India Box", "description": "Tests image scaling with different sampling modes (none, linear, mipmap, cubic) on a small box image.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkSamplingOptions", "SkCubicResampler"], "visualGoal": "Rows of scaled/rotated images showing different filter quality modes.", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKSamplingOptions"], "sampleStatus": "none"}, {"file": "flippity.cpp", "name": "Flippity Image Transforms", "description": "Tests drawImage with unusual flip and rotation matrices, including GPU surface origin handling.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkCanvas::drawImageRect", "SkMatrix"], "visualGoal": "Grid of images with corner labels showing correct orientation under various flip/rotate transforms.", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.DrawImageRect", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "fontations.cpp", "name": "Fontations Typeface", "description": "Tests Fontations font backend with variable fonts and font metadata extraction.", "interesting": "low", "apis_available": false, "missing_apis": ["SkTypeface_Make_Fontations"], "key_apis": ["SkTypeface_Make_Fontations", "SkFont", "SkCanvas::drawSimpleText"], "visualGoal": "Text rendered at various sizes using the Fontations backend with variable font support.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKTypeface", "SKFont", "SKCanvas.DrawText"], "sampleStatus": "similar", "matchedSample": "Variable Fonts"}, {"file": "fontations_ft_compare.cpp", "name": "Fontations vs FreeType Compare", "description": "Compares Fontations and FreeType font rendering backends side by side.", "interesting": "low", "apis_available": false, "missing_apis": ["SkTypeface_Make_Fontations"], "key_apis": ["SkTypeface_Make_Fontations", "SkFont"], "visualGoal": "Side-by-side comparison of text rendered by Fontations and FreeType backends.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKTypeface", "SKFont"], "sampleStatus": "similar", "matchedSample": "Text Lab"}, {"file": "fontcache.cpp", "name": "Font Cache Stress Test", "description": "Stresses the GPU font cache by drawing many text strings at various sizes and styles.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawString", "SkFont", "GrContextOptions"], "visualGoal": "Dense field of text at various sizes filling the canvas to stress font atlas management.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawText", "SKFont", "SKTypeface"], "sampleStatus": "none"}, {"file": "fontmgr.cpp", "name": "Font Manager Explorer", "description": "Iterates through system font families, showing styles and character fallback across font managers.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkFontMgr", "SkFontStyleSet", "SkFont::getBounds"], "visualGoal": "Comprehensive listing of font families with their styles, glyph bounds, and metrics visualization.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKFontManager", "SKTypeface", "SKFont"], "sampleStatus": "none"}, {"file": "fontregen.cpp", "name": "Font Regeneration Test", "description": "Tests TextBlob regeneration and GPU font cache behavior when atlas is full.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkTextBlob", "SkCanvas::drawTextBlob"], "visualGoal": "Text blobs drawn before and after GPU flush to verify font atlas regeneration.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKTextBlob", "SKCanvas.DrawTextBlob"], "sampleStatus": "none"}, {"file": "fontscaler.cpp", "name": "Font Scaler", "description": "Draws text at various sizes with sub-pixel rendering, hinting, and rotation.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkFont", "SkCanvas::drawSimpleText", "SkCanvas::rotate"], "visualGoal": "Columns of rotated text at increasing sizes demonstrating font rendering quality.", "suggestedControls": ["Font size slider", "Rotation angle", "Hinting mode"], "category": "Text", "skiaSharpApis": ["SKFont", "SKCanvas.DrawText", "SKCanvas.RotateDegrees"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "fontscalerdistortable.cpp", "name": "Variable Font Scaler", "description": "Renders variable (distortable) fonts at different weight axis values across a grid.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkTypeface::makeClone", "SkFontArguments::VariationPosition", "SkFont"], "visualGoal": "Grid of text samples at varying font weights from thin to bold using variable font axes.", "suggestedControls": ["Weight axis slider", "Font size slider", "Rotation angle"], "category": "Text", "skiaSharpApis": ["SKTypeface", "SKFontStyleSet", "SKFont"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "fp_sample_chaining.cpp", "name": "Fragment Processor Sample Chaining", "description": "Tests GPU fragment processor coordinate transformation chains using internal Ganesh APIs.", "interesting": "low", "apis_available": false, "missing_apis": ["GrFragmentProcessor", "GrTextureEffect", "SurfaceDrawContext"], "key_apis": ["GrFragmentProcessor", "GrTextureEffect", "GrMatrixEffect"], "visualGoal": "Grid of colored rectangles showing different fragment processor sampling transformations.", "suggestedControls": [], "category": "GPU Internals", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "fpcoordinateoverride.cpp", "name": "FP Coordinate Override", "description": "Tests GPU fragment processor with explicit coordinate overrides using sk_FragCoord.", "interesting": "low", "apis_available": false, "missing_apis": ["GrFragmentProcessor", "SurfaceFillContext"], "key_apis": ["GrFragmentProcessor", "GrTextureEffect", "SurfaceFillContext::fillWithFP"], "visualGoal": "A mandrill image blended with its vertically-flipped version.", "suggestedControls": [], "category": "GPU Internals", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "fwidth_squircle.cpp", "name": "fwidth() Squircle", "description": "Tests GPU shader derivative (fwidth) by drawing an anti-aliased squircle shape using custom geometry processor.", "interesting": "low", "apis_available": false, "missing_apis": ["GrGeometryProcessor", "GrDrawOp", "SurfaceDrawContext"], "key_apis": ["GrGeometryProcessor", "fwidth", "GrDrawOp"], "visualGoal": "A smooth anti-aliased squircle (superellipse) shape rendered with custom GPU shader.", "suggestedControls": [], "category": "GPU Internals", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "gammatext.cpp", "name": "Gamma Corrected Text", "description": "Draws text in various colors over a gradient background to test gamma-correct text rendering.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawString", "SkShaders::LinearGradient", "SkFont"], "visualGoal": "Colorful text columns over a black-to-white gradient, testing text rendering against various backgrounds.", "suggestedControls": ["Text color picker", "Background gradient"], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawText", "SKShader.CreateLinearGradient", "SKFont"], "sampleStatus": "similar", "matchedSample": "Gradient"}, {"file": "getpostextpath.cpp", "name": "Get Text Path", "description": "Extracts paths from text glyphs and renders them with stroke overlays.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkFont", "SkTextBlob::MakeFromPosText", "SkPath"], "visualGoal": "Text rendered normally with red stroked outlines showing the extracted glyph paths.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKFont", "SKTextBlob", "SKPath"], "sampleStatus": "similar", "matchedSample": "Text Lab"}, {"file": "giantbitmap.cpp", "name": "Giant Bitmap Tiling", "description": "Tests bitmap shader precision when scaling very large images with different tile modes.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap::makeShader", "SkTileMode", "SkCanvas::drawPaint"], "visualGoal": "Full-canvas tiled bitmap patterns with clamp/repeat/mirror modes and optional filtering/rotation.", "suggestedControls": ["Tile mode selector", "Filter toggle", "Rotation toggle"], "category": "Images", "skiaSharpApis": ["SKBitmap.ToShader", "SKShaderTileMode", "SKCanvas.DrawPaint"], "sampleStatus": "none"}, {"file": "glyph_pos.cpp", "name": "Glyph Position Accuracy", "description": "Tests hairline vs non-hairline text stroke rendering with measurement visualization.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkFont::measureText", "SkCanvas::drawSimpleText", "SkFont::getWidthsBounds"], "visualGoal": "Text rendered with green measured bounds, red advance lines, and magenta character positions.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKFont", "SKCanvas.DrawText", "SKPaint"], "sampleStatus": "existing", "matchedSample": "Text Lab"}, {"file": "gm.cpp", "name": "GM Framework Base", "description": "Base class implementation for Skia Golden Master tests - not a visual sample.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["skiagm::GM"], "visualGoal": "Not a visual sample - this is the GM framework infrastructure code.", "suggestedControls": [], "category": "Infrastructure", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "gpu_blur_utils.cpp", "name": "GPU Blur Utilities", "description": "Tests internal GPU blur utility functions with various sigma values and tile modes.", "interesting": "low", "apis_available": false, "missing_apis": ["skgpu::BlurUtils", "SurfaceDrawContext"], "key_apis": ["skgpu::BlurUtils", "GrRecordingContext", "SurfaceDrawContext"], "visualGoal": "Grid of progressively blurred gradient circles using internal GPU blur utilities.", "suggestedControls": [], "category": "GPU Internals", "skiaSharpApis": [], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "gradient_dirty_laundry.cpp", "name": "Gradient Dirty Laundry", "description": "Tests gradient rendering with many color stops (40 colors) across linear, radial, and sweep modes.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient", "SkShaders::RadialGradient", "SkShaders::SweepGradient"], "visualGoal": "Three gradient squares showing linear, radial, and sweep gradients with 40 color stops.", "suggestedControls": ["Gradient type selector", "Number of stops slider"], "category": "Gradients", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKShader.CreateRadialGradient", "SKShader.CreateSweepGradient"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "gradient_matrix.cpp", "name": "Gradient Matrix Transforms", "description": "Tests gradient rendering with non-uniform matrix scaling to verify correct axis handling.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient", "SkShaders::RadialGradient", "SkMatrix::setScale"], "visualGoal": "Grid of gradient-filled rectangles with various point configurations and matrix transforms.", "suggestedControls": [], "category": "Gradients", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKShader.CreateRadialGradient", "SKMatrix"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "gradients.cpp", "name": "Comprehensive Gradients", "description": "Extensive test of all gradient types with various configurations, tile modes, and edge cases.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient", "SkShaders::RadialGradient", "SkShaders::SweepGradient", "SkShaders::TwoPointConicalGradient"], "visualGoal": "Large grid showcasing every gradient type with different color counts, tile modes, and configurations.", "suggestedControls": ["Gradient type", "Tile mode", "Color count", "Dither toggle"], "category": "Gradients", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKShader.CreateRadialGradient", "SKShader.CreateSweepGradient", "SKShader.CreateTwoPointConicalGradient"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "gradients_2pt_conical.cpp", "name": "Two-Point Conical Gradients", "description": "Comprehensive test of two-point conical gradients with inside/outside/edge configurations and various tile modes.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::TwoPointConicalGradient"], "visualGoal": "Large grid of two-point conical gradients showing various center/radius configurations across tile modes.", "suggestedControls": ["Configuration type", "Tile mode", "Dither toggle"], "category": "Gradients", "skiaSharpApis": ["SKShader.CreateTwoPointConicalGradient"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "gradients_degenerate.cpp", "name": "Degenerate Gradients", "description": "Tests edge cases of gradients with zero-length, zero-radius, and coincident parameters across tile modes.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient", "SkShaders::RadialGradient", "SkShaders::SweepGradient", "SkShaders::TwoPointConicalGradient"], "visualGoal": "Grid showing degenerate gradient behavior across decal/repeat/mirror/clamp tile modes.", "suggestedControls": ["Gradient type", "Tile mode"], "category": "Gradients", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKShader.CreateRadialGradient", "SKShader.CreateSweepGradient", "SKShader.CreateTwoPointConicalGradient"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "gradients_no_texture.cpp", "name": "Gradients Without Texture", "description": "Tests gradient rendering with 1-4 color stops and many-color gradients, with and without dithering.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient", "SkShaders::RadialGradient", "SkShaders::SweepGradient"], "visualGoal": "Grid of small gradient squares with varying stop counts and alpha, plus long horizontal gradients.", "suggestedControls": ["Dither toggle", "Alpha slider"], "category": "Gradients", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKShader.CreateRadialGradient", "SKShader.CreateSweepGradient"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "gradtext.cpp", "name": "Gradient Text", "description": "Renders text with gradient shaders, testing transparent and opaque gradient text with various edge modes.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawString", "SkShaders::LinearGradient", "SkFont"], "visualGoal": "Text rendered with gradient fills in alias, anti-alias, and sub-pixel modes.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawText", "SKShader.CreateLinearGradient", "SKFont"], "sampleStatus": "similar", "matchedSample": "Gradient"}, {"file": "graphite_replay.cpp", "name": "Graphite Replay", "description": "Tests Graphite backend recording replay with tiled rendering and animation.", "interesting": "low", "apis_available": false, "missing_apis": ["skgpu::graphite::Recorder", "skgpu::graphite::Recording"], "key_apis": ["skgpu::graphite::Recorder", "skgpu::graphite::Recording"], "visualGoal": "Tiled grid of images and gradients replayed from a Graphite recording.", "suggestedControls": [], "category": "GPU Internals", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "graphitestart.cpp", "name": "Graphite Bootstrap", "description": "Bootstrapping GM for Graphite backend testing various rendering primitives.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkShaders::Blend", "SkColorFilters::Matrix"], "visualGoal": "3x3 grid of tiles with image shaders, gradients, color filters, blend modes, and compositing.", "suggestedControls": [], "category": "GPU Internals", "skiaSharpApis": ["SKCanvas.DrawRect", "SKShader", "SKColorFilter"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "grayscalejpg.cpp", "name": "Grayscale JPEG Decode", "description": "Tests decoding and displaying a grayscale JPEG image.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage", "SkCanvas::drawImage"], "visualGoal": "A grayscale JPEG image decoded and drawn to canvas.", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKImage", "SKCanvas.DrawImage"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "hairlines.cpp", "name": "Hairline Rendering", "description": "Comprehensive test of hairline and thin stroke rendering for various path types including lines, quads, cubics, and arcs.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPaint::kStroke_Style", "SkPathBuilder"], "visualGoal": "Dense grid of thin stroked paths at various widths and alpha values.", "suggestedControls": ["Stroke width slider", "Anti-alias toggle", "Cap style selector"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPaint", "SKPath"], "sampleStatus": "none"}, {"file": "hairmodes.cpp", "name": "Hairline Blend Modes", "description": "Tests hairline strokes with all Porter-Duff blend modes, drawing radial lines over an oval.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkBlendMode", "SkCanvas::drawLine", "SkCanvas::drawOval"], "visualGoal": "Grid of blue ovals with red hairline spokes showing different blend mode interactions.", "suggestedControls": ["Blend mode selector", "Alpha slider"], "category": "Blend Modes", "skiaSharpApis": ["SKBlendMode", "SKCanvas.DrawLine", "SKCanvas.DrawOval"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "hardstop_gradients.cpp", "name": "Hard Stop Gradients", "description": "Tests gradients with hard stops (coincident color positions) in 8 different configurations across 3 tile modes.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient"], "visualGoal": "8x3 grid of gradient rectangles showing hard stop behaviors across clamp/repeat/mirror tile modes.", "suggestedControls": ["Tile mode selector", "Hard stop position slider"], "category": "Gradients", "skiaSharpApis": ["SKShader.CreateLinearGradient"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "hardstop_gradients_many.cpp", "name": "Many Hard Stop Gradients", "description": "Tests gradients with increasing numbers of hard stops from 1 to 100.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient"], "visualGoal": "100 horizontal gradient bars with progressively more blue-white repetitions per row.", "suggestedControls": ["Number of hard stops slider"], "category": "Gradients", "skiaSharpApis": ["SKShader.CreateLinearGradient"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "hdr_pip_blur.cpp", "name": "HDR Picture-in-Picture Blur", "description": "Emulates Android HDR mode with SDR background, HDR PiP video, and blur overlay.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkColorSpace::MakeRGB", "SkColorFilters::Matrix", "SkImages::MakeWithFilter"], "visualGoal": "A photo background with an HDR PiP window overlaid by a blurred shade.", "suggestedControls": ["Blur sigma slider", "PiP position", "HDR transfer function"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKColorSpace", "SKColorFilter.CreateColorMatrix"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "hello_bazel_world.cpp", "name": "Hello Bazel World", "description": "Simple test GM for Bazel build system experiments, draws centered text.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawSimpleText", "SkFont"], "visualGoal": "Centered red text reading Hello Bazel world.", "suggestedControls": [], "category": "Infrastructure", "skiaSharpApis": ["SKCanvas.DrawText", "SKFont"], "sampleStatus": "none"}, {"file": "highcontrastfilter.cpp", "name": "High Contrast Filter", "description": "Demonstrates high contrast color filter with invert brightness/lightness, grayscale, and contrast adjustment.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkHighContrastFilter::Make", "SkColorFilter", "SkShaders::LinearGradient"], "visualGoal": "2x4 grid showing scenes with different high contrast configurations.", "suggestedControls": ["Invert style selector", "Grayscale toggle", "Contrast slider (-1 to 1)"], "category": "Color Filters", "skiaSharpApis": ["SKHighContrastFilter", "SKColorFilter", "SKShader.CreateLinearGradient"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "hittestpath.cpp", "name": "Path Hit Testing", "description": "Visualizes SkPath::contains() hit testing by drawing colored dots inside/outside a random path.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPath::contains", "SkCanvas::drawPoint", "SkCanvas::drawPath"], "visualGoal": "Random path outline with blue dots marking points that pass the contains() test.", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKPath.Contains", "SKCanvas.DrawPoint", "SKCanvas.DrawPath"], "sampleStatus": "none"}, {"file": "hsl.cpp", "name": "HSL Blend Modes", "description": "Tests HSL blend modes (Hue, Saturation, Color, Luminosity) with reference calculations and duck image.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkBlendMode::kHue", "SkBlendMode::kSaturation", "SkBlendMode::kColor", "SkBlendMode::kLuminosity"], "visualGoal": "Row of squares showing HSL blend modes with verification circles, plus duck image with gradient blends.", "suggestedControls": ["Blend mode selector", "Source alpha slider"], "category": "Blend Modes", "skiaSharpApis": ["SKBlendMode", "SKCanvas.DrawRect", "SKCanvas.DrawImage"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "hugepath.cpp", "name": "Huge Path Rendering", "description": "Tests rendering of paths with extreme coordinates and very large surfaces.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPath", "SkCanvas::drawPath", "SkSurfaces::Raster"], "visualGoal": "Small clipped views of paths drawn on very large surfaces.", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKPath", "SKCanvas.DrawPath", "SKSurface"], "sampleStatus": "none"}, {"file": "image.cpp", "name": "Image Operations", "description": "Comprehensive test of image creation, encoding, subsets, color types, and drawing modes.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage", "SkCanvas::drawImage", "SkSurface"], "visualGoal": "Grid of images showing various creation methods, color types, and encode/decode round-trips.", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKImage", "SKCanvas.DrawImage", "SKSurface"], "sampleStatus": "none"}, {"file": "image_pict.cpp", "name": "Image from Picture", "description": "Tests creating images from picture recordings with various generators and caching strategies.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPictureRecorder", "SkImages::DeferredFromPicture", "SkImageGenerator"], "visualGoal": "Rows of picture-derived images at different scales.", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKPictureRecorder", "SKImage", "SKPicture"], "sampleStatus": "none"}, {"file": "image_shader.cpp", "name": "Image as Shader", "description": "Tests using images as tiling shaders from various sources with different sampling options.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage::makeShader", "SkTileMode", "SkCanvas::drawCircle"], "visualGoal": "Images drawn directly and as repeating tiled shaders filling circles.", "suggestedControls": ["Tile mode selector", "Filter mode", "Mipmap mode"], "category": "Images", "skiaSharpApis": ["SKImage.ToShader", "SKShaderTileMode", "SKCanvas.DrawCircle"], "sampleStatus": "none"}, {"file": "imageblur.cpp", "name": "Image Blur", "description": "Applies Gaussian blur image filter to randomly placed colored text strings.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkCanvas::saveLayer"], "visualGoal": "Random colored text with Gaussian blur on a black background.", "suggestedControls": ["Sigma X slider", "Sigma Y slider"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKCanvas.SaveLayer"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "imageblur2.cpp", "name": "Image Blur Matrix", "description": "Tests blur at a matrix of sigma combinations from 0 to 80.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur"], "visualGoal": "6x6 grid of text cells with different X/Y blur sigma combinations.", "suggestedControls": ["Sigma X slider", "Sigma Y slider"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "imageblurclampmode.cpp", "name": "Image Blur Clamp Mode", "description": "Tests blur image filter with kClamp tile mode at various sigma values.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkTileMode::kClamp"], "visualGoal": "Grid of blurred images at increasing sigma values in clamp mode.", "suggestedControls": ["Sigma slider", "Direction toggle"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "imageblurrepeatmode.cpp", "name": "Image Blur Repeat Mode", "description": "Tests blur image filter with kRepeat tile mode on striped patterns.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkTileMode::kRepeat"], "visualGoal": "Grid of blurred colorful stripe patterns with repeat tiling.", "suggestedControls": ["Sigma slider", "Direction toggle"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "imageblurtiled.cpp", "name": "Image Blur Tiled", "description": "Tests blur filter rendered in tiles to verify seamless tiling.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkCanvas::clipRect", "SkCanvas::saveLayer"], "visualGoal": "Text blurred through tiled saveLayer calls.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKCanvas.ClipRect", "SKCanvas.SaveLayer"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "imagedither.cpp", "name": "Image Dithering", "description": "Tests whether image draws and image shaders respect the dither paint flag.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkPaint::setDither", "SkImage::makeShader"], "visualGoal": "Four gradient squares showing dithered vs non-dithered rendering.", "suggestedControls": ["Dither toggle"], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKPaint", "SKImage.ToShader"], "sampleStatus": "none"}, {"file": "imagefilters.cpp", "name": "Image Filters with Blend Modes", "description": "Tests image filters combined with blend modes, save layers, backdrop filters, and multiple filter composition.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkImageFilters::Dilate", "SkImageFilters::MatrixConvolution", "SkImageFilters::ColorFilter", "SkCanvas::saveLayer"], "visualGoal": "Complex scenes with overlapping shapes using image filters and backdrop filters at multiple scales.", "suggestedControls": ["Filter type", "Scale slider"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKImageFilter.CreateDilate", "SKImageFilter.CreateMatrixConvolution", "SKCanvas.SaveLayer"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "imagefiltersbase.cpp", "name": "Image Filters Base", "description": "Tests various image filters applied to different drawing primitives.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkImageFilters::DropShadow", "SkImageFilters::Offset", "SkImageFilters::ColorFilter"], "visualGoal": "Grid of drawing primitives each rendered with different image filters.", "suggestedControls": ["Filter type selector", "Primitive type selector"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKImageFilter.CreateDropShadow", "SKImageFilter.CreateOffset", "SKImageFilter.CreateColorFilter"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "imagefiltersclipped.cpp", "name": "Image Filters Clipped", "description": "Tests image filters rendered with clip rects at varying offsets.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkImageFilters::DropShadow", "SkImageFilters::DisplacementMap", "SkImageFilters::Dilate", "SkImageFilters::Erode"], "visualGoal": "Rows of filtered circles clipped at different offsets.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKImageFilter.CreateDropShadow", "SKImageFilter.CreateDisplacementMap", "SKImageFilter.CreateDilate"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "imagefilterscropexpand.cpp", "name": "Image Filters Crop Expand", "description": "Tests image filters with expanding crop rects on a checkerboard source.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::ColorFilter", "SkImageFilters::Blur", "SkImageFilters::Dilate", "SkImageFilters::Erode", "SkImageFilters::DropShadow"], "visualGoal": "Rows of filtered checkerboard images with expanding crop boundaries.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKImageFilter.CreateDilate", "SKImageFilter.CreateErode", "SKImageFilter.CreateDropShadow"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "imagefilterscropped.cpp", "name": "Image Filters Cropped", "description": "Tests image filters with crop rects applied to different draw primitives.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::ColorFilter", "SkImageFilters::Blur", "SkImageFilters::Erode", "SkImageFilters::Merge"], "visualGoal": "Grid of drawing primitives with various cropped image filters on checkerboard.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateColorFilter", "SKImageFilter.CreateBlur", "SKImageFilter.CreateErode", "SKImageFilter.CreateMerge"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "imagefiltersgraph.cpp", "name": "Image Filter Graph", "description": "Tests complex image filter DAGs with chained blur, erode, color filter, dilate, blend, and convolution.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkImageFilters::Erode", "SkImageFilters::ColorFilter", "SkImageFilters::Dilate", "SkImageFilters::Blend", "SkImageFilters::Arithmetic", "SkImageFilters::MatrixConvolution"], "visualGoal": "Row of images showing progressively complex filter graph compositions.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKImageFilter.CreateErode", "SKImageFilter.CreateColorFilter", "SKImageFilter.CreateDilate", "SKImageFilter.CreateBlendMode", "SKImageFilter.CreateArithmetic", "SKImageFilter.CreateMatrixConvolution"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "imagefiltersscaled.cpp", "name": "Image Filters Scaled", "description": "Tests image filters at different canvas scale factors.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkImageFilters::DropShadow", "SkImageFilters::DisplacementMap", "SkImageFilters::Dilate"], "visualGoal": "Rows of filtered circles at multiple scales.", "suggestedControls": ["Scale slider"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKImageFilter.CreateDropShadow", "SKImageFilter.CreateDisplacementMap", "SKImageFilter.CreateDilate"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "imagefiltersstroked.cpp", "name": "Image Filters on Stroked Geometry", "description": "Tests image filters applied to stroked (not filled) geometry.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkImageFilters::DropShadow", "SkImageFilters::Offset", "SkImageFilters::MatrixTransform"], "visualGoal": "Grid of stroked shapes with blur, drop shadow, offset, and resize filters.", "suggestedControls": ["Stroke width slider", "Filter type"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKImageFilter.CreateDropShadow", "SKImageFilter.CreateOffset", "SKImageFilter.CreateMatrix"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "imagefilterstransformed.cpp", "name": "Image Filters Transformed", "description": "Tests image filters with canvas rotation and skew transforms.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blur", "SkImageFilters::DropShadow", "SkImageFilters::DisplacementMap", "SkCanvas::rotate", "SkCanvas::skew"], "visualGoal": "3 rows of filtered ovals: untransformed, rotated, and skewed.", "suggestedControls": ["Rotation slider", "Skew slider"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlur", "SKImageFilter.CreateDropShadow", "SKImageFilter.CreateDisplacementMap"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "imagefiltersunpremul.cpp", "name": "Image Filters Unpremul", "description": "Tests SkImageFilters::Image with unpremultiplied alpha image.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Image", "kUnpremul_SkAlphaType"], "visualGoal": "Semi-transparent red rectangle via unpremul image filter.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateImage"], "sampleStatus": "none"}, {"file": "imagefromyuvtextures.cpp", "name": "Image from YUV Textures", "description": "Tests creating images from YUV plane textures. GPU-only.", "interesting": "low", "apis_available": false, "missing_apis": ["SkImages::TextureFromYUVATextures"], "key_apis": ["SkImages::TextureFromYUVATextures", "SkYUVAPixmaps"], "visualGoal": "Grid of YUV-sourced images drawn with different sampling and scales.", "suggestedControls": [], "category": "GPU Internals", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "imagemagnifier.cpp", "name": "Image Magnifier", "description": "Demonstrates magnifier image filter that zooms into a region with smooth edge transition.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Magnifier"], "visualGoal": "Text magnified through a lens-like filter with configurable zoom and inset.", "suggestedControls": ["Zoom amount slider (1-10)", "Inset slider (0-100)", "Lens position X/Y"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateMagnifier"], "sampleStatus": "none"}, {"file": "imagemakewithfilter.cpp", "name": "Image Make With Filter", "description": "Tests SkImages::MakeWithFilter with various image filters and clip/subset configurations.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImages::MakeWithFilter", "SkImageFilters::Blur", "SkImageFilters::DropShadow"], "visualGoal": "Large grid showing filtered image subsets with different filters and clip bounds.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImage.ApplyImageFilter", "SKImageFilter.CreateBlur", "SKImageFilter.CreateDropShadow"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "imagemasksubset.cpp", "name": "Image Mask Subset", "description": "Tests that alpha-8 image subsets preserve color type across image sources.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage::makeSubset", "SkImageInfo::MakeA8"], "visualGoal": "Checkerboard masks drawn as green-tinted images with subsets.", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKImage.Subset", "SKImageInfo"], "sampleStatus": "none"}, {"file": "imageresizetiled.cpp", "name": "Image Resize Tiled", "description": "Tests matrix transform image filter with tiled rendering.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::MatrixTransform", "SkCanvas::clipRect"], "visualGoal": "Tiled text scaled up through matrix transform image filter.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateMatrix", "SKCanvas.ClipRect"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "imagesource.cpp", "name": "Image Source Filter", "description": "Tests SkImageFilters::Image with various source and destination rect configurations.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Image"], "visualGoal": "Row of images showing unscaled, subset, scaled subset, and full-scaled image source filters.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateImage"], "sampleStatus": "none"}, {"file": "imagesource2.cpp", "name": "Image Source Filter 2", "description": "Tests SkImageFilters::Image with non-integer destination rect and various sampling qualities.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Image", "SkSamplingOptions"], "visualGoal": "Striped image drawn through image filter at different quality levels.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateImage"], "sampleStatus": "none"}, {"file": "internal_links.cpp", "name": "Internal Links (PDF)", "description": "Tests PDF internal link annotations between named destinations.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkAnnotateLinkToDestination", "SkAnnotateNamedDestination"], "visualGoal": "Two labeled blue rectangles that function as internal PDF links.", "suggestedControls": [], "category": "Infrastructure", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "PDF Composer"}, {"file": "inverseclip.cpp", "name": "Inverse Clip Path", "description": "Tests clipping with an inverse-wound path to create a ring-shaped clip region.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathFillType::kInverseWinding", "SkCanvas::clipPath"], "visualGoal": "Blue rectangle with an oval hole cut out using inverse clip path.", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKPath.FillType", "SKCanvas.ClipPath"], "sampleStatus": "none"}, {"file": "inversepaths.cpp", "name": "Inverse Fill Paths", "description": "Comprehensive test of inverse path fill types with various styles, sizes, and effects.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathFillType::kInverseWinding", "SkPathFillType::kInverseEvenOdd", "SkCanvas::clipRect"], "visualGoal": "Large grid of inverse-filled shapes with different stroke styles and path effects.", "suggestedControls": ["Fill type", "Stroke width", "Path effect"], "category": "Paths", "skiaSharpApis": ["SKPath.FillType", "SKCanvas.ClipRect", "SKCanvas.DrawPath"], "sampleStatus": "none"}, {"file": "jpg_color_cube.cpp", "name": "JPEG Color Cube", "description": "Creates a 64x64x64 RGB color cube encoded as JPEG to test color fidelity.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkJpegEncoder::Encode", "SkImages::DeferredFromEncodedData"], "visualGoal": "512x512 color cube grid pattern encoded and decoded through JPEG.", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKImage", "SKData"], "sampleStatus": "similar", "matchedSample": "Image Decoder"}, {"file": "kawase_blur_rt.cpp", "name": "Kawase Blur (Runtime Shader)", "description": "Implements multi-pass Kawase blur approximation using SkRuntimeEffect shaders.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkRuntimeEffect::MakeForShader", "SkRuntimeShaderBuilder", "SkSurface"], "visualGoal": "Mandrill image with progressive Kawase blur passes and final cross-fade composite.", "suggestedControls": ["Blur radius slider (0-100)", "Number of passes slider"], "category": "Shaders", "skiaSharpApis": ["SKRuntimeEffect", "SKSurface"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "labyrinth.cpp", "name": "Labyrinth Maze", "description": "Draws a detailed maze pattern to test stroke cap coverage and overlap handling.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPaint::kStroke_Style", "SkPaint::Cap"], "visualGoal": "A detailed maze drawn with thin anti-aliased strokes showing cap style differences.", "suggestedControls": ["Cap style selector", "Stroke width slider"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPaint", "SKStrokeCap"], "sampleStatus": "none"}, {"file": "largeclippedpath.cpp", "name": "Large Clipped Path", "description": "Tests rendering a flower-like path clipped by a complex checkerboard grid.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipPath", "SkCanvas::drawPath", "SkPathBuilder"], "visualGoal": "A magenta flower shape on cyan clipped through a complex grid.", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKCanvas.ClipPath", "SKCanvas.DrawPath", "SKPath"], "sampleStatus": "none"}, {"file": "largeglyphblur.cpp", "name": "Large Glyph Blur", "description": "Tests text with large blur on glyphs exceeding atlas limits.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkMaskFilter::MakeBlur", "SkTextBlob", "SkCanvas::drawTextBlob"], "visualGoal": "Large blurred text with sharp overlay.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKMaskFilter.CreateBlur", "SKTextBlob", "SKCanvas.DrawTextBlob"], "sampleStatus": "existing", "matchedSample": "Blur Image Filter"}, {"file": "lattice.cpp", "name": "Lattice (Nine-Patch) Drawing", "description": "Tests drawImageLattice for nine-patch and multi-patch image scaling with fixed/transparent regions.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImageLattice", "SkCanvas::Lattice"], "visualGoal": "Grid of nine-patch scaled images at different sizes showing correct corner/edge/center scaling.", "suggestedControls": ["Target width/height sliders", "Padding sliders"], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImageLattice", "SKLattice"], "sampleStatus": "similar", "matchedSample": "Nine-Patch"}, {"file": "lazytiling.cpp", "name": "Lazy Tiling", "description": "Tests texture tiling modes on lazy GPU textures. GPU-only Ganesh internal test.", "interesting": "low", "apis_available": false, "missing_apis": ["GrTextureEffect", "GrProxyProvider", "SurfaceDrawContext"], "key_apis": ["GrTextureEffect::MakeSubset", "GrSurfaceProxyView"], "visualGoal": "4x4 grid of tiled textures showing clamp/repeat/mirror/decal.", "suggestedControls": [], "category": "GPU Internals", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "lcdblendmodes.cpp", "name": "LCD Text Blend Modes", "description": "Tests LCD sub-pixel text rendering with all blend modes on different background colors.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkFont::Edging::kSubpixelAntiAlias", "SkBlendMode", "SkCanvas::drawString"], "visualGoal": "Four columns of blend mode names with LCD text on varied backgrounds.", "suggestedControls": ["Background color", "Text color"], "category": "Text", "skiaSharpApis": ["SKFont", "SKBlendMode", "SKCanvas.DrawText"], "sampleStatus": "existing", "matchedSample": "Blend Modes"}, {"file": "lcdoverlap.cpp", "name": "LCD Text Overlap", "description": "Tests LCD sub-pixel anti-aliased text with overlapping glyphs.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkFont::Edging::kSubpixelAntiAlias", "SkCanvas::drawString"], "visualGoal": "Overlapping text with LCD anti-aliasing.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKFont", "SKCanvas.DrawText"], "sampleStatus": "similar", "matchedSample": "Text Lab"}, {"file": "lcdtext.cpp", "name": "LCD Text Rendering", "description": "Tests LCD sub-pixel text rendering at various sizes and transforms.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkFont::Edging::kSubpixelAntiAlias", "SkCanvas::drawString", "SkFont"], "visualGoal": "Text at different sizes with LCD sub-pixel anti-aliasing.", "suggestedControls": ["Font size slider", "Edging mode selector"], "category": "Text", "skiaSharpApis": ["SKFont", "SKCanvas.DrawText"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "lighting.cpp", "name": "Lighting Image Filters", "description": "Tests point and spot lighting image filters with diffuse and specular components.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::PointLitDiffuse", "SkImageFilters::SpotLitDiffuse", "SkImageFilters::PointLitSpecular", "SkImageFilters::SpotLitSpecular"], "visualGoal": "Grid of images lit by point and spot lights with diffuse and specular lighting.", "suggestedControls": ["Light position X/Y/Z", "Surface scale", "Light color", "Specular exponent"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreatePointLitDiffuse", "SKImageFilter.CreateSpotLitDiffuse", "SKImageFilter.CreatePointLitSpecular", "SKImageFilter.CreateSpotLitSpecular"], "sampleStatus": "none"}, {"file": "linepaths.cpp", "name": "Line Paths", "description": "Tests rendering of line-based paths with various stroke styles.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPaint::kStroke_Style", "SkPath"], "visualGoal": "Line paths with different stroke widths and styles.", "suggestedControls": ["Stroke width", "Cap style", "Join style"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPaint", "SKPath"], "sampleStatus": "none"}, {"file": "localmatriximagefilter.cpp", "name": "Local Matrix Image Filter", "description": "Tests image filters combined with local matrix transforms.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilter", "SkMatrix", "SkImageFilters::MatrixTransform"], "visualGoal": "Image filter results with local matrix transformations.", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter", "SKMatrix"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "localmatriximageshader.cpp", "name": "Local Matrix Image Shader", "description": "Tests image shaders with local matrix transforms.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage::makeShader", "SkShader::makeWithLocalMatrix", "SkMatrix"], "visualGoal": "Image shaders with various local matrix transformations.", "suggestedControls": [], "category": "Shaders", "skiaSharpApis": ["SKImage.ToShader", "SKShader", "SKMatrix"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "localmatrixshader.cpp", "name": "Local Matrix Shader", "description": "Tests shader local matrix transforms with gradient and image shaders.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkShader::makeWithLocalMatrix", "SkMatrix"], "visualGoal": "Shaders drawn with various local matrix transforms.", "suggestedControls": [], "category": "Shaders", "skiaSharpApis": ["SKShader", "SKMatrix"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "lumafilter.cpp", "name": "Luma Color Filter", "description": "Tests the luma color filter that converts RGB to grayscale alpha.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkLumaColorFilter::Make", "SkColorFilter"], "visualGoal": "Images with luma filter converting color to luminance-based alpha.", "suggestedControls": [], "category": "Color Filters", "skiaSharpApis": ["SKColorFilter.CreateLumaColor"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "luminosity.cpp", "name": "Luminosity Shader", "description": "Tests luminosity blend mode rendering and calculations.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkBlendMode::kLuminosity", "SkCanvas::drawRect"], "visualGoal": "Demonstration of luminosity blend mode.", "suggestedControls": [], "category": "Blend Modes", "skiaSharpApis": ["SKBlendMode", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "mac_aa_explorer.cpp", "name": "Mac Anti-Aliasing Explorer", "description": "Platform-specific GM for macOS Core Graphics anti-aliasing behavior. Mac-only.", "interesting": "low", "apis_available": false, "missing_apis": ["CGContext", "CTFont"], "key_apis": ["CGContextSetShouldAntialias", "CTFontDrawGlyphs"], "visualGoal": "Grid of text with various macOS-specific AA settings.", "suggestedControls": [], "category": "Platform-Specific", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Text Lab"}, {"file": "make_raster_image.cpp", "name": "Make Raster Image", "description": "Loads an encoded image and converts it to a raster image using makeRasterImage(), then draws it. Minimal test of the raster conversion API.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage::makeRasterImage", "SkCanvas::drawImage"], "notes": "Extremely simple GM — just one API call. Not visually interesting for a gallery sample.", "visualGoal": "A single color wheel image drawn at the origin", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKImage.MakeRasterImage", "SKCanvas.DrawImage"], "sampleStatus": "none"}, {"file": "makecolorspace.cpp", "name": "Make Color Space Conversion", "description": "Tests SkImage::makeColorSpace and reinterpretColorSpace with wide-gamut color spaces (Adobe RGB, Rec2020), comparing lazy, raster, and GPU images side by side.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage::makeColorSpace", "SkImage::reinterpretColorSpace", "SkColorSpace::MakeRGB", "SkCanvas::drawImage"], "notes": "Educational for color management but relies on GPU context for some paths. Multiple sub-GMs in one file. The core raster path is available in SkiaSharp.", "visualGoal": "Grid of mandrill and color wheel images showing color space transformations — shifted hues in wide gamut spaces", "suggestedControls": ["Color space selector (sRGB, Adobe RGB, Display P3, Rec2020)"], "category": "Images", "skiaSharpApis": ["SKImage.MakeColorSpace", "SKColorSpace.CreateRgb", "SKCanvas.DrawImage"], "sampleStatus": "none"}, {"file": "mandoline.cpp", "name": "Mandoline Sliver Paths", "description": "Recursively slices cubic, quadratic, conic, and line segments into sliver-shaped contours (ice cream cone shapes) to stress-test thin path rendering with anti-aliasing.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPath::moveTo", "SkPath::lineTo", "SkPath::cubicTo", "SkPath::quadTo", "SkPath::conicTo", "SkPath::close", "SkCanvas::drawPath"], "notes": "Interesting algorithmic approach to path subdivision. White-on-black rendering. Good educational value for understanding path precision edge cases.", "visualGoal": "White filled sliver-shaped path contours on a black background, forming abstract curved shapes from subdivided cubics, quads, and conics", "suggestedControls": ["Number of subdivisions slider", "Path type selector (cubic, quad, conic)"], "category": "Paths", "skiaSharpApis": ["SKPath.MoveTo", "SKPath.LineTo", "SKPath.CubicTo", "SKPath.QuadTo", "SKPath.ConicTo", "SKPath.Close", "SKCanvas.DrawPath"], "sampleStatus": "none"}, {"file": "manypathatlases.cpp", "name": "Many Path Atlases", "description": "GPU stress test that floods the path atlas cache with many clipped paths, testing atlas overflow behavior with configurable max atlas texture sizes.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipPath", "SkCanvas::drawPath", "SkPath::cubicTo", "SkPath::transform"], "notes": "GPU-specific test focused on atlas cache behavior. The visual output is a simple teal rounded shape with clipping. Not suitable for a gallery demo.", "visualGoal": "A teal rounded rectangle on yellow background with portions clipped away by rotated cubic paths", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKCanvas.ClipPath", "SKCanvas.DrawPath", "SKPath.CubicTo", "SKPath.Transform"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "manypaths.cpp", "name": "Many Circles and RRects", "description": "Stress test that draws 10,000 randomly colored circles and 7,000 rounded rects to test GPU index buffer overflow. Two sub-GMs: manycircles and manyrrects.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawOval", "SkCanvas::drawRRect"], "notes": "Primarily a GPU stress test for index buffer limits. The visual result is colorful but the purpose is performance testing, not visual appeal.", "visualGoal": "10,000 randomly positioned and colored overlapping circles filling the canvas; 7,000 tiny blue rounded rects in a grid", "suggestedControls": [], "category": "Geometry", "skiaSharpApis": ["SKCanvas.DrawOval", "SKCanvas.DrawRoundRect"], "sampleStatus": "none"}, {"file": "matrixconvolution.cpp", "name": "Matrix Convolution Image Filter", "description": "Demonstrates SkImageFilters::MatrixConvolution with various kernel sizes (3x3, 7x7, 128x1, 1x255), tile modes (clamp, decal, repeat), kernel offsets, and alpha convolution settings.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::MatrixConvolution", "SkImageFilters::Crop", "SkCanvas::drawImage", "SkShaders::LinearGradient"], "notes": "Excellent demo of convolution image filters. Shows edge detection kernels applied to text with different tile modes. Great educational value for understanding kernel-based image processing.", "visualGoal": "Grid showing a gradient letter 'e' processed with edge-detection convolution filters in different tile modes, producing glowing edge-highlighted text effects", "suggestedControls": ["Kernel size selector", "Tile mode picker (Clamp/Decal/Repeat)", "Kernel offset X/Y sliders", "Convolve alpha toggle"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateMatrixConvolution", "SKCanvas.DrawImage", "SKShader.CreateLinearGradient"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "matriximagefilter.cpp", "name": "Matrix Image Filter Transform", "description": "Applies SkImageFilters::MatrixTransform with a skew matrix to a checkerboard bitmap, comparing nearest-neighbor and linear sampling.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::MatrixTransform", "SkCanvas::saveLayer", "SkCanvas::drawImage", "SkMatrix::setSkew"], "notes": "Clean demo of applying matrix transforms via image filters. The checkerboard pattern makes sampling quality differences visible.", "visualGoal": "Two skewed checkerboard patterns side by side — one with nearest-neighbor sampling (pixelated) and one with linear sampling (smoother)", "suggestedControls": ["Skew X/Y sliders", "Sampling mode toggle"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateMatrix", "SKCanvas.SaveLayer", "SKCanvas.DrawImage", "SKMatrix.CreateSkew"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "mesh.cpp", "name": "SkMesh Drawing", "description": "Comprehensive test of SkMesh and SkMeshSpecification for GPU mesh rendering with custom vertex/fragment shaders, uniforms, vertex buffers, and index buffers.", "interesting": "high", "apis_available": false, "missing_apis": ["SkMesh", "SkMeshSpecification", "SkCanvas::drawMesh"], "key_apis": ["SkMesh", "SkMeshSpecification", "SkCanvas::drawMesh", "SkMesh::MakeIndexed", "SkMesh::Make"], "notes": "SkMesh is a major API gap in SkiaSharp. This is a GPU-only feature for custom mesh rendering with SkSL shaders. Would be a very compelling feature to expose but requires significant API work.", "visualGoal": "Colored mesh triangles rendered with custom vertex and fragment shaders, showing gradient fills and texture mapping on mesh geometry", "suggestedControls": [], "category": "Drawing", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "mipmap.cpp", "name": "Mipmap Sampling Quality", "description": "Tests image downscaling quality with different sampling options: nearest, linear, linear+mipmap, and cubic (Mitchell). Also tests sRGB vs linear mipmap generation for correct gamma handling.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImageRect", "SkCanvas::drawImage", "SkSamplingOptions", "SkColorSpace::MakeSRGB"], "notes": "Good educational demo for understanding mipmap quality and gamma-correct downsampling. Multiple sub-GMs showing different aspects of mipmap behavior.", "visualGoal": "Rows of the same circle image downscaled with different sampling modes, showing quality differences from pixelated (nearest) to smooth (mipmap+linear). Checkerboard patterns at decreasing sizes show mipmap levels.", "suggestedControls": ["Sampling mode selector", "Scale factor slider"], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.DrawBitmap", "SKColorSpace.CreateSrgb"], "sampleStatus": "none"}, {"file": "mirrortile.cpp", "name": "Mirror Tile Mode", "description": "Tests image shader mirror tile mode with scale factors of 1 and -1, with nearest and linear filtering, and with/without half-pixel offset. CPU-only test.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage::makeShader", "SkTileMode::kMirror", "SkCanvas::drawRect"], "notes": "CPU-only pixel precision test. The visual output is tiny (zoomed 8x) and the test is about sub-pixel sampling precision, not a visually appealing demo.", "visualGoal": "Zoomed-in (8x) view of a 3-pixel RGB image mirrored and tiled, showing how mirror boundaries interact with nearest/linear filtering", "suggestedControls": [], "category": "Shaders", "skiaSharpApis": ["SKImage.ToShader", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "mixedtextblobs.cpp", "name": "Mixed Text Blobs", "description": "Draws a single text blob containing mixed content: a very large path-rendered 'O', LCD sub-pixel text, color emoji glyphs, and an outline font glyph, then clips it with different rectangles.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkTextBlob", "SkTextBlobBuilder", "SkCanvas::drawTextBlob", "SkCanvas::clipRect", "SkFont"], "notes": "Good demo of text blob capabilities with mixed font sizes and types. Shows clipping interaction with text. Requires specific font resources.", "visualGoal": "Large 'O' character with overlaid LCD text and emoji, shown with different clip rectangles highlighting different portions", "suggestedControls": ["Clip rect position/size"], "category": "Text", "skiaSharpApis": ["SKTextBlob.Create", "SKCanvas.DrawTextBlob", "SKCanvas.ClipRect", "SKFont"], "sampleStatus": "similar", "matchedSample": "Color Fonts"}, {"file": "mixercolorfilter.cpp", "name": "Color Filter Mixer (Lerp)", "description": "Demonstrates SkColorFilters::Lerp to interpolate between two tint color filters (red and green tints) applied to a sweep gradient, with varying paint colors and opacity.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkColorFilters::Lerp", "SkColorFilters::Matrix", "SkLumaColorFilter::Make", "SkShaders::SweepGradient"], "notes": "Excellent gallery sample showing color filter interpolation. The tint filter implementation using luma + color matrix is educational. Clean, colorful visual output.", "visualGoal": "Grid of sweep gradient rectangles transitioning from red tint through original to green tint across columns, with different paint color/opacity rows", "suggestedControls": ["Lerp factor slider (0 to 1)", "Tint color pickers for low and high", "Paint opacity slider"], "category": "Color Filters", "skiaSharpApis": ["SKColorFilter.CreateLerp", "SKColorFilter.CreateColorMatrix", "SKColorFilter.CreateLumaColor", "SKShader.CreateSweepGradient"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "modecolorfilters.cpp", "name": "Blend Mode Color Filters", "description": "Exhaustive test of SkColorFilters::Blend with 14 blend modes, 5 filter colors, 4 shader types, and multiple paint colors, rendering a large grid of colored rectangles over a checkerboard background.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkColorFilters::Blend", "SkBlendMode", "SkCanvas::drawRect", "SkCanvas::saveLayer", "SkShaders::LinearGradient"], "notes": "Comprehensive but very dense. More of a reference chart than a visually exciting demo. Could be adapted into an interactive blend mode explorer.", "visualGoal": "Large grid of small colored rectangles showing all combinations of blend mode color filters over solid, transparent, and gradient shaders", "suggestedControls": ["Blend mode selector", "Filter color picker", "Source shader type", "Paint color picker"], "category": "Color Filters", "skiaSharpApis": ["SKColorFilter.CreateBlendMode", "SKCanvas.DrawRect", "SKCanvas.SaveLayer", "SKShader.CreateLinearGradient"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "morphology.cpp", "name": "Morphology Image Filters (Dilate/Erode)", "description": "Demonstrates SkImageFilters::Dilate and SkImageFilters::Erode with varying radii on text rendered to an offscreen surface, with and without crop rects.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Dilate", "SkImageFilters::Erode", "SkCanvas::drawImage", "SkCanvas::clipIRect"], "notes": "Great visual demo of morphological operations. The text gets progressively thicker (dilate) or thinner (erode) with increasing radii. Clear and educational.", "visualGoal": "Grid of 'ABC XYZ' text with increasing dilate/erode radii — text grows bolder or thinner. Top rows show dilation, bottom rows show erosion, with optional crop rectangles.", "suggestedControls": ["Radius X/Y sliders", "Operation toggle (Dilate/Erode)", "Crop rect toggle"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateDilate", "SKImageFilter.CreateErode", "SKCanvas.DrawImage"], "sampleStatus": "none"}, {"file": "nearesthalfpixelimage.cpp", "name": "Nearest Half Pixel Image Sampling", "description": "CPU-only test that checks how nearest-neighbor sampling behaves at half-pixel offsets with 2-pixel images, testing drawImage vs image shader, scale factors 1 and -1.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkImage::makeShader", "SkCanvas::drawRect"], "notes": "Very low-level pixel precision test. CPU-only, tiny output zoomed 8x. Not suitable for a gallery sample.", "visualGoal": "Zoomed-in view of 2-pixel images showing how red/blue pixels snap at half-pixel boundaries under different scale and shader configurations", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKImage.ToShader", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "nested.cpp", "name": "Nested Shapes (Winding Rules)", "description": "Tests combinations of nested rects, ovals, and rounded rects using CW/CCW winding directions to create donut shapes, with AA on/off and Y-flip variants.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPath::addRect", "SkPath::addOval", "SkPath::addRRect", "SkPathDirection", "SkCanvas::drawPath"], "notes": "Good educational demo for fill rules and nested shapes. Shows how winding direction determines what's filled vs hollow. Four GM variants (AA/BW × normal/flipped).", "visualGoal": "Grid of black nested shape pairs (rect-in-rect, oval-in-rect, rrect-in-oval, etc.) with hollowed centers over a colorful random-tile background", "suggestedControls": ["Outer shape type", "Inner shape type", "Anti-aliasing toggle", "Flip Y toggle"], "category": "Paths", "skiaSharpApis": ["SKPath.AddRect", "SKPath.AddOval", "SKPath.AddRoundRect", "SKCanvas.DrawPath"], "sampleStatus": "none"}, {"file": "ninepatchstretch.cpp", "name": "Nine-Patch Image Stretch", "description": "Demonstrates drawImageNine with a rounded rect image that has a stretchable center region, tested at various sizes (shrink and grow in both axes) with linear and nearest filtering.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkCanvas::drawImageNine"], "key_apis": ["SkCanvas::drawImageNine", "SkSurface::makeImageSnapshot", "SkCanvas::drawRoundRect"], "notes": "drawImageNine is not in the listed SkiaSharp SKCanvas APIs. This is a useful UI technique for scalable buttons/panels but would need API wrapping.", "visualGoal": "A rounded rectangle image with colored center cross, stretched to different sizes showing how the corners stay fixed while the center stretches", "suggestedControls": ["Target width/height sliders", "Filter mode toggle"], "category": "Images", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Nine-Patch"}, {"file": "nonclosedpaths.cpp", "name": "Non-Closed Paths Stroke Behavior", "description": "Systematically tests how non-closed rect-like paths render with different stroke widths, cap types, join types, and closure styles (totally open, fake close at corner, fake close at midpoint).", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPath::lineTo", "SkPaint::setStrokeCap", "SkPaint::setStrokeJoin", "SkPaint::setStrokeWidth", "SkCanvas::drawPath"], "notes": "Excellent educational reference for understanding stroke caps and joins on open paths. Large grid but very systematic. Good for documenting path stroke behavior.", "visualGoal": "Large grid showing rect-like open paths with every combination of cap (butt/round/square), join (miter/round/bevel), stroke width, and closure type", "suggestedControls": ["Stroke cap picker", "Stroke join picker", "Stroke width slider", "Closure type selector"], "category": "Paths", "skiaSharpApis": ["SKPath.LineTo", "SKPaint.StrokeCap", "SKPaint.StrokeJoin", "SKPaint.StrokeWidth", "SKCanvas.DrawPath"], "sampleStatus": "similar", "matchedSample": "Path Effects Lab"}, {"file": "offsetimagefilter.cpp", "name": "Offset Image Filter", "description": "Demonstrates SkImageFilters::Offset with varying dx/dy offsets, crop rects, and clip rects applied to bitmap and checkerboard images. Two sub-GMs show different offset scenarios.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Offset", "SkImageFilters::Image", "SkCanvas::drawImage", "SkCanvas::clipRect"], "notes": "Clean demonstration of image offset filters with crop and clip interactions. Useful for understanding how image filter bounds work.", "visualGoal": "Row of bitmap/checkerboard images shifted by increasing offsets within crop rectangles shown with red border outlines", "suggestedControls": ["Offset X/Y sliders", "Crop rect size", "Image source toggle"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateOffset", "SKImageFilter.CreateImage", "SKCanvas.DrawImage", "SKCanvas.ClipRect"], "sampleStatus": "none"}, {"file": "orientation.cpp", "name": "EXIF Orientation", "description": "Tests JPEG EXIF orientation handling by drawing 8 differently-oriented JPEG images that should all appear identical when orientation is respected. Tests multiple chroma subsampling formats.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkImages::DeferredFromGenerator", "SkCodecImageGenerator"], "notes": "Requires specific JPEG test resource files with EXIF orientation tags. Not suitable as a gallery sample since it depends on external image resources with specific metadata.", "visualGoal": "Grid of 8 JPEG images with labeled quadrants (red/blue/green/yellow with top/bottom/left/right labels) that all appear in the same orientation", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKImage.FromEncodedData"], "sampleStatus": "similar", "matchedSample": "Image Decoder"}, {"file": "ovals.cpp", "name": "Ovals Comprehensive", "description": "Draws ovals with 5 paint styles (fill, AA fill, AA stroke, hairline, stroke+fill) × 8 matrix transforms (identity, various scales, rotations, skew), plus special cases for extreme aspect ratios and gradients.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawOval", "SkMatrix", "SkPaint::setStyle", "SkShaders::RadialGradient"], "notes": "Comprehensive oval rendering reference. Good for testing but the grid layout is more of a test chart than an inspiring gallery sample. Could be adapted with interactive controls.", "visualGoal": "Grid of colorful ovals rendered with different paint styles and matrix transforms, including rotated, scaled, and skewed variants, plus special extreme aspect ratio cases", "suggestedControls": ["Paint style selector", "Transform type", "Oval dimensions"], "category": "Geometry", "skiaSharpApis": ["SKCanvas.DrawOval", "SKMatrix", "SKPaint.Style", "SKShader.CreateRadialGradient"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "overdrawcanvas.cpp", "name": "Overdraw Canvas Visualization", "description": "Uses SkOverdrawCanvas to count draw operations per pixel, then visualizes the overdraw counts using SkOverdrawColorFilter to color-code regions by how many times they were drawn.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkOverdrawCanvas", "SkOverdrawColorFilter::MakeWithSkColors", "SkCanvas::drawRect", "SkCanvas::drawImage"], "notes": "Excellent gallery sample demonstrating a powerful debugging/optimization tool. Nested rectangles create increasing overdraw levels, visualized as a heatmap. Very educational.", "visualGoal": "Nested rectangles with color-coded overdraw levels (transparent -> red/blue/green -> brighter red for more overdraw), plus text with overdraw visualization", "suggestedControls": ["Number of overlapping shapes", "Overdraw color palette picker", "Shape type selector"], "category": "Canvas Operations", "skiaSharpApis": ["SKOverdrawCanvas", "SKCanvas.DrawRect", "SKCanvas.DrawImage"], "sampleStatus": "none"}, {"file": "overdrawcolorfilter.cpp", "name": "Overdraw Color Filter", "description": "Tests SkOverdrawColorFilter by creating alpha-8 bitmaps with alpha values 0-6 and drawing them with the overdraw color filter to verify each count maps to the correct color.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkOverdrawColorFilter::MakeWithSkColors", "SkBitmap::eraseARGB", "SkCanvas::drawImage"], "notes": "Very simple unit-test-like GM. Just verifies that each alpha value maps to the correct overdraw color. Not visually interesting — the overdrawcanvas.cpp GM is much better for a gallery sample.", "visualGoal": "Grid of colored squares, each representing a different overdraw count (0-6) mapped to colors from the overdraw palette", "suggestedControls": [], "category": "Color Filters", "skiaSharpApis": ["SKCanvas.DrawImage", "SKBitmap"], "sampleStatus": "none"}, {"file": "overstroke.cpp", "name": "Overstroke Paths", "description": "Demonstrates stroking paths with very large stroke widths (500px) on small geometry (quads, cubics, ovals), showing how the stroke offset creates overlapping regions and visual artifacts.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathMeasure", "SkPaint::setStrokeWidth", "SkPathBuilder"], "notes": "Educational for understanding stroke behavior at extreme widths. Shows the fill-path overlay in magenta. Uses SkPathMeasure for ribs visualization — all available in SkiaSharp.", "visualGoal": "Side-by-side views of small curve geometry (quad, cubic, oval) at normal stroke width and overstroke width, with magenta fill-path overlay and green perpendicular 'ribs' showing stroke extent", "suggestedControls": ["Stroke width slider", "Path type selector (quad/cubic/oval)", "Show fill path toggle", "Show ribs toggle"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPathMeasure", "SKPaint.StrokeWidth", "SKPath.QuadTo", "SKPath.CubicTo"], "sampleStatus": "none"}, {"file": "p3.cpp", "name": "Display P3 Color Space Tests", "description": "Comprehensive pixel-level verification of P3 color space rendering: drawRect, drawBitmap, gradients (premul/unpremul, P3/sRGB interpolation), A8 images, circles, ovals, and dashed circles.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkColorSpace::MakeRGB", "SkShaders::LinearGradient", "SkCanvas::drawRect", "SkCanvas::drawCircle", "SkCanvas::drawOval", "SkCanvas::readPixels"], "notes": "A pixel verification test, not a visual demo. Each case draws a small shape and reads back pixels to verify color accuracy. The pass/fail indicators dominate the visual output.", "visualGoal": "Small colored rectangles, circles, and ovals with pass/fail indicators and pixel value text showing P3 color accuracy verification results", "suggestedControls": [], "category": "Drawing", "skiaSharpApis": ["SKColorSpace.CreateRgb", "SKShader.CreateLinearGradient", "SKCanvas.DrawRect", "SKCanvas.DrawCircle", "SKCanvas.DrawOval"], "sampleStatus": "similar", "matchedSample": "Gradient"}, {"file": "palette.cpp", "name": "Font Palette (COLRv1)", "description": "Tests font palette overrides for COLRv1 color fonts using SkFontArguments::Palette. Shows default, light, dark, single-override, and full-override palette configurations.", "interesting": "low", "apis_available": false, "missing_apis": ["SkFontArguments::Palette"], "key_apis": ["SkFontArguments::Palette", "SkTypeface::makeClone", "SkCanvas::drawSimpleText"], "notes": "Very specialized COLRv1 font feature. SkiaSharp's font argument support may not include palette overrides. Requires a specific test font resource.", "visualGoal": "Color emoji/symbol glyphs drawn with different palette color overrides — default colors vs custom purple gradient vs custom single-color override", "suggestedControls": [], "category": "Text", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Color Fonts"}, {"file": "patch.cpp", "name": "Coons Patch Drawing", "description": "Comprehensive demo of SkCanvas::drawPatch with combinations of per-vertex colors, texture coordinates with gradient/image shaders, and blend modes (Src, Dst, ColorDodge). Shows control point visualization.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPatch", "SkShaders::LinearGradient", "SkImage::makeShader", "SkCanvas::drawPoints"], "notes": "Excellent gallery sample! Coons patches are visually impressive and interactive. Multiple sub-GMs show colors, textures, blend modes, alpha, and perspective. Control point visualization included.", "visualGoal": "Grid of Coons patches with curved edges showing: solid colors, per-vertex color interpolation, gradient texture mapping, image texture mapping, and various blend modes. Control points drawn as colored dots.", "suggestedControls": ["Drag control points", "Color picker for corners", "Shader type (none/gradient/image)", "Blend mode selector", "Alpha slider"], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawPatch", "SKShader.CreateLinearGradient", "SKImage.ToShader", "SKCanvas.DrawPoints"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "path_stroke_with_zero_length.cpp", "name": "Zero-Length Path Stroke Caps", "description": "Systematic test of stroking zero-length paths with all combinations of cap types, stroke widths, path verbs (move, line, quad, cubic, conic), and open/closed states. Includes single and double contour variants.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPaint::setStrokeCap", "SkPaint::setStrokeWidth", "SkParsePath"], "notes": "Highly technical regression test. Visual output is a grid of tiny green/red/yellow cells indicating pass/fail for each cap/width/verb combination. Not suitable for a gallery demo.", "visualGoal": "Grid of small cells with green (pass), red (missing geometry), or yellow (extra geometry) indicators for zero-length path cap rendering", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPaint.StrokeCap", "SKPaint.StrokeWidth"], "sampleStatus": "none"}, {"file": "patharcto.cpp", "name": "Path ArcTo and SVG Paths", "description": "Tests SkPath::arcTo with very large radii and shallow angles to verify precision, plus SVG path parsing with large arc radii. Also includes a path append/extend mode demo.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPath::arcTo", "SkPath::lineTo", "SkPath::moveTo", "SkParsePath", "SkPath::addPath", "SkCanvas::drawPath"], "notes": "The shallow angle arcTo test is educational about numerical precision. The SVG path parsing demo shows complex real-world paths. Multiple sub-GMs.", "visualGoal": "A stroked curvy triangle formed by arcTo segments with large radii, plus SVG-parsed decorative shapes, and a path append/extend comparison showing connected vs disconnected path segments", "suggestedControls": ["Arc radius slider"], "category": "Paths", "skiaSharpApis": ["SKPath.ArcTo", "SKPath.LineTo", "SKPath.MoveTo", "SKPath.AddPath", "SKCanvas.DrawPath"], "sampleStatus": "none"}, {"file": "pathcontourstart.cpp", "name": "Path Contour Start Index", "description": "Demonstrates how the start index parameter of SkPath::Rect, SkPath::Oval, and SkPath::RRect affects dash pattern alignment by drawing dashed shapes with all 8 possible starting points.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPath::Rect", "SkPath::Oval", "SkPath::RRect", "SkDashPathEffect::Make", "SkCanvas::drawPath", "SkCanvas::drawPoints"], "notes": "Educational demo showing how contour start position affects dash rendering. The growing dash pattern makes the start point clearly visible. Red dots mark the path points.", "visualGoal": "Columns of dashed rectangles, ovals, and rounded rects where each row starts the dash pattern at a different vertex, with red dots marking path control points", "suggestedControls": ["Start index slider (0-7)", "Shape type selector", "Path direction (CW/CCW)", "Dash interval scale"], "category": "Effects", "skiaSharpApis": ["SKPath.AddRect", "SKPath.AddOval", "SKPath.AddRoundRect", "SKPathEffect.CreateDash", "SKCanvas.DrawPath", "SKCanvas.DrawPoints"], "sampleStatus": "similar", "matchedSample": "Path Effects Lab"}, {"file": "patheffects.cpp", "name": "Path Effects Showcase", "description": "Demonstrates various path effects including hair stroke, corner, dash, 1D path, discrete, and 2D tile path effects applied to polyline and oval paths. Also includes a CTM-aware custom path effect example.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkCornerPathEffect::Make", "SkDashPathEffect::Make", "SkPath1DPathEffect::Make", "SkPath2DPathEffect::Make", "SkDiscretePathEffect::Make", "SkPathEffect::MakeCompose", "SkPaint::setPathEffect"], "notes": "Excellent showcase of all major path effect types in SkiaSharp. The CTM-aware custom path effect part uses internal APIs and should be skipped.", "visualGoal": "Grid showing the same paths rendered with different path effects: hairline, corner-rounded, stroked, dashed, 1D stamped shapes, discrete jitter, and 2D tile fill patterns", "suggestedControls": ["Stroke width slider", "Path effect type selector", "Corner radius slider", "Dash interval sliders"], "category": "Effects", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPathEffect.CreateCorner", "SKPathEffect.CreateDash", "SKPathEffect.Create1DPath", "SKPathEffect.Create2DPath", "SKPathEffect.CreateDiscrete", "SKPathEffect.CreateCompose", "SKPaint.PathEffect"], "sampleStatus": "existing", "matchedSample": "Path Effects Lab"}, {"file": "pathfill.cpp", "name": "Path Fill Types", "description": "Comprehensive test of path filling with various shapes including lines, circles, rects, rounded rects, and complex nested paths. Tests all fill types (winding, even-odd) and inversions.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPath::setFillType", "SkPathBuilder::addRect", "SkPathBuilder::addOval", "SkPathBuilder::addRRect", "SkPath::FillType"], "notes": "Good educational demo of path fill rules (winding vs even-odd) with nested shapes. Many sub-GMs testing edge cases.", "visualGoal": "Multiple rows of shapes demonstrating different fill types on nested rect/oval/rrect paths, with winding and even-odd fill producing visually different results", "suggestedControls": ["Fill type selector (Winding/EvenOdd)", "Shape type selector", "Inner/outer shape toggle"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.FillType", "SKPath.AddRect", "SKPath.AddOval", "SKPath.AddRoundRect"], "sampleStatus": "none"}, {"file": "pathinterior.cpp", "name": "Path Interior Detection", "description": "Tests whether paths have rectangular interiors by drawing nested rect and rounded-rect combinations with all permutations of fill types, directions (CW/CCW), and inset order.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::addRect", "SkPathBuilder::addRRect", "SkPathDirection"], "notes": "Internal test for path interior detection. The hasRectangularInterior method is not public API and the test is disabled (#if 0). Low visual appeal.", "visualGoal": "Grid of 64 nested rect/rrect shapes in gray and red outlines, testing all permutations of fill direction and shape type", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.AddRect", "SKPath.AddRoundRect"], "sampleStatus": "none"}, {"file": "pathmaskcache.cpp", "name": "Path Mask Cache", "description": "Tests GPU backend's caching of path coverage masks by drawing paths at identity, non-uniform scale, and rotation transforms with fractional translations.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkCanvas::concat", "SkMatrix::setScale", "SkMatrix::setRotate", "SkPathBuilder"], "notes": "GPU-specific test for mask caching behavior. The visual output is not particularly interesting - just paths drawn at different sub-pixel offsets. Uses GrContextOptions.", "visualGoal": "Columns of repeated path shapes (conic curves and circle+rect) drawn at slightly different fractional pixel offsets to test mask cache accuracy", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKCanvas.Concat", "SKMatrix.CreateScale", "SKMatrix.CreateRotation"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "pathmeasure.cpp", "name": "Path Measure Explosion", "description": "Regression test for integer overflow in path measure with extremely large paths. The GM is disabled (#if 0) and triggers undefined behavior with huge point counts.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkDashPathEffect::Make", "SkCanvas::drawPath", "SkPathBuilder"], "notes": "Stress test for pathological input. Disabled (wrapped in #if 0). Not suitable as a gallery sample - requires huge memory and intentionally triggers UB.", "visualGoal": "Nothing visible - the GM is disabled and would crash or use excessive memory if enabled", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKPathEffect.CreateDash", "SKCanvas.DrawPath", "SKPath"], "sampleStatus": "similar", "matchedSample": "Path Effects Lab"}, {"file": "pathopsblend.cpp", "name": "Path Ops via Blend Modes", "description": "Demonstrates implementing path boolean operations (difference, intersect, union, XOR) using blend modes as an alternative to SkPathOps. Compares PathOps results with raster blend equivalents side by side.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathOps::Op", "SkCanvas::saveLayer", "SkBlendMode", "SkCanvas::drawPath", "SkPath::toggleInverseFillType"], "notes": "Excellent educational sample showing two techniques for path combination: PathOps (left column) and blend modes (right column). Great for teaching blend modes and path operations.", "visualGoal": "Two columns comparing path operation results: left uses PathOps to combine a cross and circle, right achieves the same result using blend modes on a layer. Shows Difference, Intersect, Union, XOR.", "suggestedControls": ["Path operation selector", "Toggle between PathOps and blend mode approach"], "category": "Paths", "skiaSharpApis": ["SKPath.Op", "SKCanvas.SaveLayer", "SKPaint.BlendMode", "SKCanvas.DrawPath", "SKPath.FillType"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "pathopsinverse.cpp", "name": "Path Ops with Inverse Fill", "description": "Tests all path operations (difference, intersect, union, reverse-difference, XOR) with combinations of normal and inverse even-odd fill types on overlapping rectangles.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathOps::Op", "SkPath::makeFillType", "SkPathFillType::kInverseEvenOdd", "SkCanvas::drawPath", "SkCanvas::clipRect"], "notes": "Demonstrates how path ops interact with inverse fill types. Good educational content for understanding boolean operations on paths with different fill rules.", "visualGoal": "Grid showing overlapping colored rectangles with all 5 path operations applied across 4 combinations of normal and inverse fill types. Each row varies fill type combination.", "suggestedControls": ["Path operation selector", "Fill type toggles for each path"], "category": "Paths", "skiaSharpApis": ["SKPath.Op", "SKPath.FillType", "SKCanvas.DrawPath", "SKCanvas.ClipRect"], "sampleStatus": "none"}, {"file": "pathreverse.cpp", "name": "Path Reverse", "description": "Tests path reversal by drawing original paths alongside their reversed versions. Includes rects, ovals, and a complex hiragino glyph path. Shows both filled and stroked rendering.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathPriv::ReverseAddPath", "SkCanvas::drawPath", "SkPathBuilder::addRect", "SkPathBuilder::addOval"], "notes": "Uses SkPathPriv::ReverseAddPath which is a private API. The path reversal itself (SKPath.Reverse) is available in SkiaSharp. Limited visual interest - pairs of identical-looking shapes.", "visualGoal": "Pairs of shapes (rect, nested rect, ovals, glyph 'e') drawn side by side - original in black fill + red stroke on left, reversed path on right. Should look identical.", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.AddRect", "SKPath.AddOval", "SKPath.Reverse"], "sampleStatus": "similar", "matchedSample": "Text Lab"}, {"file": "pdf_never_embed.cpp", "name": "PDF Font Embedding", "description": "Tests PDF-specific font embedding behaviors: drawing text with non-embeddable fonts, rotated/scaled text, and table-based font subsetting with various font formats (TTF, WOFF, WOFF2).", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawTextBlob", "SkCanvas::drawString", "SkCanvas::drawGlyphs", "SkFont", "SkTextBlob"], "notes": "PDF-specific test. Uses drawGlyphs which is NOT available in SkiaSharp. Also depends on specific font resources. Not suitable as a gallery sample.", "visualGoal": "Text 'HELLO, WORLD!' drawn in various transforms (normal, rotated 45°, vertically scaled, horizontally compressed) and spider symbol glyphs from different font formats", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawTextBlob", "SKCanvas.DrawText", "SKFont"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "perlinnoise.cpp", "name": "Perlin Noise Shaders", "description": "Comprehensive demo of Perlin noise shaders including fractal noise and turbulence with various frequencies, octaves, seeds, stitch tiling, local matrices, rotation, and layered composition with image filters.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::MakeFractalNoise", "SkShaders::MakeTurbulence", "SkCanvas::drawRect", "SkShader::makeWithLocalMatrix", "SkImageFilters::Shader", "SkImageFilters::ColorFilter"], "notes": "Excellent showcase of Perlin noise - a visually rich, widely-used shader effect. Includes 4 sub-GMs covering basic noise, local matrix transforms, rotation, and layered composition.", "visualGoal": "Grid of colorful procedural noise textures: fractal noise and turbulence patterns at different frequencies, octaves, and seeds. Shows tiled vs untiled variants, rotated noise, and noise applied as image filter layers.", "suggestedControls": ["Noise type selector (Fractal/Turbulence)", "Base frequency X/Y sliders", "Octaves slider", "Seed slider", "Stitch tiles toggle"], "category": "Shaders", "skiaSharpApis": ["SKShader.CreatePerlinNoiseFractalNoise", "SKShader.CreatePerlinNoiseTurbulence", "SKCanvas.DrawRect", "SKShader.WithLocalMatrix", "SKImageFilter.CreateShader", "SKImageFilter.CreateColorFilter"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "perspimages.cpp", "name": "Perspective Image Drawing", "description": "Tests drawing images under perspective transforms with various sampling options (nearest, linear, mipmapped, cubic) and anti-aliasing settings using drawImage and drawImageRect.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkCanvas::drawImageRect", "SkCanvas::concat", "SkMatrix::setPerspY", "SkMatrix::preSkew", "SkMatrix::preRotate"], "notes": "Good demonstration of perspective transforms on images with different sampling modes. Uses texture images (GPU). Could be adapted for raster in SkiaSharp gallery.", "visualGoal": "Grid of mandrill and brick texture images drawn with perspective distortion, comparing nearest, linear, mipmapped, and cubic sampling. Shows both AA and non-AA variants.", "suggestedControls": ["Perspective amount slider", "Sampling mode selector", "Anti-alias toggle"], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.Concat", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "perspshaders.cpp", "name": "Perspective Shaders", "description": "Tests bitmap/image shaders and linear gradients under perspective transformation with various sampling options. Also includes a perspective clipping demo with extreme perspective matrices.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::concat", "SkMatrix::setPerspY", "SkCanvas::drawRect", "SkCanvas::drawPath", "SkCanvas::drawImage", "SkShaders::LinearGradient", "SkImage::makeShader"], "notes": "Great demo of how shaders behave under perspective. The perspective_clip sub-GM shows extreme 'half-plane' perspective clipping which is visually dramatic.", "visualGoal": "Grid of checkerboard and gradient-filled rectangles and paths under perspective tilt. The perspective_clip variant shows a mandrill-textured random polygon with extreme warping where parts go 'behind' the viewer.", "suggestedControls": ["Perspective Y amount slider", "Sampling mode selector", "AA toggle"], "category": "Shaders", "skiaSharpApis": ["SKCanvas.Concat", "SKMatrix", "SKCanvas.DrawRect", "SKCanvas.DrawPath", "SKCanvas.DrawImage", "SKShader.CreateLinearGradient", "SKImage.ToShader"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "persptext.cpp", "name": "Perspective Text", "description": "Draws text with increasing perspective distortion along X, Y, and XY axes. Demonstrates how text rendering degrades under perspective transforms.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawSimpleText", "SkCanvas::concat", "SkMatrix::setPerspX", "SkMatrix::setPerspY", "SkFont"], "notes": "Good for showing perspective text rendering. Two variants exist: minimal (subtle) and full (dramatic) perspective. Text rendering under perspective is a common need.", "visualGoal": "Three columns of 'Hamburgefons' text with progressively increasing perspective distortion: X-perspective (horizontal convergence), Y-perspective (vertical convergence), and combined XY", "suggestedControls": ["Perspective X amount slider", "Perspective Y amount slider", "Font size slider"], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawText", "SKCanvas.Concat", "SKMatrix", "SKFont"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "picture.cpp", "name": "Picture Recording and Playback", "description": "Exercises SKPicture recording and playback with optional matrix transforms and paint alpha. Includes a cull rect test for pictures with non-zero origin.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPictureRecorder::beginRecording", "SkPictureRecorder::finishRecordingAsPicture", "SkCanvas::drawPicture", "SkPicture"], "notes": "Good educational demo of SKPicture. Shows basic recording/playback, matrix transforms during playback, and alpha modulation. The cull rect sub-GM tests an edge case.", "visualGoal": "Four copies of a colorful overlapping shape composition (rect + triangles + blend-mode rect): original, translated, translated with paint, and semi-transparent. Plus a clipped picture test.", "suggestedControls": ["Alpha slider for playback paint", "Translation X/Y sliders"], "category": "Canvas Operations", "skiaSharpApis": ["SKPictureRecorder.BeginRecording", "SKPictureRecorder.EndRecording", "SKCanvas.DrawPicture", "SKPicture"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "pictureimagefilter.cpp", "name": "Picture as Image Filter", "description": "Uses SkImageFilters::Picture to create image filters from recorded pictures. Tests various source rects, empty rects, LCD text rendering, and different sampling modes.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Picture", "SkImages::DeferredFromPicture", "SkImageFilters::Image", "SkPictureRecorder", "SkCanvas::drawPaint"], "notes": "Demonstrates using pictures as image filter sources. Good for understanding the Picture→Image→ImageFilter pipeline. Some complexity around LCD text rendering.", "visualGoal": "Row of letter 'e' rendered as picture-based image filters: full picture, cropped subset, empty rect (blank), LCD text, and scaled versions comparing resampled vs pixelated", "suggestedControls": ["Source rect adjustment", "Sampling mode selector"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreatePicture", "SKImage.FromPicture", "SKImageFilter.CreateImage", "SKPictureRecorder"], "sampleStatus": "none"}, {"file": "pictureimagegenerator.cpp", "name": "Picture Image Generator", "description": "Tests SkPictureImageGenerator which creates raster images from pictures at various sizes, scales, and opacities. Draws the SKIA logo as a vector graphic with gradients.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageGenerators::MakeFromPicture", "SkPictureRecorder", "SkShaders::LinearGradient", "SkCanvas::drawCircle", "SkCanvas::drawImage"], "notes": "The vector SKIA logo drawing is visually interesting. The SkImageGenerator API is not directly exposed in SkiaSharp, but the picture-to-image workflow (SKImage.FromPicture) is available.", "visualGoal": "Grid of 16 SKIA logos rendered at different sizes, scales (including mirrored), and opacity levels. The logo features colored gradient text, an accent dot, and decorative underline.", "suggestedControls": ["Scale X/Y sliders", "Opacity slider"], "category": "Images", "skiaSharpApis": ["SKImage.FromPicture", "SKPictureRecorder", "SKShader.CreateLinearGradient", "SKCanvas.DrawCircle", "SKCanvas.DrawImage"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "pictureshader.cpp", "name": "Picture Shader Tiling", "description": "Comprehensive test of picture-based shaders with various tile modes, local matrices (scale, rotate, skew, translate), and alpha. Compares picture shader vs bitmap shader rendering.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkPicture::makeShader", "SkTileMode::kRepeat", "SkTileMode::kMirror", "SkTileMode::kDecal", "SkCanvas::drawRect", "SkMatrix"], "notes": "Excellent showcase of picture shaders - a powerful feature for creating tiled patterns from vector drawings. Includes perspective sub-GM and local matrix wrapper variant.", "visualGoal": "Large grid comparing picture shader output with different tile modes (repeat, clamp, mirror), local matrix transforms (identity, translate, rotate, skew), and scale factors. Side-by-side with equivalent bitmap shader.", "suggestedControls": ["Tile mode X/Y selector", "Local matrix rotation slider", "Scale slider", "Alpha slider"], "category": "Shaders", "skiaSharpApis": ["SKPicture.ToShader", "SKCanvas.DrawRect", "SKMatrix", "SKShader.WithLocalMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "pictureshadercache.cpp", "name": "Picture Shader Cache", "description": "Tests that picture shader caching correctly handles different color spaces by rendering in a custom green-to-yellow color space first, then verifying the cache doesn't produce wrong colors.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkPicture::makeShader", "SkColorSpace::MakeRGB", "SkSurfaces::Raster", "SkCanvas::drawRect"], "notes": "Internal cache correctness test. Not visually interesting - just a green circle and square tile pattern. The color space testing is valuable but not gallery-worthy.", "visualGoal": "A single small tile showing a green circle and green square drawn with a picture shader, verifying correct color after cache invalidation", "suggestedControls": [], "category": "Shaders", "skiaSharpApis": ["SKPicture.ToShader", "SKColorSpace.CreateRgb", "SKSurface.Create", "SKCanvas.DrawRect"], "sampleStatus": "none"}, {"file": "pictureshadertile.cpp", "name": "Picture Shader Tile Variations", "description": "Exhaustive test of picture shader tiling with 27 tile configurations varying position, size, and offset. Each tile uses repeat mode with a local matrix for scaling.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPicture::makeShader", "SkTileMode::kRepeat", "SkMatrix::setTranslate", "SkCanvas::drawRect"], "notes": "Good reference for how picture shader tile rect parameters affect output. Shows the full range of tile configurations. The scene has a green circle, blue square, and red cross.", "visualGoal": "Grid of 27 squares each showing a tiled pattern of green circles, blue squares, and red crosses at different tile offsets, sizes, and positions creating varied repeating patterns", "suggestedControls": ["Tile X/Y offset sliders", "Tile width/height sliders"], "category": "Shaders", "skiaSharpApis": ["SKPicture.ToShader", "SKCanvas.DrawRect", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "plus.cpp", "name": "Plus Blend Mode AA Seam Fix", "description": "Demonstrates how Plus blend mode eliminates anti-aliasing seams when two triangles meet along a diagonal. Compares SrcOver (visible red seam) with Plus (seamless green).", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkBlendMode::kPlus", "SkCanvas::saveLayer", "SkCanvas::drawPath", "SkPaint::setBlendMode"], "notes": "Educational demo of a practical use of Plus blend mode. Good for teaching about AA seam artifacts and how to avoid them. Simple but effective visual.", "visualGoal": "Two squares side by side: left shows two green triangles joined with SrcOver (visible red seam along diagonal), right uses Plus blend mode in a layer (seamless green coverage)", "suggestedControls": ["Blend mode selector"], "category": "Drawing", "skiaSharpApis": ["SKPaint.BlendMode", "SKCanvas.SaveLayer", "SKCanvas.DrawPath"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "points.cpp", "name": "Draw Points Modes", "description": "Demonstrates all three point drawing modes: polygon (connected lines), lines (pairs), and individual points with various colors and stroke settings. Includes a mask filter variant.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPoints", "SkCanvas::PointMode", "SkPaint::setStrokeCap", "SkPaint::setStrokeWidth", "SkMaskFilter::MakeBlur"], "notes": "Good basic drawing demo showing DrawPoints in all three modes. The mask filter variant shows blurred points which is visually appealing.", "visualGoal": "Random points connected as polygon (red), as line pairs (green), and as individual dots (blue then white) overlaid. Second GM shows blurred vs crisp points with round and square caps.", "suggestedControls": ["Point mode selector (Points/Lines/Polygon)", "Stroke width slider", "Cap style selector", "Point count slider"], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawPoints", "SKPaint.StrokeCap", "SKPaint.StrokeWidth", "SKMaskFilter.CreateBlur"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "poly2poly.cpp", "name": "Poly-to-Poly Matrix Transform", "description": "Demonstrates SkMatrix::PolyToPoly which computes a matrix that maps N source points to N destination points. Shows 1-point (translate), 2-point (rotate/scale), 3-point (affine), and 4-point (perspective) transforms.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkMatrix::PolyToPoly", "SkCanvas::concat", "SkCanvas::drawRect", "SkCanvas::drawLine"], "notes": "Excellent educational demo of the poly-to-poly matrix computation. Shows progressive complexity from 1 to 4 control points, each adding a degree of transformation freedom.", "visualGoal": "Four transformed squares with diagonal lines and a red 'X' glyph: translate-only (1pt), rotate+scale (2pt), affine skew (3pt), and perspective warp (4pt)", "suggestedControls": ["Draggable source/destination control points", "Number of points selector (1-4)"], "category": "Canvas Operations", "skiaSharpApis": ["SKMatrix.CreatePolyToPolyMapping", "SKCanvas.Concat", "SKCanvas.DrawRect", "SKCanvas.DrawLine"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "polygonoffset.cpp", "name": "Polygon Inset/Offset", "description": "Tests polygon inset (convex) and offset (simple) operations on various polygon shapes including rectangles, trapezoids, teardrops, stars, dumbbells, and crown shapes.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkInsetConvexPolygon", "SkOffsetSimplePolygon"], "key_apis": ["SkInsetConvexPolygon", "SkOffsetSimplePolygon", "SkCanvas::drawPath", "SkPath::Polygon"], "notes": "Uses internal Skia polygon utility functions (SkPolyUtils.h) not exposed in SkiaSharp. The visual output of nested inset polygons is appealing but the core APIs aren't available.", "visualGoal": "Grid of polygon shapes with concentric inset/offset contours drawn as colored nested outlines, showing how polygons shrink or grow while maintaining their shape character", "suggestedControls": [], "category": "Geometry", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath"], "sampleStatus": "none"}, {"file": "polygons.cpp", "name": "Polygon Rendering Styles", "description": "Draws 8 different polygons (triangle, trapezoid, diamond, octagon, 32-gon, concave quad, stairs, star) with various stroke widths, join styles, and fill modes.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPaint::setStrokeJoin", "SkPaint::setStrokeWidth", "SkPaint::Style", "SkPathBuilder"], "notes": "Good reference for how stroke joins and fill styles affect polygon rendering. Shows miter, round, and bevel joins with thin, medium, and thick strokes.", "visualGoal": "Large grid of 8 polygon shapes repeated across rows with different stroke widths (0, 10, 40), join types (miter, round, bevel), and styles (stroke, stroke+fill, fill) in random colors", "suggestedControls": ["Stroke width slider", "Join style selector", "Fill style selector", "Polygon shape selector"], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPaint.StrokeJoin", "SKPaint.StrokeWidth", "SKPaint.Style", "SKPath"], "sampleStatus": "none"}, {"file": "postercircle.cpp", "name": "3D Poster Circle", "description": "Animated 3D carousel of numbered poster cards rotating in three rings using SkM44 perspective projection. Mimics a CSS 3D poster circle effect with back-to-front rendering.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkM44::Perspective", "SkM44::Rotate", "SkM44::Translate", "SkCanvas::concat", "SkCanvas::drawImageRect", "SkCanvas::drawRRect", "SkSurfaces::Raster"], "notes": "Visually impressive 3D animation. Uses SkM44 for true 3D perspective which maps to SKMatrix44 in SkiaSharp. Would make an excellent animated gallery sample.", "visualGoal": "Three rings of numbered poster cards arranged in a 3D circle, rotating around the Y axis. Cards in front overlap cards behind, with subtle transparency. Animated rotation.", "suggestedControls": ["Rotation speed slider", "Ring count slider", "Perspective depth slider", "Card opacity slider"], "category": "Canvas Operations", "skiaSharpApis": ["SKCanvas.Concat", "SKCanvas.DrawImage", "SKCanvas.DrawRoundRect", "SKSurface.Create"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "preservefillrule.cpp", "name": "Preserve Fill Rule", "description": "Tests that fill rules (winding vs even-odd) are preserved correctly for star shapes. Draws 5-point and 7-point stars with both fill rules to show visual difference.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPath::setFillType", "SkPathFillType::kWinding", "SkPathFillType::kEvenOdd"], "notes": "Good educational demo of winding vs even-odd fill on star shapes. Winding fills the entire star; even-odd creates a pentagram/heptagram pattern with holes.", "visualGoal": "2x2 grid of green stars: top row uses winding fill (solid stars), bottom row uses even-odd fill (stars with hollow centers). Left column is 7-point star, right is 5-point star.", "suggestedControls": ["Star point count slider", "Fill type selector"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.FillType"], "sampleStatus": "none"}, {"file": "quadpaths.cpp", "name": "Quadratic Path Rendering", "description": "Tests quadratic Bezier path rendering with all combinations of fill types (winding, even-odd, inverse variants), paint styles (fill, stroke, stroke+fill), and line cap/join types.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::quadTo", "SkCanvas::drawPath", "SkCanvas::clipRect", "SkPaint::setStrokeCap", "SkPaint::setStrokeJoin", "SkPaint::Style"], "notes": "Comprehensive test of quadratic curve rendering. Two GMs: open quad and closed quad. Good reference for understanding fill rules and stroke styles on curves.", "visualGoal": "Grid of quadratic Bezier curves drawn into rectangle clips with different styles (fill/stroke/both), fill types (winding/even-odd/inverse), and cap types (butt/round/square) with labels", "suggestedControls": ["Fill type selector", "Stroke style selector", "Cap/join type selector", "Stroke width slider"], "category": "Paths", "skiaSharpApis": ["SKPath.QuadTo", "SKCanvas.DrawPath", "SKCanvas.ClipRect", "SKPaint.StrokeCap", "SKPaint.StrokeJoin", "SKPaint.Style"], "sampleStatus": "none"}, {"file": "radial_gradient_precision.cpp", "name": "Radial Gradient Precision", "description": "Tests radial gradient rendering precision by creating a gradient centered far from the viewport origin (1000,1000) and drawing it across the visible area to check for banding artifacts.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::RadialGradient", "SkCanvas::drawPaint"], "notes": "Simple precision regression test. Just a smooth black-to-green gradient. Not visually exciting but confirms gradient precision is good.", "visualGoal": "Smooth repeating radial gradient transitioning from black to green, verifying no visible banding or precision artifacts", "suggestedControls": [], "category": "Shaders", "skiaSharpApis": ["SKShader.CreateRadialGradient", "SKCanvas.DrawPaint"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "rasterhandleallocator.cpp", "name": "Raster Handle Allocator", "description": "Tests the SkRasterHandleAllocator API for integrating Skia with native platform graphics systems (CGContext on Mac, HDC/GDI on Windows). Draws rects, ovals, layers through platform APIs.", "interesting": "low", "apis_available": false, "missing_apis": ["SkRasterHandleAllocator"], "key_apis": ["SkRasterHandleAllocator", "SkCanvas::accessTopRasterHandle", "SkCanvas::saveLayerAlpha", "SkCanvas::drawOval"], "notes": "Platform-specific interop API not exposed in SkiaSharp. The visual output is just colored rectangles and ovals. Not suitable for gallery.", "visualGoal": "Colored rectangles and ovals drawn through platform-native graphics APIs (CoreGraphics/GDI) composited with Skia layers, showing interop capability", "suggestedControls": [], "category": "Canvas Operations", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "readpixels.cpp", "name": "ReadPixels Color Space Conversion", "description": "Tests reading pixels from images into different color types (RGBA8888, BGRA8888, RGBAF16), alpha types (premul, unpremul), and color spaces (wide gamut, sRGB, small gamut). Includes codec and picture image variants.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage::readPixels", "SkColorSpace::MakeRGB", "SkColorSpace::MakeSRGB", "SkImages::DeferredFromPicture", "SkImages::DeferredFromEncodedData"], "notes": "Color management correctness test. The visual output is grids of small icons in different color interpretations. Educational for understanding color spaces but not visually impressive.", "visualGoal": "Grid of small Chrome icons and colored circle drawings rendered in different color type and color space combinations, showing subtle color shifts between wide, sRGB, and narrow gamut spaces", "suggestedControls": [], "category": "Images", "skiaSharpApis": ["SKImage.ReadPixels", "SKColorSpace.CreateRgb", "SKColorSpace.CreateSrgb", "SKImage.FromPicture", "SKImage.FromEncodedData"], "sampleStatus": "similar", "matchedSample": "Image Decoder"}, {"file": "recordopts.cpp", "name": "Recording Optimizations", "description": "Tests picture recording optimizations like alpha folding in saveLayer sequences. Draws patterns that verify the optimizer doesn't change observable rendering when folding alpha from outer saveLayer to inner draws.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::saveLayer", "SkCanvas::drawRect", "SkCanvas::drawImage", "SkColorFilters::TableARGB", "SkImageFilters::ColorFilter", "SkPictureRecorder"], "notes": "Internal optimization correctness test. Uses GrDirectContext for GPU flushing but core logic is CPU-based. Not visually interesting for a gallery.", "visualGoal": "Grid of colored rectangles in two columns verifying that optimized and unoptimized paths produce identical results", "suggestedControls": [], "category": "Canvas Operations", "skiaSharpApis": ["SKCanvas.SaveLayer", "SKCanvas.DrawRect", "SKCanvas.DrawImage", "SKColorFilter.CreateTable", "SKImageFilter.CreateColorFilter", "SKPictureRecorder"], "sampleStatus": "none"}, {"file": "rect_poly_stroke.cpp", "name": "Rectangle Polygon Strokes", "description": "Compares drawing stroked rectangles via drawRect vs drawPath(SkPath::Rect) with various stroke joins (miter, round, bevel), widths, and rotations. Shows how degenerate rects (zero-width, zero-height) behave under different stroke settings.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkCanvas::drawPath", "SkPaint::setStrokeJoin", "SkPaint::setStrokeWidth", "SkCanvas::rotate"], "notes": "Educational about stroke join behavior on rectangles. Useful for showing how different join types affect corners.", "visualGoal": "Grid of stroked rectangles and paths at various rotations, showing miter/round/bevel join differences, with green hairline overlays", "suggestedControls": ["Stroke width slider", "Join type picker (Miter/Round/Bevel)", "Rotation angle slider"], "category": "Geometry", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.DrawPath", "SKPaint.StrokeJoin", "SKPaint.StrokeWidth", "SKCanvas.RotateDegrees"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "rectangletexture.cpp", "name": "Rectangle Texture (GL)", "description": "Tests GL_TEXTURE_RECTANGLE extension by creating rectangle textures and drawing them with various sampling modes, tile modes, and local matrices. Requires OpenGL backend with rectangle texture support.", "interesting": "low", "apis_available": false, "missing_apis": ["GrDirectContext", "GrBackendTexture", "SkImages::AdoptTextureFrom"], "key_apis": ["GrDirectContext::createBackendTexture", "SkImages::AdoptTextureFrom", "SkImage::makeShader", "SkCanvas::drawImage"], "notes": "GPU-specific (OpenGL only). Requires rectangle texture extension. Cannot be ported to SkiaSharp as it uses GPU-specific APIs.", "visualGoal": "Grid of gradient circle images rendered with different sampling/tile modes from GL rectangle textures", "suggestedControls": [], "category": "Images", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "rendertomipmappedyuvimageplanes.cpp", "name": "Render to Mipmapped YUV Image Planes", "description": "Graphite-specific test that renders a source image into separate YUV planes with mipmapping, then reconstructs a YUVA image from those planes.", "interesting": "low", "apis_available": false, "missing_apis": ["Graphite::Recorder", "SkSurfaces::RenderTarget (Graphite)", "SkImages::TextureFromYUVAImages"], "key_apis": ["SkYUVAInfo", "SkSurfaces::RenderTarget", "SkImages::TextureFromYUVAImages", "SkColorFilters::Matrix"], "notes": "Graphite-only test. Cannot be ported to SkiaSharp.", "visualGoal": "Three small thumbnails of a mandrill image converted through different YUV subsampling configurations", "suggestedControls": [], "category": "Images", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "repeated_bitmap.cpp", "name": "Repeated Rotated Bitmap", "description": "Draws a 4x4 grid of rotated images on a checkerboard background. Each cell rotates the image by an increasing angle, creating an interesting tiled rotation pattern.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkCanvas::rotate", "SkCanvas::scale", "SkCanvas::drawRect"], "notes": "Nice visual pattern demonstrating rotation and image drawing. Good for showing canvas transformations.", "visualGoal": "4x4 grid of the same image drawn at increasing rotation angles on a checkerboard background with dark rect borders", "suggestedControls": ["Rotation increment slider", "Image picker"], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.RotateDegrees", "SKCanvas.Scale", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "resizeimagefilter.cpp", "name": "Resize Image Filter", "description": "Tests SkImageFilters::MatrixTransform for downscaling drawn content with different sampling options (nearest, linear, mipmap linear, cubic, aniso). Draws green ovals through resize filters.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::MatrixTransform", "SkCanvas::saveLayer", "SkCanvas::drawOval", "SkSurfaces::Raster", "SkImageFilters::Image"], "notes": "Educational for understanding different sampling qualities in image filters. Good comparison of filtering modes.", "visualGoal": "Row of small green ovals, each filtered with a different sampling mode showing quality differences", "suggestedControls": ["Sampling mode picker", "Scale factor slider"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateMatrix", "SKCanvas.SaveLayer", "SKCanvas.DrawOval", "SKSurface.Create", "SKImageFilter.CreateImage"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "rippleshadergm.cpp", "name": "Ripple Shader Effect", "description": "Implements Android's Material Design ripple shader effect using SkRuntimeEffect. Animates a water-ripple-like distortion with sparkle particles over a mandrill image, mimicking touch feedback.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkRuntimeEffect::MakeForShader", "SkRuntimeShaderBuilder", "SkImage::makeShader", "SkCanvas::drawRect"], "notes": "Visually stunning animated effect. Great showcase for SKRuntimeEffect with complex uniforms and child shaders. Requires external SkSL resource file for the ripple shader.", "visualGoal": "Mandrill image overlaid with an animated ripple effect showing concentric rings, noise-based turbulence, and sparkle particles", "suggestedControls": ["Animation time slider", "Ripple origin position", "Ripple color picker", "Max radius slider"], "category": "Shaders", "skiaSharpApis": ["SKRuntimeEffect.BuildShader", "SKRuntimeEffectBuilder", "SKImage.ToShader", "SKCanvas.DrawRect"], "sampleStatus": "none"}, {"file": "roundrects.cpp", "name": "Round Rectangles Gallery", "description": "Comprehensive test of round rectangles drawn with various paint styles (fill, stroke, stroke+fill), matrix transforms (scale, rotate, skew), stroke widths, and radial gradient shaders. Covers normal, tall/skinny, wide/short, and degenerate cases.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRRect", "SkCanvas::drawRoundRect", "SkRRect::setRectXY", "SkShaders::RadialGradient", "SkCanvas::concat", "SkMatrix"], "notes": "Excellent reference for round rect rendering with various configurations. Great Gallery sample showing style/transform combinations.", "visualGoal": "Large grid of colorful round rectangles with different styles, transforms, stroke widths, and a gradient-filled set, on black background", "suggestedControls": ["Paint style picker (Fill/Stroke/Both)", "Stroke width slider", "Corner radius slider", "Transform type picker"], "category": "Geometry", "skiaSharpApis": ["SKCanvas.DrawRoundRect", "SKRoundRect.SetRectXY", "SKShader.CreateRadialGradient", "SKCanvas.Concat", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "rrect.cpp", "name": "RRect Inset and Blur", "description": "Two GMs: (1) RRectGM demonstrates SkRRect inset operations with four different algorithms applied to rect/oval/simple/complex rrects. (2) RRectBlurGM compares drawRRect vs drawPath with blur mask filters, showing pixel-level differences.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRRect", "SkRRect::setRectRadii", "SkRRect::setNinePatch", "SkMaskFilter::MakeBlur", "SkCanvas::drawPath", "SkCanvas::drawString"], "notes": "Educational for understanding rrect geometry and blur behavior. The blur comparison is useful for quality analysis.", "visualGoal": "Grid of concentric rrect outlines showing different inset strategies; plus blurred rrects comparing drawRRect vs drawPath rendering with a diff view", "suggestedControls": ["Inset amount slider", "Blur sigma slider", "RRect type picker"], "category": "Geometry", "skiaSharpApis": ["SKCanvas.DrawRoundRect", "SKRoundRect.SetRectRadii", "SKRoundRect.SetNinePatch", "SKMaskFilter.CreateBlur", "SKCanvas.DrawPath"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "rrectclipdrawpaint.cpp", "name": "RRect Clip with DrawPaint", "description": "Tests replacing rrect clip + drawPaint with drawRRect optimization. Draws nested rrect-clipped solid colors and gradient fills at decreasing scales to exercise the GPU optimization path.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipRRect", "SkCanvas::drawPaint", "SkCanvas::saveLayer", "SkShaders::LinearGradient", "SkShaders::RadialGradient", "SkMatrix::setScale"], "notes": "Demonstrates clip-based rendering pattern with rrects. Good for showing how clipping and saveLayer work together.", "visualGoal": "Four nested rounded rectangles in red, blue, cyan gradient, and magenta radial gradient, each zoomed out progressively", "suggestedControls": ["Corner radius sliders", "Zoom scale slider"], "category": "Canvas Operations", "skiaSharpApis": ["SKCanvas.ClipRoundRect", "SKCanvas.DrawPaint", "SKCanvas.SaveLayer", "SKShader.CreateLinearGradient", "SKShader.CreateRadialGradient"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "rrects.cpp", "name": "RRect Variants (Draw/Clip/Effect)", "description": "Tests a comprehensive set of 43 SkRRect configurations (simple, complex radii, oversized radii, nine-patch) in five modes: BW draw, AA draw, BW clip, AA clip, and GPU effect. Also includes stroke_rect_rrects GM testing filled/stroked rects and rrects with various widths and joins.", "interesting": "medium", "apis_available": true, "missing_apis": ["GrRRectEffect (GPU-only, but draw/clip modes don't need it)"], "key_apis": ["SkCanvas::drawRRect", "SkCanvas::clipRRect", "SkRRect::setRectRadii", "SkPaint::setStrokeJoin", "SkPaint::setStrokeWidth"], "notes": "The draw and clip variants are fully portable. The GPU effect variant requires Ganesh internals. The stroke_rect_rrects sub-GM is a great reference for stroked geometry.", "visualGoal": "Tiled grid of many rrect shapes with various corner configurations, followed by stroked rect and rrect variations", "suggestedControls": ["Mode picker (Fill/Stroke/Clip)", "Antialiasing toggle", "Corner radius editor"], "category": "Geometry", "skiaSharpApis": ["SKCanvas.DrawRoundRect", "SKCanvas.ClipRoundRect", "SKRoundRect.SetRectRadii", "SKPaint.StrokeJoin", "SKPaint.StrokeWidth"], "sampleStatus": "similar", "matchedSample": "Nine-Patch"}, {"file": "rsxtext.cpp", "name": "RSXform Text Blob with Shader", "description": "Tests RSXform text blobs (text with per-glyph rotation/scale/translation) combined with a tiled image shader and local matrix variations. Verifies that the yellow grid pattern stays aligned between text and background.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkTextBlobBuilder::allocRunRSXform", "SkCanvas::drawTextBlob", "SkImage::makeShader", "SkShader::makeWithLocalMatrix"], "notes": "Demonstrates RSXform text rendering with shader alignment. Useful for showing shader-based text effects.", "visualGoal": "Four quadrants showing 'TEST' text with a tiled yellow/green grid shader, each with different local matrix and rotation transforms", "suggestedControls": ["Shader scale slider", "Rotation angle slider"], "category": "Text", "skiaSharpApis": ["SKTextBlob.Create", "SKCanvas.DrawTextBlob", "SKImage.ToShader", "SKShader.WithLocalMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "runtimecolorfilter.cpp", "name": "Runtime Color Filters", "description": "Demonstrates SkRuntimeEffect color filters including no-op, luma extraction, and tone-mapping (ternary/if/early-return variants). Also tests runtime color filters on vertices, atlas, and patch drawing primitives.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkRuntimeEffect::MakeForColorFilter", "SkRuntimeEffect::makeColorFilter", "SkCanvas::drawImage", "SkCanvas::drawVertices", "SkCanvas::drawAtlas", "SkCanvas::drawPatch"], "notes": "Excellent showcase for runtime color filters applied to different draw types. The tone-mapping examples are practical and educational. Great Gallery sample.", "visualGoal": "Grid of mandrill images with different color filter effects: original, luma grayscale, and three tone-mapping variants; plus color-filtered vertices, atlas, and patches", "suggestedControls": ["Color filter effect picker", "Custom SkSL editor"], "category": "Color Filters", "skiaSharpApis": ["SKRuntimeEffect.BuildColorFilter", "SKRuntimeEffect.ToColorFilter", "SKCanvas.DrawImage", "SKCanvas.DrawVertices", "SKCanvas.DrawAtlas", "SKCanvas.DrawPatch"], "sampleStatus": "similar", "matchedSample": "Vertex Mesh"}, {"file": "runtimefunctions.cpp", "name": "Runtime Shader Functions", "description": "Creates a mesmerizing procedural 3D-like pattern using a runtime shader with raymarching, rotations, and color mapping. Based on a tweet by @notargs demonstrating compact shader art.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkRuntimeEffect::MakeForShader", "SkRuntimeEffect::makeShader", "SkData::MakeWithCopy", "SkCanvas::drawRect"], "notes": "Visually stunning procedural shader. Great showcase for the power of runtime shaders. Simple to port - just a shader and a drawRect.", "visualGoal": "Vibrant procedural pattern with twisting, colorful 3D-like tubular structures created by raymarching through a distance field", "suggestedControls": ["Animation time slider", "Resolution scale slider"], "category": "Shaders", "skiaSharpApis": ["SKRuntimeEffect.BuildShader", "SKRuntimeEffect.ToShader", "SKData.CreateCopy", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "Shader Playground"}, {"file": "runtimeimagefilter.cpp", "name": "Runtime Image Filter Effects", "description": "Tests SkImageFilters::RuntimeShader for distortion (sine wave displacement) and unsharp masking. Applies runtime shaders as image filters on text and images with various canvas transforms.", "interesting": "high", "apis_available": false, "missing_apis": ["SkImageFilters::RuntimeShader"], "key_apis": ["SkImageFilters::RuntimeShader", "SkRuntimeShaderBuilder", "SkImageFilters::Blur", "SkCanvas::saveLayer"], "notes": "Very impressive visual effects but SkImageFilters::RuntimeShader is NOT available in SkiaSharp. The runtime shader itself is available, but the image filter variant that wraps it is not exposed.", "visualGoal": "Sine-wave-distorted text panels at various transforms, plus side-by-side comparison of original vs unsharp-masked mandrill image", "suggestedControls": [], "category": "Image Filters", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "runtimeintrinsics.cpp", "name": "Runtime Shader Intrinsics", "description": "Comprehensive visual test of SkSL intrinsic functions organized by category: trigonometric (sin, cos, tan, asin, acos, atan), exponential (pow, exp, log, sqrt), common (abs, sign, floor, ceil, fract, mod, mix, step, smoothstep, clamp), geometric (length, distance, dot, cross, normalize), matrix (inverse, determinant), and relational functions.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkRuntimeEffect::MakeForShader", "SkRuntimeShaderBuilder", "SkCanvas::drawRect", "SkCanvas::drawSimpleText"], "notes": "Educational reference for SkSL built-in functions. Each function is visualized as a grayscale plot. Useful as a developer reference but not visually exciting for a gallery.", "visualGoal": "Grid of labeled boxes, each showing a grayscale visualization of a different SkSL math function (sin curve, exponential curve, etc.)", "suggestedControls": ["Function category picker", "Input range slider"], "category": "Shaders", "skiaSharpApis": ["SKRuntimeEffect.BuildShader", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "runtimeshader.cpp", "name": "Runtime Shader Collection", "description": "Collection of runtime shader demos including: simple color gradient, threshold-based image blending, animated spiral effect, unsharp masking, 3D color cube LUT, super-rounded-rect clipping, custom linear gradient, child sampling, normal/lighting shaders, and deferred shader compilation.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkRuntimeEffect::MakeForShader", "SkRuntimeShaderBuilder", "SkRuntimeEffect::makeColorFilter", "SkImage::makeShader", "SkImageFilters::Blur", "SkCanvas::drawRRect"], "notes": "Treasure trove of runtime shader examples. Multiple GMs worth porting individually. The spiral, threshold, unsharp, and color cube demos are particularly impressive. Each sub-GM demonstrates a different runtime shader technique.", "visualGoal": "Multiple demos: gradient color field, threshold image blend, animated spiral, sharpened image, 3D color cube lookup, super-rrect clipping, custom gradients, and lighting effects", "suggestedControls": ["Demo picker", "Animation time slider", "Threshold slider", "Color cube LUT picker"], "category": "Shaders", "skiaSharpApis": ["SKRuntimeEffect.BuildShader", "SKRuntimeEffect.ToShader", "SKRuntimeEffect.BuildColorFilter", "SKImage.ToShader", "SKImageFilter.CreateBlur", "SKCanvas.DrawRoundRect"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "samplerstress.cpp", "name": "GPU Sampler Stress Test", "description": "Stress tests GPU samplers by drawing a textured, blur-masked letter 'M' clipped by an AA round-rect path. Combines texture shader, blur mask filter, and AA clipping simultaneously.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawString", "SkBitmap::makeShader", "SkMaskFilter::MakeBlur", "SkCanvas::clipPath", "SkRRect"], "notes": "GPU stress test, not visually interesting. The combination of shader + mask filter + clip is technically interesting but the visual output is just a letter M.", "visualGoal": "Letter 'M' drawn with red/green striped texture and blur, clipped by a rounded rect, with outline overlays", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawText", "SKBitmap.ToShader", "SKMaskFilter.CreateBlur", "SKCanvas.ClipPath"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "savelayer.cpp", "name": "SaveLayer Techniques", "description": "Multiple saveLayer demonstrations: (1) initFromPrev flag for super-bright punch-through effect, (2) save_behind for text list fade-out treatment, (3) F16 color type precision test, (4) alpha optimization correctness with atlas/vertices/points/image_set.", "interesting": "medium", "apis_available": true, "missing_apis": ["SkCanvasPriv::SaveBehind", "SkCanvasPriv::DrawBehind", "experimental_DrawEdgeAAImageSet"], "key_apis": ["SkCanvas::saveLayer", "SkCanvas::SaveLayerRec", "SkBlendMode::kPlus", "SkBlendMode::kClear", "SkCanvas::drawCircle", "SkCanvas::drawTextBlob", "SkCanvas::drawAtlas", "SkCanvas::drawVertices"], "notes": "The initFromPrev demo is cool and portable. The save_behind uses private API. The F16 and skbug_14554 tests are more internal. Some sub-GMs use private canvas APIs not available in SkiaSharp.", "visualGoal": "Mandrill with bright halo and punched circle; fading text list; sweep gradient precision comparison; atlas/vertex alpha optimization comparison", "suggestedControls": ["BlendMode picker", "Alpha slider"], "category": "Canvas Operations", "skiaSharpApis": ["SKCanvas.SaveLayer", "SKCanvas.DrawCircle", "SKCanvas.DrawTextBlob", "SKCanvas.DrawAtlas", "SKCanvas.DrawVertices"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "scaledemoji.cpp", "name": "Scaled Emoji Rendering", "description": "Tests emoji rendering at multiple sizes (70, 180, 270, 340) across different emoji font formats (CBDT, SBIX, COLR, SVG). Includes standard, positioned (text blob), and perspective-transformed variants.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawSimpleText", "SkCanvas::drawTextBlob", "SkTextBlobBuilder::allocRunPosH", "SkFont::setSize", "SkMatrix::setPerspY"], "notes": "Platform/font dependent - requires specific emoji font formats that may not be available in all SkiaSharp deployments. More of a correctness test than a gallery demo.", "visualGoal": "Rows of emoji characters at increasing sizes on a gray background, testing bitmap and vector emoji rendering", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawText", "SKCanvas.DrawTextBlob", "SKFont.Size"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "scaledemoji_rendering.cpp", "name": "Scaled Emoji Rendering Comparison", "description": "Compares emoji rendering across all font formats (COLR, SBIX, CBDT, Test, SVG) at two sizes (70, 150) with regular and fake-bold variants. Measures glyph bounds and advances.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawSimpleText", "SkFont::setEmbolden", "SkFont::measureText", "SkFont::setSubpixel"], "notes": "Font format comparison test. Not visually exciting and depends on platform emoji font availability.", "visualGoal": "Grid of emoji at different sizes and bold settings across multiple font formats on gray background", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawText", "SKFont.Embolden", "SKFont.MeasureText"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "scaledrects.cpp", "name": "Scaled Rectangles", "description": "Bug regression test (crbug.com/1442854) drawing two equivalent device-space rectangles with wildly different sizes and matrix scales. Tests that extremely small skew values in the DMSAA code path are handled correctly.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkCanvas::setMatrix", "SkCanvas::clipRect", "SkMatrix::MakeAll", "SkBlendMode::kPlus"], "notes": "Bug regression test with extreme matrix values. Not visually interesting for a gallery.", "visualGoal": "Small clipped rectangle area showing overlapping blue and red rectangles drawn through extreme matrix transforms", "suggestedControls": [], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.SetMatrix", "SKCanvas.ClipRect", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "scaledstrokes.cpp", "name": "Scaled Strokes", "description": "Tests stroked primitives (cubic Bézier circles, circles, rectangles, lines) at different canvas scales (4x, 3x, 2x, 1x) with compensating stroke widths, both with and without antialiasing.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkCanvas::drawCircle", "SkCanvas::drawRect", "SkCanvas::drawLine", "SkCanvas::scale", "SkPaint::setStrokeWidth"], "notes": "Educational about how scaling affects stroke rendering. Shows that scaled-down strokes should look identical to unscaled strokes with adjusted width.", "visualGoal": "Four rows of shapes (cubic circles, circles, rectangles, diagonal lines) at decreasing scales, with and without antialiasing", "suggestedControls": ["Scale factor slider", "Stroke width slider", "Antialiasing toggle"], "category": "Drawing", "skiaSharpApis": ["SKCanvas.DrawPath", "SKCanvas.DrawCircle", "SKCanvas.DrawRect", "SKCanvas.DrawLine", "SKCanvas.Scale", "SKPaint.StrokeWidth"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "shadermaskfilter.cpp", "name": "Shader Mask Filter", "description": "Demonstrates SkShaderMaskFilter which uses a gradient shader as a mask filter, creating a gradient transparency effect on an oval.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkShaderMaskFilter::Make"], "key_apis": ["SkShaderMaskFilter::Make", "SkShaders::LinearGradient", "SkCanvas::drawOval"], "notes": "SkShaderMaskFilter is NOT available in SkiaSharp. This creates an interesting visual effect (gradient fade-out mask) but cannot be ported without the shader mask filter API.", "visualGoal": "Red oval with a gradient transparency mask that fades from opaque to transparent diagonally", "suggestedControls": [], "category": "Effects", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Gradient"}, {"file": "shaderpath.cpp", "name": "Shader on Path", "description": "Draws cubic Bézier paths filled with a bitmap shader using different tile modes (repeat, mirror) and local matrix transforms (translate, rotate, scale).", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap::makeShader", "SkCanvas::drawPath", "SkPathBuilder::cubicTo", "SkMatrix::setTranslate", "SkMatrix::postRotate"], "notes": "Educational about tiled bitmap shaders on paths with local matrices. Good companion to shadertext3.", "visualGoal": "Grid of wavy cubic paths filled with a colorful gradient bitmap texture using different tile modes and local matrix transforms", "suggestedControls": ["Tile mode picker (Repeat/Mirror)", "Local matrix rotation slider"], "category": "Shaders", "skiaSharpApis": ["SKBitmap.ToShader", "SKCanvas.DrawPath", "SKPath.CubicTo", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "shadertext3.cpp", "name": "Shader on Text", "description": "Draws large text glyphs filled with a bitmap shader using different tile modes (repeat, mirror) and local matrix transforms. Similar to shaderpath but applied to text.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap::makeShader", "SkCanvas::drawString", "SkFont", "SkMatrix::postRotate", "SkMatrix::postScale"], "notes": "Educational about textured text rendering. Shows how bitmap shaders interact with different tile modes when applied to text.", "visualGoal": "Large letter 'B' characters filled with a colorful gradient bitmap texture using different tile modes and transforms, with outline overlays", "suggestedControls": ["Tile mode picker", "Text input", "Local matrix rotation slider"], "category": "Text", "skiaSharpApis": ["SKBitmap.ToShader", "SKCanvas.DrawText", "SKFont", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "shadowutils.cpp", "name": "Shadow Utilities", "description": "Comprehensive shadow rendering demo using SkShadowUtils::DrawShadow for ambient and spot shadows on various shapes (rrect, rect, circle, cubics, oval, star, dumbbell). Includes debug coloring, occluder modes, transforms, and directional light variants.", "interesting": "high", "apis_available": false, "missing_apis": ["SkShadowUtils::DrawShadow"], "key_apis": ["SkShadowUtils::DrawShadow", "SkPath::RRect", "SkPath::Rect", "SkPath::Circle", "SkCanvas::drawPath"], "notes": "Visually impressive shadow rendering but SkShadowUtils::DrawShadow is NOT available in SkiaSharp. This is a significant missing feature for Material Design-style UIs.", "visualGoal": "Grid of shapes with ambient (red) and spot (blue) shadows, including convex and concave paths, with transforms and directional lighting", "suggestedControls": [], "category": "Effects", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "shallowgradient.cpp", "name": "Shallow Gradient", "description": "Tests rendering of subtle gradients with very similar start/end colors (#555555 to #444444) using all four gradient types: linear, radial, conical, and sweep. Includes dithered and non-dithered variants.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient", "SkShaders::RadialGradient", "SkShaders::TwoPointConicalGradient", "SkShaders::SweepGradient", "SkPaint::setDither"], "notes": "Educational about gradient banding and dithering. Subtle gradients reveal quality differences that dithering can address. Good for demonstrating all gradient types.", "visualGoal": "Full-screen subtle dark gray gradient showing minimal color difference, testing for banding artifacts with and without dithering", "suggestedControls": ["Gradient type picker (Linear/Radial/Conical/Sweep)", "Dithering toggle", "Color difference slider"], "category": "Shaders", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKShader.CreateRadialGradient", "SKShader.CreateTwoPointConicalGradient", "SKShader.CreateSweepGradient"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "shapes.cpp", "name": "Shapes and Inner Shapes", "description": "Two GMs: (1) SimpleShapes draws rotated ovals, rects, and rrects (simple, nine-patch, complex radii) with semi-transparent random colors. (2) InnerShapes draws double round rects (drawDRRect) with inner shapes transformed to fit inside outer shapes.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkCanvas::drawDRRect"], "key_apis": ["SkCanvas::drawOval", "SkCanvas::drawRect", "SkCanvas::drawRRect", "SkCanvas::drawDRRect", "SkRRect::setNinePatch", "SkRRect::setRectRadii", "SkCanvas::rotate"], "notes": "SimpleShapesGM is fully portable. InnerShapesGM uses drawDRRect which is not exposed in SkiaSharp. The simple shapes variant demonstrates alpha-blended rotated geometry well.", "visualGoal": "Rotated semi-transparent colorful shapes (ovals, rects, rrects with various corner configs) on white background; inner variant shows concentric double-rrect shapes", "suggestedControls": ["Shape type picker", "Rotation angle slider", "Alpha slider"], "category": "Geometry", "skiaSharpApis": ["SKCanvas.DrawOval", "SKCanvas.DrawRect", "SKCanvas.DrawRoundRect", "SKRoundRect.SetNinePatch", "SKRoundRect.SetRectRadii", "SKCanvas.RotateDegrees"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "sharedcorners.cpp", "name": "Shared Corners AA Test", "description": "Tests analytic antialiasing with triangles sharing corners at various angles: adjacent rectangles, obtuse angles, right angles, and acute angles. Draws with even-odd fill rule and sub-pixel jittering to stress AA accuracy.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder", "SkPathFillType::kEvenOdd", "SkPath::makeTransform", "SkMatrix::setRotate"], "notes": "Internal AA quality test. Verifies that shared triangle edges don't produce gaps or double-coverage artifacts. Not visually exciting for a gallery.", "visualGoal": "Grid of small white triangle meshes on blue background at various rotations and sub-pixel offsets, testing edge-sharing AA quality", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.FillType", "SKPath.Transform", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "showmiplevels.cpp", "name": "Show Mip Levels (Explicit)", "description": "Demonstrates mipmap filtering modes by creating an image with explicit solid-color mip levels (red, green, blue) and drawing it at progressively smaller scales across 6 rows, comparing None/Nearest/Linear mipmap modes with Nearest/Linear filter modes.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkMipmapBuilder (internal API for creating custom mip levels)"], "key_apis": ["SkCanvas::drawRect", "SkImage::makeShader", "SkPaint::setShader", "SkMipmapBuilder"], "notes": "Uses internal SkMipmapBuilder API to manually populate mip levels, which is not exposed in SkiaSharp. The shader tiling and filter mode concepts are available.", "visualGoal": "Grid of 6 rows x ~7 columns showing a spaceship image at decreasing scales. Rows without mipmaps show progressively smaller tiled ships; rows with nearest mipmaps show solid red/green/blue; rows with linear mipmaps show blended colors.", "suggestedControls": ["Filter mode selector (Nearest/Linear)", "Mipmap mode selector (None/Nearest/Linear)", "Scale factor slider"], "category": "Image Filtering", "skiaSharpApis": ["SKCanvas.DrawRect", "SKPaint.Shader", "SKImage.ToShader"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "simpleaaclip.cpp", "name": "Simple Anti-Aliased Clip", "description": "Tests anti-aliased boolean clip operations (Difference and Intersect) using three geometry types: rects, rounded-rect paths, and internal SkAAClip objects. Shows overlapping shapes with clip operations applied.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipRect", "SkCanvas::clipPath", "SkCanvas::drawRect", "SkCanvas::drawString", "SkPath::RRect"], "notes": "The SkAAClip variant uses internal APIs, but the rect and path clip variants are fully reproducible in SkiaSharp. Three separate GMs are registered (rect, path, aaclip).", "visualGoal": "Two columns showing Difference and Intersect clip operations on overlapping rounded rectangles, with colored fill showing the clipped region.", "suggestedControls": ["Clip operation selector (Difference/Intersect)", "Geometry type selector (Rect/Path)"], "category": "Clipping", "skiaSharpApis": ["SKCanvas.ClipRect", "SKCanvas.ClipPath", "SKCanvas.DrawRect", "SKCanvas.DrawText", "SKPath.AddRoundRect"], "sampleStatus": "none"}, {"file": "simplerect.cpp", "name": "Simple Random Rectangles", "description": "Draws 10,000 randomly positioned and sized small rectangles with random colors on a translated canvas, testing basic rect drawing performance with a non-identity transform.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkCanvas::translate", "SkPaint::setColor"], "notes": "Primarily a performance/stress test. Could be adapted as an interactive demo with animation showing random rect generation.", "visualGoal": "A dense field of 10,000 small randomly colored rectangles scattered across an 800x800 canvas, creating a colorful mosaic pattern.", "suggestedControls": ["Rectangle count slider", "Max size slider", "Animate toggle"], "category": "Basic Drawing", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.Translate", "SKPaint.Color"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "skbug1719.cpp", "name": "SkBug 1719 - Blurred Path Through Soft Clip", "description": "Regression test for bug where an anti-aliased blurred path rendered through a soft clip caused incorrect GPU texture reuse. Draws a stroked round rect using blur mask filter and color filter through a clip path.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipPath", "SkCanvas::drawPath", "SkMaskFilter::MakeBlur", "SkColorFilters::Blend", "SkPathBuilder"], "notes": "Bug regression test (skbug prefix). The technique of combining blur mask filter + color filter + clip path is available in SkiaSharp.", "visualGoal": "A thin stroked round rectangle shape on a dark background, testing correct blur mask and soft clip interaction.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.ClipPath", "SKCanvas.DrawPath", "SKMaskFilter.CreateBlur", "SKColorFilter.CreateBlendMode", "SKPath.CubicTo"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "skbug_12212.cpp", "name": "SkBug 12212 - Alpha8 Surface Text", "description": "Regression test for drawing LCD-antialiased text into an Alpha_8 surface with RGB pixel geometry, then compositing onto the main canvas. Tests text rendering in non-standard surface configurations.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkSurfaces::Raster", "SkCanvas::drawTextBlob", "SkTextBlob::MakeFromText", "SkSurface::draw", "SkFont::setEdging"], "notes": "Bug regression test. Tests an edge case in surface/text interaction. The core APIs are available in SkiaSharp.", "visualGoal": "The word 'text' rendered in a large font on a cyan background, drawn first into an Alpha_8 offscreen surface then composited onto the main canvas.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKSurface.Create", "SKCanvas.DrawText", "SKTextBlob.Create", "SKSurface.Draw", "SKFont.Edging"], "sampleStatus": "none"}, {"file": "skbug_257.cpp", "name": "SkBug 257 - Large Translation Precision", "description": "Tests rendering precision when objects are drawn with very large translation offsets (225364 pixels). Draws rects, round rects, points, and text with huge translations, then overlays cyan reference circles without translation to verify alignment.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkCanvas::drawRRect", "SkCanvas::drawPoints", "SkCanvas::drawCircle", "SkCanvas::translate", "SkPaint::setShader"], "notes": "Bug regression test for float precision with large translations. Uses a rotated checkerboard shader which is an interesting pattern. The cyan circles serve as visual verification overlays.", "visualGoal": "A 2x2 grid: top-left has a checkerboard rect, top-right a checkerboard round rect, bottom-left checkerboard points, bottom-right text. Cyan circle outlines overlay each quadrant for alignment verification.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.DrawRoundRect", "SKCanvas.DrawPoints", "SKCanvas.DrawCircle", "SKCanvas.Translate", "SKPaint.Shader"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "skbug_4868.cpp", "name": "SkBug 4868 - ClipRect DrawLine Alignment", "description": "Regression test verifying that clipRect and drawLine align exactly when using the same coordinates, particularly when SkPDF rounds large floats. Draws an X pattern inside a clipped rect.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::clipRect", "SkCanvas::drawLine", "SkCanvas::scale", "SkCanvas::translate"], "notes": "Very minimal bug regression test. Draws two crossing lines inside a tiny clipped area with non-trivial scale and translation.", "visualGoal": "A very small X pattern (two crossing diagonal lines) inside a clipped rectangle, rendered with anti-aliasing at a fractional scale.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.ClipRect", "SKCanvas.DrawLine", "SKCanvas.Scale", "SKCanvas.Translate"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "skbug_5321.cpp", "name": "SkBug 5321 - PDF Text Consistency", "description": "Regression test ensuring two methods of drawing the same text (drawSimpleText and drawTextBlob with manual glyph positioning) produce identical output, particularly in PDF. Uses a combining Unicode character (x + combining grave accent + y).", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawSimpleText", "SkCanvas::drawTextBlob", "SkTextBlobBuilder::allocRunPosH", "SkFont::textToGlyphs", "SkFont::getWidths"], "notes": "Bug regression test for PDF text rendering. Shows TextBlobBuilder usage with manual horizontal positioning, which is educational but the test itself is minimal.", "visualGoal": "Two lines of text showing 'x̀y' (x with combining grave accent followed by y), both lines should look identical.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawText", "SKCanvas.DrawTextBlob", "SKTextBlobBuilder.AllocateHorizontalRun", "SKFont.GetGlyphs"], "sampleStatus": "similar", "matchedSample": "PDF Composer"}, {"file": "skbug_8664.cpp", "name": "SkBug 8664 - Mipmap Scissor Interference", "description": "Regression test for a bug on Adreno 330 GPUs where inline mipmap generation interfered with the scissor test during clipping. Draws an image at multiple scales with a rotated clipped overlay.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkCanvas::clipRect", "SkCanvas::rotate", "SkCanvas::scale", "SkCanvas::drawRect"], "notes": "GPU-specific bug regression test. The pattern of drawing a scaled image with a rotated clipped overlay is reproducible in SkiaSharp.", "visualGoal": "A mandrill image drawn at four progressively smaller scales (1x, 0.5x, 0.25x, 0.125x) with a semi-transparent white rotated rectangle overlay clipped to an inner region of each.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.ClipRect", "SKCanvas.RotateDegrees", "SKCanvas.Scale", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "skbug_8955.cpp", "name": "SkBug 8955 - TextBlob After Zero Scale", "description": "Regression test for a bug where drawing a text blob after a zero-scale draw failed to regenerate the blob's glyph data. First draws at scale(0,0), then restores and draws normally.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawTextBlob", "SkTextBlob::MakeFromText", "SkCanvas::scale", "SkCanvas::save", "SkCanvas::restore"], "notes": "Minimal bug regression test. The pattern of save/scale(0,0)/draw/restore/draw is the core test case.", "visualGoal": "A plus sign '+' character rendered at 50px font size, positioned at (30, 60) on a 100x100 canvas.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawTextBlob", "SKTextBlob.Create", "SKCanvas.Scale", "SKCanvas.Save", "SKCanvas.Restore"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "skbug_9319.cpp", "name": "SkBug 9319 - Blur Outer Region Too Dark", "description": "Regression test for a GPU bug where the outer portion of a rect blur was too dark with a small sigma (0.5). Draws a blurred rect and round rect with their interiors clipped out to highlight the outer blur region.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkMaskFilter::MakeBlur", "SkCanvas::clipRect", "SkCanvas::clipRRect", "SkCanvas::drawRect", "SkCanvas::drawRRect"], "notes": "Bug regression test. The technique of clipping out the interior (kDifference) to show only the blur halo is an interesting visual technique.", "visualGoal": "Two shapes stacked vertically: a rect and a nearly-rect round rect, each with their interiors clipped out so only the outer blur halo (sigma=0.5) is visible.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKMaskFilter.CreateBlur", "SKCanvas.ClipRect", "SKCanvas.ClipRoundRect", "SKCanvas.DrawRect", "SKCanvas.DrawRoundRect"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "skbug_9819.cpp", "name": "SkBug 9819 - RGBA vs BGRA Color Consistency", "description": "Regression test ensuring RGBA_8888 and BGRA_8888 bitmaps both render the same yellow color correctly. Creates 1x1 bitmaps of each type, erases them with yellow, scales up to 128x128 and verifies luma.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkCanvas::scale", "SkBitmap::allocPixels", "SkBitmap::eraseColor", "SkBitmap::asImage"], "notes": "Bug regression test for color type handling. Very minimal visual output - just two yellow squares.", "visualGoal": "Two 128x128 yellow squares stacked vertically, one from RGBA and one from BGRA bitmap. Both should be identical yellow.", "suggestedControls": [], "category": "Bug Regression", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.Scale", "SKBitmap.SetPixel", "SKBitmap.Erase"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "slug.cpp", "name": "Slug Text Rendering", "description": "Tests GPU-accelerated text rendering using SkSlug (pre-processed text blobs for GPU). Compares side-by-side rendering of a text blob vs its Slug equivalent at multiple scales and rotations.", "interesting": "low", "apis_available": false, "missing_apis": ["sktext::gpu::Slug (SkSlug GPU text optimization API)"], "key_apis": ["sktext::gpu::Slug::ConvertBlob", "sktext::gpu::Slug::draw", "SkCanvas::drawTextBlob", "SkTextBlobBuilder"], "notes": "Requires SK_GANESH or SK_GRAPHITE - GPU-only feature. SkSlug is not exposed in SkiaSharp and is a Chromium-specific optimization. The text blob portion could be reproduced but the Slug comparison cannot.", "visualGoal": "Two columns of the word 'hamburgefons' at progressively larger scales with slight rotation, comparing standard text blob rendering (left) to Slug rendering (right).", "suggestedControls": [], "category": "GPU Text", "skiaSharpApis": ["SKCanvas.DrawTextBlob", "SKTextBlobBuilder.AllocateRun"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "smallarc.cpp", "name": "Small Arc Scaled Up", "description": "Draws a small quarter-circle arc (cubic Bezier approximation) with a thick stroke, scaled up 8x to reveal rendering quality of stroked curves at small sizes.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::cubicTo", "SkCanvas::scale", "SkPaint::setStrokeWidth"], "notes": "Simple but effective demonstration of path stroke rendering quality. Originally a Chromium bug test for arc rendering. The thick stroke (120px) on a small curve scaled 8x makes rendering artifacts very visible.", "visualGoal": "A large red quarter-circle arc (thick stroked curve) filling most of the 762x762 canvas, showing the quality of cubic Bezier stroke rendering at magnification.", "suggestedControls": ["Stroke width slider", "Scale factor slider"], "category": "Path Rendering", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.CubicTo", "SKCanvas.Scale", "SKPaint.StrokeWidth"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "smallcircles.cpp", "name": "Small Circles Grid", "description": "Draws an 11x11 grid of very small circles (radius 0.8px) using drawArc into an offscreen surface, then scales the result up 7x to inspect sub-pixel circle rendering quality.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawArc", "SkSurfaces::Raster", "SkSurface::makeImageSnapshot", "SkCanvas::drawImage", "SkCanvas::scale"], "notes": "Tests rendering quality of very small circles at sub-pixel sizes. The offscreen-then-magnify pattern is a useful technique for examining rendering precision. Uses drawArc with 360 degrees for circles.", "visualGoal": "A magnified (7x) grid of 121 tiny filled circles, revealing how the renderer handles sub-pixel sized circular shapes.", "suggestedControls": ["Circle radius slider", "Grid size slider", "Scale factor slider"], "category": "Path Rendering", "skiaSharpApis": ["SKCanvas.DrawArc", "SKSurface.Create", "SKSurface.Snapshot", "SKCanvas.DrawImage", "SKCanvas.Scale"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "smallpaths.cpp", "name": "Small Paths Gallery", "description": "Draws a gallery of 11 small path shapes (triangle, rect, oval, 5-point star, 13-point star, three-line, arrow, curve, battery, battery2, ring) in four columns: filled, stroked, stroked wider, and stroke-and-fill. Tests distance field path rendering with various stroke parameters.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::moveTo", "SkPathBuilder::lineTo", "SkPathBuilder::cubicTo", "SkPathBuilder::conicTo", "SkPaint::setStyle", "SkPaint::setStrokeWidth", "SkPaint::setStrokeMiter"], "notes": "Excellent showcase of diverse path shapes with different rendering styles. The variety of shapes (geometric, icons, complex rings) and the four-column comparison of fill/stroke modes makes this highly educational and visually rich.", "visualGoal": "A 4-column by 11-row grid showing diverse small shapes: triangle, rectangle, oval, stars, arrows, curves, battery icons, and a ring. Columns show filled, thin stroke, thick stroke, and stroke-and-fill variants.", "suggestedControls": ["Stroke width slider", "Shape selector", "Fill/Stroke/Both toggle", "Scale slider"], "category": "Path Rendering", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.MoveTo", "SKPath.LineTo", "SKPath.CubicTo", "SKPath.ConicTo", "SKPath.Close", "SKPaint.Style", "SKPaint.StrokeWidth", "SKPaint.StrokeMiter"], "sampleStatus": "none"}, {"file": "spritebitmap.cpp", "name": "Sprite Bitmap Drawing", "description": "Compares bitmap drawing with and without clipping and blur image filters. Also tests that linear filtering is preserved for subpixel translation across drawImage, drawImageRect, and image shaders.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImage", "SkImageFilters::Blur", "SkCanvas::clipRect", "SkCanvas::drawRect", "SkPaint::setImageFilter", "SkCanvas::translate"], "notes": "Educational for showing how image filters interact with clipping. The subpixel translation test is a good correctness check.", "visualGoal": "Four rows showing a red circle on blue background: plain, blurred, clipped, and clipped+blurred. Second part shows checkerboard images that should appear as uniform grey when linear filtered at half-pixel offsets.", "suggestedControls": ["Toggle blur sigma", "Toggle clipping on/off"], "category": "Image Filters", "skiaSharpApis": ["SKCanvas.DrawImage", "SKImageFilter.CreateBlur", "SKCanvas.ClipRect", "SKCanvas.DrawRect", "SKPaint.ImageFilter", "SKCanvas.Translate"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "srcmode.cpp", "name": "Source Blend Modes", "description": "Tests SrcOver, Src, and Clear blend modes with various drawing primitives (hairline, thick line, rect, oval, text) using both flat color and gradient shaders, with AA on and off.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawLine", "SkCanvas::drawRect", "SkCanvas::drawOval", "SkCanvas::drawString", "SkPaint::setBlendMode", "SkPaint::setShader", "SkShaders::LinearGradient", "SkSurface"], "notes": "Good reference for understanding how different blend modes interact with different primitives and shaders. Draws to an offscreen surface first.", "visualGoal": "Grid of drawing primitives (hair line, thick line, rect, oval, text) across blend modes (SrcOver, Src, Clear) and paint types (flat, gradient), shown with and without antialiasing.", "suggestedControls": ["Select blend mode", "Toggle AA", "Toggle gradient shader"], "category": "Blend Modes", "skiaSharpApis": ["SKCanvas.DrawLine", "SKCanvas.DrawRect", "SKCanvas.DrawOval", "SKCanvas.DrawText", "SKPaint.BlendMode", "SKPaint.Shader", "SKShader.CreateLinearGradient", "SKSurface.Create"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "srgb.cpp", "name": "sRGB Color Filters", "description": "Demonstrates sRGB gamma color filters: LinearToSRGBGamma and SRGBToLinearGamma, applied alone and composed with a color matrix filter that removes the red channel.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkColorFilters::Matrix", "SkColorFilters::LinearToSRGBGamma", "SkColorFilters::SRGBToLinearGamma", "SkColorFilter::makeComposed", "SkCanvas::drawImage"], "notes": "Good educational sample for color space management. Shows how gamma curves affect image appearance.", "visualGoal": "3x2 grid of mandrill images: top row shows original and red-channel-removed, middle row shows LinearToSRGB versions (brightened midtones), bottom row shows SRGBToLinear versions (darkened midtones).", "suggestedControls": ["Toggle color filter type", "Adjust color matrix values"], "category": "Color Filters", "skiaSharpApis": ["SKColorFilter.CreateColorMatrix", "SKColorFilter.CreateLinearToSrgbGamma", "SKColorFilter.CreateSrgbToLinearGamma", "SKColorFilter.CreateCompose", "SKCanvas.DrawImage"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "stlouisarch.cpp", "name": "St. Louis Arch Curves", "description": "Draws large arch-shaped curves using quad, cubic, and conic path segments as hairlines, including degenerate cases. Tests hairline rendering for curves that fill nearly the entire render target.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::quadTo", "SkPathBuilder::cubicTo", "SkPathBuilder::conicTo", "SkCanvas::drawPath", "SkCanvas::scale", "SkPaint::kStroke_Style"], "notes": "Named after the Gateway Arch. Good for demonstrating different curve types side-by-side. Uses flipped Y-axis via scale(1,-1).", "visualGoal": "Six overlapping arch curves rendered as thin hairlines: quadratic, degenerate quadratic, cubic, degenerate cubic, conic, and degenerate conic arches.", "suggestedControls": ["Select curve type", "Adjust conic weight", "Toggle individual curves"], "category": "Paths", "skiaSharpApis": ["SKPath.QuadTo", "SKPath.CubicTo", "SKPath.ConicTo", "SKCanvas.DrawPath", "SKCanvas.Scale", "SKPaint.Style"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "stringart.cpp", "name": "String Art", "description": "Renders a spirograph-like string art pattern by drawing connected line segments at increasing lengths and rotating angles. Supports animation with ping-pong draw progression.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkPathBuilder::moveTo", "SkPathBuilder::lineTo", "SkCanvas::drawPath", "SkPaint::kStroke_Style"], "notes": "Visually striking and great for demonstrating path building with mathematical patterns. The animation progressively draws/undraws the shape. Angle parameter controls the shape.", "visualGoal": "A green spiral string art pattern on white background, formed by connected line segments radiating from the center with increasing length and rotating angle, creating a beautiful geometric design.", "suggestedControls": ["Adjust angle parameter (0-1)", "Control number of steps", "Animate draw progression"], "category": "Paths", "skiaSharpApis": ["SKPath.MoveTo", "SKPath.LineTo", "SKCanvas.DrawPath", "SKPaint.Style", "SKPaint.IsAntialias", "SKPaint.Color"], "sampleStatus": "none"}, {"file": "stroke_rect_shader.cpp", "name": "Stroked Rect with Shader", "description": "Draws stroked rectangles with a linear gradient shader using all join types (bevel, miter, miter-limited-to-bevel, round) plus hairline, with AA on and off.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkPaint::setShader", "SkShaders::LinearGradient", "SkPaint::setStrokeJoin", "SkPaint::setStrokeMiter", "SkPaint::kStroke_Style"], "notes": "Good for showing how shaders interact with stroked geometry and how different join types affect corners. The large initial translate tests local vs device coords.", "visualGoal": "Two rows (non-AA and AA) of five stroked rectangles each with a red-to-blue gradient: bevel join, miter join, miter-limited (looks like bevel), round join, and hairline.", "suggestedControls": ["Select join type", "Adjust stroke width", "Adjust miter limit", "Toggle AA"], "category": "Strokes", "skiaSharpApis": ["SKCanvas.DrawRect", "SKPaint.Shader", "SKShader.CreateLinearGradient", "SKPaint.StrokeJoin", "SKPaint.StrokeMiter", "SKPaint.Style"], "sampleStatus": "similar", "matchedSample": "Gradient"}, {"file": "strokedlines.cpp", "name": "Stroked Lines Snowflake", "description": "Draws snowflake patterns using stroked lines with various paints (solid, gradient, dashed, bitmap shader, blur mask filter), stroke caps (butt, round, square), and matrix transforms (rotation, skew, perspective).", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawLine", "SkCanvas::drawPath", "SkPaint::setStrokeCap", "SkPaint::setShader", "SkPaint::setPathEffect", "SkPaint::setMaskFilter", "SkDashPathEffect::Make", "SkMaskFilter::MakeBlur", "SkShaders::LinearGradient"], "notes": "Comprehensive stroked-line test combining multiple paint features and transforms. Two variants: one using drawPath, one using drawPoints. Very visually appealing snowflake design.", "visualGoal": "Grid of 6x8 snowflake patterns, each with 6 spokes and fins. Columns vary by cap type and AA. Rows vary by paint (white, gradient, dashed, bitmap pattern, blurred) and transform (rotated, skewed, perspective).", "suggestedControls": ["Select stroke cap", "Select paint type", "Toggle AA", "Select transform"], "category": "Strokes", "skiaSharpApis": ["SKCanvas.DrawLine", "SKCanvas.DrawPath", "SKPaint.StrokeCap", "SKPaint.Shader", "SKPaint.PathEffect", "SKPaint.MaskFilter", "SKPathEffect.CreateDash", "SKMaskFilter.CreateBlur", "SKShader.CreateLinearGradient"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "strokefill.cpp", "name": "Stroke Fill Bug Regressions", "description": "Regression tests for path stroking bugs: bug339297 (cubic path with extreme coordinates), bug339297_as_clip (same path used as clip), and bug6987 (very thin stroked triangle at extreme scale).", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkCanvas::clipPath", "SkCanvas::scale", "SkPaint::kStroke_Style", "SkPaint::kFill_Style", "SkPathBuilder::cubicTo"], "notes": "Bug regression tests (bug339297, bug6987). Primarily for correctness verification rather than visual interest.", "visualGoal": "First GM shows a filled and stroked cubic path at extreme coordinates. Second uses it as a clip. Third shows a tiny triangle scaled 50000x with a very thin stroke.", "suggestedControls": [], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKCanvas.ClipPath", "SKCanvas.Scale", "SKPaint.Style", "SKPath.CubicTo"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "strokerect.cpp", "name": "Stroke Rect Comprehensive", "description": "Comprehensive test of rect stroking with various rect geometries (normal, small, empty, inverted, near-zero), all join types (miter, round, bevel), and stroke+fill vs stroke-only modes.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkCanvas::drawPath", "SkCanvas::drawPoints", "SkPaint::setStrokeJoin", "SkPaint::setStrokeWidth", "SkPaint::kStroke_Style", "SkPaint::kStrokeAndFill_Style"], "notes": "Thorough edge-case testing for rect stroking. Also includes the strokerect_anisotropic_5408 GM for non-square stroke widths under non-uniform scaling. Shows both the stroked rect and the fill-path outline.", "visualGoal": "Large grid of stroked rectangles varying by geometry (12 columns from normal to degenerate), join type (3 rows), and fill mode (2 sets). Each rect shown with gray stroke fill, red outline, and corner points.", "suggestedControls": ["Select join type", "Adjust stroke width", "Toggle stroke+fill"], "category": "Strokes", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.DrawPath", "SKCanvas.DrawPoints", "SKPaint.StrokeJoin", "SKPaint.StrokeWidth", "SKPaint.Style"], "sampleStatus": "none"}, {"file": "strokerect_anisotropic.cpp", "name": "Anisotropic Stroke Rect", "description": "Tests rect stroking under extreme non-uniform scaling (0.03x horizontal, 2x vertical) to expose anisotropic stroke bugs. Compares miter vs bevel joins, AA vs non-AA, whole vs half pixel alignment.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkCanvas::scale", "SkCanvas::translate", "SkPaint::setStrokeJoin", "SkPaint::kStroke_Style"], "notes": "Regression test for crbug.com/935303. Tests edge cases of anisotropic stroke rendering. Not visually exciting but important for correctness.", "visualGoal": "2x4 grid of thin horizontal stroked rectangles: columns for miter whole-pixel, miter half-pixel, bevel whole-pixel, bevel half-pixel; rows for AA and non-AA.", "suggestedControls": [], "category": "Strokes", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.Scale", "SKCanvas.Translate", "SKPaint.StrokeJoin", "SKPaint.Style"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "strokerects.cpp", "name": "Random Stroked Rects", "description": "Draws 100 randomly positioned and sized stroked rectangles in a 2x2 grid varying antialiasing (on/off) and stroke width (0 and 3). Also has a 45-degree rotated variant.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkCanvas::clipRect", "SkCanvas::translate", "SkCanvas::rotate", "SkPaint::kStroke_Style", "SkPaint::setStrokeWidth"], "notes": "Good stress test for rect stroking with randomized geometry. The rotated variant tests stroking under rotation. Uses clipping to contain the random rects.", "visualGoal": "Four quadrants each containing 100 randomly colored stroked rectangles. Top-left: thin non-AA, top-right: thick non-AA, bottom-left: thin AA, bottom-right: thick AA. Rotated variant tilts everything 45 degrees.", "suggestedControls": ["Adjust stroke width", "Toggle AA", "Toggle rotation", "Randomize seed"], "category": "Strokes", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.ClipRect", "SKCanvas.Translate", "SKCanvas.RotateDegrees", "SKPaint.Style", "SKPaint.StrokeWidth"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "strokes.cpp", "name": "Comprehensive Strokes", "description": "Comprehensive stroke testing suite with multiple GMs: round-stroked ovals/roundrects, zero-length strokes with various caps, teeny strokes at extreme scales, cubic/quad strokes, dashed zero-length lines, inner join geometry, and nested path winding rules.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawOval", "SkCanvas::drawRoundRect", "SkCanvas::drawPath", "SkCanvas::drawLine", "SkCanvas::drawCircle", "SkPaint::setStrokeCap", "SkPaint::setStrokeJoin", "SkPaint::setStrokeWidth", "SkDashPathEffect::Make", "SkPathBuilder"], "notes": "Contains many individual GMs: strokes_round, zeroPath, teenyStrokes, CubicStroke, zerolinestroke, quadcap, strokes_poly, strokes3 (nested winding), strokes_zoomed, zero_control_stroke, zerolinedash, inner_join_geometry. Very thorough stroke coverage.", "visualGoal": "Multiple separate outputs: randomly colored stroked ovals/roundrects, zero-length stroke dots with round/square caps, tiny strokes at different scales, cubic curves, nested rect/oval paths with varying stroke widths showing fill rule effects.", "suggestedControls": ["Select stroke cap", "Adjust stroke width", "Toggle AA", "Select path type"], "category": "Strokes", "skiaSharpApis": ["SKCanvas.DrawOval", "SKCanvas.DrawRoundRect", "SKCanvas.DrawPath", "SKCanvas.DrawLine", "SKCanvas.DrawCircle", "SKPaint.StrokeCap", "SKPaint.StrokeJoin", "SKPaint.StrokeWidth", "SKPathEffect.CreateDash", "SKPath.MoveTo", "SKPath.LineTo", "SKPath.CubicTo", "SKPath.QuadTo", "SKPath.ConicTo"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "stroketext.cpp", "name": "Stroked Text", "description": "Tests text stroking at large sizes (255 and 257 threshold) with fill+stroke, stroke-only, and dashed stroke effects. Also tests native font stroking with special TTF/OTF fonts containing degenerate outlines.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawSimpleText", "SkCanvas::drawTextBlob", "SkTextBlob::MakeFromPosText", "SkPaint::kStroke_Style", "SkPaint::setStrokeWidth", "SkDashPathEffect::Make", "SkFont"], "notes": "Tests the threshold between bitmap and path-based text rendering (size 255 vs 257). The native stroke test uses special fonts designed to test degenerate contour cases.", "visualGoal": "Large letter 'P' drawn in multiple styles: filled with red stroke overlay, stroke-only, and dashed stroke, at two different text sizes. Native variant shows special characters with round-capped strokes.", "suggestedControls": ["Adjust stroke width", "Adjust text size", "Toggle dash effect"], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawText", "SKCanvas.DrawTextBlob", "SKTextBlob.CreatePositioned", "SKPaint.Style", "SKPaint.StrokeWidth", "SKPathEffect.CreateDash", "SKFont"], "sampleStatus": "similar", "matchedSample": "Path Effects Lab"}, {"file": "subsetshader.cpp", "name": "Bitmap Subset Shader", "description": "Extracts left and right halves of a color wheel bitmap, creates repeat-tiled shaders from each subset with rotation and scale transforms, and fills rectangles with them.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap::extractSubset", "SkBitmap::makeShader", "SkPaint::setShader", "SkCanvas::drawRect", "SkMatrix::setScale", "SkMatrix::preRotate"], "notes": "Tests that bitmap subset shaders work correctly when the bitmap is a sub-region of a larger bitmap. Good demonstration of tiled shaders with transforms.", "visualGoal": "Two horizontal bands: top half filled with a repeating rotated/scaled pattern from the left half of a color wheel, bottom half with the right half pattern.", "suggestedControls": ["Adjust rotation angle", "Adjust scale", "Select tile mode"], "category": "Shaders", "skiaSharpApis": ["SKShader.CreateBitmap", "SKPaint.Shader", "SKCanvas.DrawRect", "SKMatrix"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "surface.cpp", "name": "Surface Properties and Operations", "description": "Tests SkSurface features: surface properties with different pixel geometries and gamma/contrast settings for LCD text, new surface creation, copy-on-write behavior with snapshots, save layer interactions, and surface underdraw compositing.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkSurfaces::Raster", "SkSurface::makeImageSnapshot", "SkSurface::getCanvas", "SkSurface::draw", "SkSurface::makeSurface", "SkCanvas::drawImage", "SkCanvas::saveLayer", "SkCanvas::clipRect", "SkShaders::LinearGradient", "SkPaint::setBlendMode"], "notes": "Contains many GMs: surfaceprops (LCD text rendering), surfacenew (surface creation), copy_on_write_retain (snapshot COW), copy_on_write_savelayer, surface_underdraw (compositing with blend modes), snap_with_mips. Very thorough surface testing.", "visualGoal": "Multiple separate outputs: rows of text on gradient backgrounds with different LCD pixel geometries, red squares from surface snapshots, blue|red split rects from COW tests, and a gradient stripe pattern with fade effect from underdraw test.", "suggestedControls": ["Select pixel geometry", "Toggle surface flags"], "category": "Surfaces", "skiaSharpApis": ["SKSurface.Create", "SKSurface.Snapshot", "SKSurface.Canvas", "SKSurface.Draw", "SKCanvas.DrawImage", "SKCanvas.SaveLayer", "SKCanvas.ClipRect", "SKShader.CreateLinearGradient", "SKPaint.BlendMode"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "swizzle.cpp", "name": "GPU Texture Swizzle", "description": "GPU-only GM that swizzles texture color channels (green, red, blue, 1) using GrFragmentProcessor, a Ganesh-specific GPU internal API.", "interesting": "low", "apis_available": false, "missing_apis": ["GrFragmentProcessor", "GrTextureEffect", "SurfaceFillContext"], "key_apis": ["GrTextureEffect::Make", "GrFragmentProcessor::SwizzleOutput", "SurfaceFillContext::fillWithFP"], "notes": "GPU-internal GM using Ganesh-specific APIs (GrFragmentProcessor, GrTextureEffect). Cannot be ported to SkiaSharp as these are internal GPU pipeline APIs. Could potentially be approximated with SKRuntimeEffect color filters.", "visualGoal": "A mandrill image with its color channels rearranged: red shows green, green shows red, blue shows blue, alpha is 1.", "suggestedControls": [], "category": "GPU Internal", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "tablecolorfilter.cpp", "name": "Table Color Filter Composition", "description": "Demonstrates table-based color filters using custom lookup tables (posterize, gamma, sqrt) applied to gradient and radial bitmap content. Also tests composing pairs of color filters via SkColorFilters::Compose and SkImageFilters::ColorFilter chains, plus a ComposeColorFilterGM that shows all NxN blend-mode color filter combinations in a grid.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkColorFilters::Table", "SkColorFilters::TableARGB", "SkColorFilters::Blend", "SkColorFilter::makeComposed", "SkImageFilters::ColorFilter", "SkShaders::LinearGradient", "SkShaders::RadialGradient", "SkCanvas::drawImage", "SkCanvas::drawRect", "SkCanvas::drawPaint"], "notes": "Contains three GMs: tablecolorfilter (table filters on bitmaps), colorcomposefilter_wacky, and colorcomposefilter_alpha. Excellent for showing how custom lookup tables transform colors and how multiple color filters compose.", "visualGoal": "Grid of bitmaps showing original gradient/circle content progressively transformed through posterize, gamma-darken, gamma-lighten, and per-channel ARGB table filters, plus NxN grids of composed blend-mode color filter combinations.", "suggestedControls": ["Table type selector (posterize/gamma/sqrt/per-channel)", "Blend mode picker for composition", "Source gradient vs radial toggle"], "category": "Color Filters", "skiaSharpApis": ["SKColorFilter.CreateTable", "SKColorFilter.CreateBlendMode", "SKColorFilter.CreateCompose", "SKImageFilter.CreateColorFilter", "SKShader.CreateLinearGradient", "SKShader.CreateRadialGradient", "SKCanvas.DrawImage", "SKCanvas.DrawRect", "SKCanvas.DrawPaint"], "sampleStatus": "similar", "matchedSample": "Gradient"}, {"file": "tablemaskfilter.cpp", "name": "Table Mask Filter", "description": "Applies a custom table mask filter to a path that combines a rect and an oval (with opposite winding). The table sets half coverage for all pixels except those with full coverage, demonstrating how mask filter tables modify alpha/coverage values during rasterization.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkTableMaskFilter::Create", "SkCanvas::drawPath", "SkPathBuilder::addRect", "SkPathBuilder::addOval"], "notes": "Simple but demonstrates mask filter tables which are useful for custom coverage manipulation. The rect+oval with opposite winding creates an interesting even-odd fill pattern.", "visualGoal": "A rect with an oval subtracted from it, rendered with modified coverage so non-fully-covered pixels appear at 50% opacity while fully covered pixels remain solid black.", "suggestedControls": ["Coverage table editor (half/linear/gamma)", "Shape selector (rect, oval, star)"], "category": "Mask Filters", "skiaSharpApis": ["SKMaskFilter.CreateTable", "SKCanvas.DrawPath", "SKPath.AddRect", "SKPath.AddOval"], "sampleStatus": "none"}, {"file": "tallstretchedbitmaps.cpp", "name": "Tall Stretched Bitmaps", "description": "Creates very tall bitmaps (4K-8K+ pixels) filled with colorful arc strokes at different angles, then draws the last 10 elements of each bitmap stretched into a smaller destination rect. Tests image scaling behavior with tall source textures.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawImageRect", "SkCanvas::drawArc", "SkPaint::setStrokeCap", "SkPaint::setStrokeWidth", "SkBitmap::extractSubset"], "notes": "Tests a GPU edge case with very tall bitmaps. The visual content (colorful arc strokes) is moderately interesting but the primary purpose is stress-testing image scaling.", "visualGoal": "Several columns of colorful arc/ring segments in various colors, each column from a different tall bitmap, showing the bottom portion stretched to fit a smaller area.", "suggestedControls": ["Bitmap height slider", "Number of visible arcs", "Scale factor"], "category": "Images", "skiaSharpApis": ["SKCanvas.DrawImage", "SKCanvas.DrawBitmap", "SKPaint.StrokeCap", "SKPaint.StrokeWidth", "SKPaint.IsAntialias"], "sampleStatus": "none"}, {"file": "testgradient.cpp", "name": "Basic Gradient Shapes", "description": "Draws basic shapes (filled rect with linear gradient, solid-color oval/RRect, circle, and stroked rounded rect) to demonstrate simple gradient and shape painting. A straightforward introductory example.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient", "SkCanvas::drawRect", "SkCanvas::drawRRect", "SkCanvas::drawCircle", "SkCanvas::drawRoundRect"], "notes": "Very basic demo showing a gradient rect alongside solid-colored shapes. Good for beginners but not visually exciting compared to other gradient demos.", "visualGoal": "A blue-to-yellow diagonal gradient rectangle, a solid peach oval, a gray circle, and a teal stroked rounded rectangle, all on a white background.", "suggestedControls": ["Gradient colors", "Shape positions", "Fill vs stroke toggle"], "category": "Gradients", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKCanvas.DrawRect", "SKCanvas.DrawRoundRect", "SKCanvas.DrawCircle", "SKCanvas.DrawOval", "SKPaint.Shader"], "sampleStatus": "existing", "matchedSample": "Gradient"}, {"file": "texelsubset.cpp", "name": "Texel Subset (GPU Only)", "description": "Directly exercises GrTextureEffect::MakeTexelSubset to test GPU texture sampling with various wrap modes, filter modes, mipmap modes, and texture matrix transformations. Uses internal Ganesh GPU APIs not available in SkiaSharp.", "interesting": "low", "apis_available": false, "missing_apis": ["GrTextureEffect", "GrSamplerState", "SurfaceDrawContext", "GpuGM"], "key_apis": ["GrTextureEffect::MakeTexelSubset", "GrTextureEffect::Make", "GrSamplerState", "SurfaceDrawContext::addDrawOp"], "notes": "GPU-internal test that directly manipulates Ganesh/Graphite fragment processors. Cannot be ported to SkiaSharp as it uses internal GPU APIs. Registers 8 GM variants for different filter/mipmap/scale combinations.", "visualGoal": "Grid of mandrill image subsets rendered with different wrap modes (clamp, repeat, mirror, decal) and filter/mipmap combinations, with separator lines between sections.", "suggestedControls": [], "category": "GPU Internals", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "text_scale_skew.cpp", "name": "Text Scale and Skew", "description": "Renders the word 'Skia' at multiple font scaleX values (0.5 to 2.0) and skewX values (-0.5 to 0.5), arranged in a grid. A second GM variant adds a 30-degree canvas rotation to test matrix ordering inside the scaler context.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkFont::setScaleX", "SkFont::setSkewX", "SkFont::setSize", "SkCanvas::rotate", "SkTextUtils::DrawString"], "notes": "References skbug.com/40038559 but serves as a feature test for font scale and skew rendering. Two GMs: text_scale_skew (flat) and text_scale_skew_rotate (rotated 30 degrees).", "visualGoal": "A 5x3 grid of 'Skia' text showing horizontal compression/expansion (scaleX) and italic-like slanting (skewX) combinations, with a rotated variant.", "suggestedControls": ["ScaleX slider (0.5-2.0)", "SkewX slider (-0.5 to 0.5)", "Rotation angle slider"], "category": "Text", "skiaSharpApis": ["SKFont.ScaleX", "SKFont.SkewX", "SKFont.Size", "SKCanvas.RotateDegrees", "SKCanvas.DrawText"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "textblob.cpp", "name": "Text Blob Builder Runs", "description": "Comprehensive text blob test using SKTextBlobBuilder with three run types: default (allocRun), horizontal (allocRunPosH), and fully positioned (allocRunPos). Tests multiple configurations of run counts, mixing run types, and varying font scales within a single blob.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkTextBlobBuilder::allocRun", "SkTextBlobBuilder::allocRunPosH", "SkTextBlobBuilder::allocRunPos", "SkTextBlobBuilder::make", "SkCanvas::drawTextBlob", "SkTextBlob::bounds", "SkCanvas::drawRect"], "notes": "Excellent reference for the three run types in SkTextBlobBuilder. Shows 6 different blob configurations, each drawn with a blue bounding box overlay. The text 'hamburgefons' is used for glyphs.", "visualGoal": "Six text blob panels arranged in a 2x3 grid, each showing 'hamburgefons' rendered with different combinations of run types and font scales, with blue bounding box outlines around each blob.", "suggestedControls": ["Run type selector (default/horizontal/positioned)", "Font size scale slider", "Glyph count per run"], "category": "Text", "skiaSharpApis": ["SKTextBlob.Create", "SKTextBlob.CreateHorizontal", "SKTextBlob.CreatePositioned", "SKCanvas.DrawTextBlob", "SKCanvas.DrawRect", "SKFont.Size", "SKFont.Typeface"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "textblobblockreordering.cpp", "name": "Text Blob Block Reordering", "description": "Tests that text blobs render correctly when draw order differs from GPU flush order. Draws the same blob three times: normal, then with SrcIn blend mode over a red rect, then normal again, forcing the GPU to flush in a different order than draw order.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawTextBlob", "SkPaint::setBlendMode", "SkBlendMode::kSrcIn", "SkCanvas::drawRect"], "notes": "Primarily a GPU rendering order regression test. The visual output (text with blend modes) is not particularly interesting or educational for a gallery sample.", "visualGoal": "Three rows of large 'AB' text on gray background: first in black, second clipped to a red rectangle via SrcIn blend mode, third in black again.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawTextBlob", "SKPaint.BlendMode", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "textblobcolortrans.cpp", "name": "Text Blob Color Translation", "description": "Tests that text blobs can be translated and have their colors changed correctly. Draws the same blob (containing large 'AB' and small sentence text) repeatedly at different vertical positions with cycling colors (cyan, light gray, yellow, white).", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawTextBlob", "SkPaint::setColor", "SkTextBlobBuilder::allocRun", "SkCanvas::translate"], "notes": "Tests GPU text atlas color regeneration. The visual pattern of repeating colored text blobs is moderately interesting and demonstrates color variation on text blobs.", "visualGoal": "Vertical stack of text blobs alternating between cyan, light gray, yellow, and white colors on a gray background, each containing large 'AB' characters and a smaller sentence.", "suggestedControls": ["Color palette picker", "Number of repetitions", "Font size for large text"], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawTextBlob", "SKPaint.Color", "SKCanvas.Save", "SKCanvas.Restore", "SKCanvas.Translate"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "textblobgeometrychange.cpp", "name": "Text Blob Geometry Change", "description": "Tests that text blobs render correctly across different pixel geometry settings (LCD text). Draws the same blob on the main canvas with LCD text, then on an offscreen surface with unknown pixel geometry to verify fallback behavior.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkTextBlob::MakeFromText", "SkCanvas::drawTextBlob", "SkSurface::Create", "SkSurfaceProps"], "notes": "Primarily a GPU text caching regression test (crbug/486744). The visual output is just text rendered twice with different anti-aliasing properties. Not visually interesting for a gallery.", "visualGoal": "The word 'Hamburgefons' rendered twice: once with LCD sub-pixel text on a white background, and once with grayscale anti-aliasing from an offscreen surface.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawTextBlob", "SKSurface.Create", "SKCanvas.DrawRect"], "sampleStatus": "existing", "matchedSample": "Text Lab"}, {"file": "textblobmixedsizes.cpp", "name": "Text Blob Mixed Sizes", "description": "Creates a text blob with the word 'Skia' at dramatically different sizes (262, 162, 72, 32, 14, and 0), then renders it four times with random rotations and optional blur shadow. Tests distance field text, atlas management, and mixed-size rendering.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkTextBlobBuilder", "SkCanvas::drawTextBlob", "SkMaskFilter::MakeBlur", "SkCanvas::rotate", "SkCanvas::scale", "SkSurface::Create"], "notes": "Visually striking with dramatically scaled text from very large to tiny. The blur shadow adds depth. Two variants: normal and distance-field text (DFT). The DFT variant requires GPU.", "visualGoal": "Four copies of 'Skia' text cascading from huge (262pt) to tiny (14pt), each slightly rotated, with black blur shadows behind white text, on a white background.", "suggestedControls": ["Font size range slider", "Blur sigma slider", "Rotation range", "Number of copies"], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawTextBlob", "SKMaskFilter.CreateBlur", "SKCanvas.RotateDegrees", "SKCanvas.Scale", "SKCanvas.Translate", "SKFont.Size", "SKPaint.MaskFilter"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "textblobrandomfont.cpp", "name": "Text Blob Random Font (GPU Only)", "description": "GPU-only stress test using a random scaler context (SkRandomTypeface) that returns deterministic but random glyph masks. Tests text blob translation and GPU texture atlas regeneration with unpredictable glyph data, including color emoji.", "interesting": "low", "apis_available": false, "missing_apis": ["SkRandomTypeface"], "key_apis": ["SkTextBlobBuilder", "SkCanvas::drawTextBlob", "SkCanvas::rotate", "SkRandomTypeface", "GrDirectContext::freeGpuResources"], "notes": "GPU-only test that uses internal SkRandomTypeface not available in SkiaSharp. The random glyph masks make it useful only as a GPU stress test, not as a visual demo.", "visualGoal": "Text rendered three times vertically with slightly rotated canvas, using random glyph mask data. Includes normal text, large text, and color emoji if available.", "suggestedControls": [], "category": "GPU Internals", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "textblobshader.cpp", "name": "Text Blob with Shader", "description": "Demonstrates drawing text blobs with a radial gradient shader applied to the paint. The same blob (containing three run types: default, horizontal, and positioned with sinusoidal y-offsets) is tiled across the canvas in a 4x3 grid, with the shader fixed in global space creating a colorful gradient effect across all text.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawTextBlob", "SkShaders::RadialGradient", "SkPaint::setShader", "SkTextBlobBuilder::allocRun", "SkTextBlobBuilder::allocRunPosH", "SkTextBlobBuilder::allocRunPos"], "notes": "Excellent demo of shader-space vs. text blob offset behavior. The radial gradient creates a visually appealing effect where text color changes based on position. Shows all three run types in one blob.", "visualGoal": "A 4x3 grid of 'Blobber' text rendered with three different positioning styles, all colored by a large red-to-green radial gradient centered on the canvas.", "suggestedControls": ["Shader type (radial/linear/sweep)", "Gradient colors", "Grid density", "Text content"], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawTextBlob", "SKShader.CreateRadialGradient", "SKPaint.Shader", "SKTextBlob.Create", "SKTextBlob.CreateHorizontal", "SKTextBlob.CreatePositioned"], "sampleStatus": "similar", "matchedSample": "Gradient"}, {"file": "textblobtransforms.cpp", "name": "Text Blob Transforms", "description": "Comprehensive test of text blob rendering under various canvas transformations: pure translation (5 positions), pure rotation (4 orientations including 90/180/270 degrees), pure scaling (uniform and non-uniform), and combined rotate+scale+translate transforms with progressively more extreme parameters.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawTextBlob", "SkCanvas::translate", "SkCanvas::rotate", "SkCanvas::scale", "SkTextBlobBuilder"], "notes": "Excellent educational reference for canvas transforms applied to text blobs. The blob contains mixed-size characters (A=162pt, B=72pt, C=32pt) making transform effects clearly visible.", "visualGoal": "Letters 'A', 'B', 'C' at different sizes rendered in multiple arrangements on gray background: translated grid, rotated copies, scaled copies (including extreme non-uniform scaling), and wildly transformed combinations.", "suggestedControls": ["Transform type selector (translate/rotate/scale/combined)", "Rotation angle slider", "Scale factor sliders (X/Y independent)"], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawTextBlob", "SKCanvas.Translate", "SKCanvas.RotateDegrees", "SKCanvas.Scale", "SKCanvas.Save", "SKCanvas.Restore", "SKFont.Size"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "textblobuseaftergpufree.cpp", "name": "Text Blob Use After GPU Free", "description": "GPU regression test that draws a text blob, frees all GPU resources via GrDirectContext::freeGpuResources(), then draws the same blob again to verify it regenerates correctly. Tests GPU text atlas recovery (crbug/491350).", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkTextBlob::MakeFromText", "SkCanvas::drawTextBlob", "GrDirectContext::freeGpuResources", "SkCanvas::drawRect"], "notes": "GPU-specific regression test for resource recovery. The visual output is simply 'Hamburgefons' drawn twice. Not interesting for a gallery sample.", "visualGoal": "The word 'Hamburgefons' rendered twice vertically on a white/default background, both looking identical despite GPU resource flush between draws.", "suggestedControls": [], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawTextBlob", "SKCanvas.DrawRect"], "sampleStatus": "existing", "matchedSample": "Text Lab"}, {"file": "texteffects.cpp", "name": "Text Effects and Smart Underlines", "description": "Demonstrates smart underlines that avoid intersecting text glyphs using TextBlob intercepts. Includes two GMs: 'fancyblobunderline' builds TextBlobs with default, horizontal, and full-positioned runs then draws underlines that gap around descenders; 'textblob_intercepts' draws adorned text with strikethrough lines that skip over glyph intersections.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkTextBlobBuilder::allocRun", "SkTextBlobBuilder::allocRunPosH", "SkTextBlobBuilder::allocRunPos", "SkTextBlob::getIntercepts", "SkCanvas::drawTextBlob", "SkCanvas::drawPath", "SkFont::textToGlyphs", "SkFont::getWidths"], "notes": "Highly practical: shows how to create gap-aware underlines/strikethroughs — a common rich-text rendering need. The intercepts API may need verification in SkiaSharp (SKTextBlob.GetIntercepts).", "visualGoal": "Multiple lines of text in various fonts and sizes, each with an underline that intelligently gaps around descenders and glyph intersections.", "suggestedControls": ["font family selector", "text size slider", "underline thickness slider", "custom text input"], "category": "Text", "skiaSharpApis": ["SKTextBlobBuilder.AllocateRun", "SKTextBlobBuilder.AllocateHorizontalRun", "SKTextBlobBuilder.AllocatePositionedRun", "SKTextBlob.GetIntercepts", "SKCanvas.DrawTextBlob", "SKCanvas.DrawPath", "SKFont.GetGlyphs", "SKFont.GetGlyphWidths"], "sampleStatus": "similar", "matchedSample": "Text Lab"}, {"file": "thinconcavepaths.cpp", "name": "Thin Concave Paths", "description": "Tests rendering of various thin concave filled paths at sub-pixel widths. Includes thin stroked rects (built by hand as paths), right angles, golf clubs, barbells, thin rect-and-triangle combos, hipster pants, skinny snakes, pointy golf clubs, and small letter 'i' shapes — each drawn at progressively increasing widths.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::moveTo", "SkPathBuilder::lineTo", "SkPaint::setAntiAlias", "SkPaint::setStyle"], "notes": "Edge-case quality test for anti-aliased filling of thin concave polygons. Educational for understanding how renderers handle sub-pixel geometry.", "visualGoal": "Grid of columns showing thin concave shapes (rects, angles, golf clubs, barbells, pants, snakes) rendered at widths from 0.2 to 2.0 pixels with anti-aliased fill.", "suggestedControls": ["width slider (0.0 to 3.0)", "anti-alias toggle", "shape selector"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.MoveTo", "SKPath.LineTo", "SKPaint.IsAntialias", "SKPaint.Style"], "sampleStatus": "none"}, {"file": "thinrects.cpp", "name": "Thin Rects and Round Rects", "description": "Draws vertical, horizontal, and square rects (and optionally round rects) at sub-pixel widths ranging from 4 pixels down to 0 pixels, with 1/8 pixel horizontal offsets per row. Also includes a 'clipped_thinrect' that tests a thin rect clipped by a clip rect and zoomed in to verify correct coverage.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkCanvas::drawRRect", "SkCanvas::clipRect", "SkSurface::makeImageSnapshot", "SkCanvas::drawImageRect"], "notes": "Tests sub-pixel rendering quality at various fractional offsets. Black background with white and green rects shows AA coverage clearly.", "visualGoal": "Black background with columns of progressively thinner white and green rectangles (and optionally round rects) at 1/8 pixel offsets, plus a zoomed-in view of a clipped thin rect.", "suggestedControls": ["round rect toggle", "color picker", "zoom level slider"], "category": "Rendering Quality", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.DrawRoundRect", "SKCanvas.ClipRect", "SKSurface.Snapshot", "SKCanvas.DrawImage"], "sampleStatus": "none"}, {"file": "thinstrokedrects.cpp", "name": "Thin Stroked Rects", "description": "Draws stroked rectangles with stroke widths ranging from 4 down to 0 pixels (including 0.5, 0.25, 0.125) at 1/8 pixel offsets. A second pass draws the same in red at 0.5x scale with doubled stroke widths to verify scale-invariance of stroking.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkPaint::setStrokeWidth", "SkPaint::setStyle", "SkCanvas::scale"], "notes": "Useful for verifying that thin strokes render correctly and that scaling produces equivalent results. Black background makes thin strokes visible.", "visualGoal": "Black background with rows of stroked white rectangles at decreasing stroke widths, followed by red rectangles at half scale verifying consistency.", "suggestedControls": ["stroke width slider", "scale factor slider"], "category": "Rendering Quality", "skiaSharpApis": ["SKCanvas.DrawRect", "SKPaint.StrokeWidth", "SKPaint.Style", "SKCanvas.Scale"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "tiledscaledbitmap.cpp", "name": "Tiled Scaled Bitmap", "description": "Reproduces a Skia bug (skbug.com/40034014) where a tiled bitmap shader with fractional scaling failed to draw correctly. Creates a 360x288 bitmap with a circle, tiles it with repeat mode using a fractional scale matrix (121/360 x 93/288), and draws over a large rectangle.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap::makeShader", "SkCanvas::drawRect", "SkCanvas::drawCircle", "SkTileMode::kRepeat"], "notes": "Bug regression test for fractional bitmap scaling with tiling. The visual pattern of tiled circles is mildly interesting but the GM exists primarily for regression testing.", "visualGoal": "Large rectangle filled with a repeating pattern of small circles rendered via a fractionally-scaled tiled bitmap shader.", "suggestedControls": [], "category": "Shaders", "skiaSharpApis": ["SKBitmap.ToShader", "SKCanvas.DrawRect", "SKCanvas.DrawCircle"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "tileimagefilter.cpp", "name": "Tile Image Filter", "description": "Demonstrates the Tile image filter which tiles a source region into a destination region. Shows four variations with different source/dest rect sizes using both a text image and a checkerboard image. Also tests Tile combined with a ColorFilter and with crop rects.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Tile", "SkImageFilters::Image", "SkImageFilters::ColorFilter", "SkColorFilters::Blend", "SkCanvas::drawImage", "SkCanvas::saveLayer", "SkCanvas::clipRect"], "notes": "Good demonstration of the Tile image filter with various configurations including combining with color filters and crop rects.", "visualGoal": "Black background with tiled image regions outlined in red (source) and blue (destination) rectangles, showing how portions of images get tiled into larger areas, plus a green tiled pattern from a color-filtered tile.", "suggestedControls": ["source rect adjuster", "destination rect adjuster", "image selector"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateTile", "SKImageFilter.CreateImage", "SKImageFilter.CreateColorFilter", "SKColorFilter.CreateBlendMode", "SKCanvas.DrawImage", "SKCanvas.SaveLayer", "SKCanvas.ClipRect"], "sampleStatus": "none"}, {"file": "tilemodes.cpp", "name": "Tile Modes Comprehensive", "description": "Comprehensive tile mode reference showing all combinations of Clamp/Repeat/Mirror (and Decal in the 'tilemode_decal' variant) for both bitmap and gradient shaders. Includes multiple GMs: 'tilemodes' (POT and NPOT bitmap sizes), 'tilemode_bitmap', 'tilemode_gradient', and 'tilemode_decal' with nearest/linear/bicubic filtering and rotation.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage::makeShader", "SkBitmap::makeShader", "SkShaders::LinearGradient", "SkShaders::RadialGradient", "SkShaders::SweepGradient", "SkCanvas::drawRect", "SkTileMode"], "notes": "Excellent reference for understanding all tile modes. The decal variant is particularly useful as it shows edge behavior differences between filter modes. Multiple sub-GMs provide thorough coverage.", "visualGoal": "Grid of rectangles each showing a different combination of X and Y tile modes (Clamp, Repeat, Mirror, Decal) applied to bitmap textures and gradient shaders, with labeled rows and columns.", "suggestedControls": ["tile mode X selector", "tile mode Y selector", "shader type (bitmap/linear/radial/sweep)", "filter mode selector", "image selector"], "category": "Shaders", "skiaSharpApis": ["SKImage.ToShader", "SKBitmap.ToShader", "SKShader.CreateLinearGradient", "SKShader.CreateRadialGradient", "SKShader.CreateSweepGradient", "SKCanvas.DrawRect"], "sampleStatus": "similar", "matchedSample": "Gradient"}, {"file": "tilemodes_alpha.cpp", "name": "Tile Modes with Alpha", "description": "Tests all 16 combinations of tile modes (Clamp, Repeat, Mirror, Decal) for X and Y axes with a semi-transparent paint (alpha=0.5). Uses the mandrill_64 image as source, applying a matrix transform to position each tile.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkImage::makeShader", "SkCanvas::drawRect", "SkPaint::setAlphaf", "SkTileMode", "SkMatrix::Translate"], "notes": "Specifically tests the interaction of tile modes with partially transparent paint — a subtle but important rendering scenario. Originally filed as crbug.com/957275.", "visualGoal": "4x4 grid of mandrill images rendered with different tile mode combinations, all at 50% opacity, showing how Decal mode handles edges differently than Clamp/Repeat/Mirror.", "suggestedControls": ["alpha slider", "tile mode X selector", "tile mode Y selector"], "category": "Shaders", "skiaSharpApis": ["SKImage.ToShader", "SKCanvas.DrawRect", "SKPaint.Color"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "tilemodes_scaled.cpp", "name": "Tile Modes Scaled", "description": "Identical structure to tilemodes.cpp but tests with very small source bitmaps (4x4 POT and 3x3 NPOT) scaled up 8x, exercising different sampling modes: Nearest, Linear, Trilinear, Mitchell bicubic, and Anisotropic. Shows all Clamp/Repeat/Mirror combos for each filter and color type.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap::makeShader", "SkShaders::LinearGradient", "SkShaders::RadialGradient", "SkShaders::SweepGradient", "SkCanvas::drawRect", "SkCanvas::scale"], "notes": "Good for comparing sampling quality (nearest vs linear vs bicubic vs aniso) when upscaling tiny tiled textures. Anisotropic filtering may not be directly available in SkiaSharp.", "visualGoal": "Large grid of scaled-up tiny bitmaps tiled with different tile mode combos, with rows varying by color type and sampling filter, showing clear differences between nearest-neighbor and smooth filtering.", "suggestedControls": ["filter mode selector", "scale slider", "tile mode selectors"], "category": "Shaders", "skiaSharpApis": ["SKBitmap.ToShader", "SKShader.CreateLinearGradient", "SKShader.CreateRadialGradient", "SKShader.CreateSweepGradient", "SKCanvas.DrawRect", "SKCanvas.Scale"], "sampleStatus": "existing", "matchedSample": "2D Transforms"}, {"file": "tinybitmap.cpp", "name": "Tiny Bitmap Shader", "description": "Creates a single 1x1 pixel semi-transparent red bitmap and uses it as a repeating/mirror shader to fill the entire canvas at 50% alpha. Tests the degenerate case of extremely small tiled bitmaps.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkBitmap::makeShader", "SkCanvas::drawPaint", "SkTileMode::kRepeat", "SkTileMode::kMirror"], "notes": "Trivial edge-case test for 1x1 bitmap shaders. Not visually interesting — just a solid semi-transparent red fill over a gray background.", "visualGoal": "Uniform semi-transparent red fill covering a gray background (100x100 canvas).", "suggestedControls": [], "category": "Shaders", "skiaSharpApis": ["SKBitmap.ToShader", "SKCanvas.DrawPaint"], "sampleStatus": "none"}, {"file": "transparency.cpp", "name": "Transparency Gradient Check", "description": "Draws horizontal gradients from transparent to each of 9 colors (black, gray, white, red, yellow, green, cyan, blue, magenta) onto an offscreen surface, then scales and composites them over a checkerboard background to verify correct alpha blending.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkShaders::LinearGradient", "SkSurfaces::Raster", "SkSurface::draw", "SkCanvas::drawRect", "SkCanvas::scale", "SkBitmap::makeShader"], "notes": "Practical demonstration of transparency compositing over a checkerboard — a common pattern for alpha visualization in image editors.", "visualGoal": "Checkerboard background with overlaid horizontal gradient bars going from fully transparent to solid colors (black through magenta), scaled up to fill a large canvas.", "suggestedControls": ["checkerboard size slider", "color list editor"], "category": "Compositing", "skiaSharpApis": ["SKShader.CreateLinearGradient", "SKSurface.Create", "SKSurface.Draw", "SKCanvas.DrawRect", "SKCanvas.Scale", "SKBitmap.ToShader"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "trickycubicstrokes.cpp", "name": "Tricky Cubic Strokes", "description": "Collection of 23+ pathological cubic Bézier curves that have historically caused issues for stroke tessellation: cusps, near-cusps, flat lines with 180° turns, circles from degenerate cubics, diagonal flats, and internal reversals. Each is drawn with a thick stroke (30px) in random colors on a 5x5 grid.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPathBuilder::cubicTo", "SkPathBuilder::quadTo", "SkPathBuilder::conicTo", "SkPaint::setStrokeWidth", "SkPaint::setStrokeCap", "SkPaint::setStrokeJoin"], "notes": "Excellent stress test for path stroking. Includes variants with butt caps (trickycubicstrokes), round caps (trickycubicstrokes_roundcaps), and large radius strokes. Visually interesting with colorful thick curves.", "visualGoal": "5x5 grid of cells on black background, each containing a thick-stroked cubic (or quadratic/conic) curve in a random bright color, showcasing various degenerate and pathological curve shapes.", "suggestedControls": ["stroke width slider", "stroke cap selector", "stroke join selector", "curve index selector"], "category": "Paths", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPath.CubicTo", "SKPath.QuadTo", "SKPath.ConicTo", "SKPaint.StrokeWidth", "SKPaint.StrokeCap", "SKPaint.StrokeJoin"], "sampleStatus": "none"}, {"file": "typeface.cpp", "name": "Typeface Rendering Comprehensive", "description": "Exhaustive typeface rendering test covering: font styles (normal/bold/italic/bold-italic) with kerning, glyph rendering across multiple edging modes (alias/antialias/subpixel), text sizes (9-16pt), all hinting levels, subpixel positioning offsets, rotation, paint styles (fill/stroke/strokeAndFill), fake bold, and blur mask filters with various sigma values.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkFont::setEdging", "SkFont::setHinting", "SkFont::setSubpixel", "SkFont::setEmbolden", "SkFont::setSize", "SkMaskFilter::MakeBlur", "SkCanvas::drawSimpleText", "SkCanvas::drawTextBlob", "SkTypeface::MakeFromResource", "SkTextBlobBuilder"], "notes": "Most comprehensive text rendering reference in the GM suite. Shows how hinting, edging, subpixel, and size interact. The 'typeface_styling' variant compares embolden with stroke styles. Requires font resources.", "visualGoal": "Dense grid of the same glyph rendered at many size/hinting/subpixel/edging/style/mask combinations, allowing visual comparison of rendering quality across all text rendering parameters.", "suggestedControls": ["font size slider", "hinting mode selector", "edging mode selector", "subpixel toggle", "bold toggle", "blur sigma slider"], "category": "Text", "skiaSharpApis": ["SKFont.Edging", "SKFont.Hinting", "SKFont.Subpixel", "SKFont.Embolden", "SKFont.Size", "SKMaskFilter.CreateBlur", "SKCanvas.DrawText", "SKCanvas.DrawTextBlob", "SKTypeface.FromFile", "SKTextBlobBuilder"], "sampleStatus": "similar", "matchedSample": "Blur Image Filter"}, {"file": "unpremul.cpp", "name": "Unpremultiplied Alpha Test", "description": "Tests that unpremultiplied alpha colors are correctly handled. Draws a rect with BlendMode::Src using a color with alpha < 1.0, then reads back the pixel in unpremul format and verifies it matches the original color. Also tests drawing an unpremul bitmap. Shows a green 'GOOD' or red 'BAD' indicator.", "interesting": "low", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawRect", "SkCanvas::readPixels", "SkCanvas::drawImage", "SkBlendMode::kSrc", "SkBitmap::allocPixels"], "notes": "Diagnostic/correctness test — not visually interesting. The visual output is just colored rectangles with pass/fail indicators. Tests internal pixel format handling.", "visualGoal": "Two colored rectangles (one drawn directly, one from a bitmap) each with a 'GOOD' or 'BAD' label indicating whether unpremul pixel readback matches expected values.", "suggestedControls": [], "category": "Correctness", "skiaSharpApis": ["SKCanvas.DrawRect", "SKCanvas.DrawImage", "SKPaint.BlendMode", "SKBitmap.SetPixel"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "userfont.cpp", "name": "User-Defined Custom Typeface", "description": "Creates a custom typeface using SkCustomTypefaceBuilder by stealing glyph paths from the default font and alternating between path-based and drawable-based glyphs. Tests serialization round-trip. Renders a waterfall of 'Typeface' text at sizes from 9pt to 100pt, comparing the custom typeface side-by-side with the default typeface.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkCustomTypeface", "SkCustomTypefaceBuilder"], "key_apis": ["SkCustomTypefaceBuilder::setGlyph", "SkCustomTypefaceBuilder::detach", "SkTypeface::serialize", "SkTypeface::MakeDeserialize", "SkCanvas::drawTextBlob", "SkFont::getPath"], "notes": "SkCustomTypeface/SkCustomTypefaceBuilder is listed as NOT available in SkiaSharp. The concept of user-defined fonts with custom glyph drawing is interesting but cannot be ported without the underlying API.", "visualGoal": "Side-by-side waterfall comparison: left column shows default typeface, right column shows custom-built typeface, both rendering 'Typeface' at increasing sizes from 9pt to 100pt with baseline guides and bounding boxes.", "suggestedControls": ["text size range slider", "custom text input"], "category": "Text", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Text Lab"}, {"file": "variedtext.cpp", "name": "Varied Text Rendering", "description": "Draws 30 text strings with random colors, sizes, typefaces (serif/sans-serif, normal/bold), and positions, each with its own clip rect. Also used as a GPU draw-op batching benchmark.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawSimpleText", "SkCanvas::clipRect", "SkCanvas::save", "SkCanvas::restore", "SkCanvas::translate", "SkCanvas::drawRect", "SkFont::setEdging", "SkFont::setSize", "SkFont::setTypeface", "SkPaint::setColor", "SkPaint::setAntiAlias"], "notes": "Four variants: clipped/ignorable-clip × LCD/no-LCD. Good for demonstrating text rendering with randomized parameters and per-glyph clipping.", "visualGoal": "Scattered random text strings in various colors and sizes across a 640×480 canvas, each framed by a thin wire-frame clip rectangle", "suggestedControls": ["Toggle LCD antialiasing", "Toggle effective clipping", "Number of text strings", "Font size range"], "category": "Text", "skiaSharpApis": ["SKCanvas.DrawText", "SKCanvas.ClipRect", "SKCanvas.Save", "SKCanvas.Restore", "SKCanvas.Translate", "SKCanvas.DrawRect", "SKFont.Edging", "SKFont.Size", "SKFont.Typeface", "SKPaint.Color", "SKPaint.IsAntialias"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "vertices.cpp", "name": "Vertices with Blend Modes", "description": "Comprehensive test of SkVertices drawn as triangle fans/triangles with all 29 blend modes, showing combinations of vertex colors, texture coordinates, shaders (linear gradient and solid), color filters, and alpha levels. Includes perspective and batching sub-GMs.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkVertices::MakeCopy", "SkCanvas::drawVertices", "SkBlendMode", "SkShaders::LinearGradient", "SkShaders::Color", "SkColorFilters::Blend", "SkCanvas::concat", "SkPaint::setShader", "SkPaint::setColorFilter", "SkPaint::setAlphaf"], "notes": "Multiple GMs in one file: vertices, vertices_scaled_shader, vertices_batching, vertices_perspective, skbug_13047, vertices_collapsed. The main GM is a large grid showing every blend mode with vertex colors, textures, and shaders.", "visualGoal": "Large grid of small colored mesh patches showing every blend mode applied to vertex-colored and textured triangle meshes with gradient and solid shaders", "suggestedControls": ["Blend mode selector", "Toggle vertex colors", "Toggle texture coordinates", "Shader type (gradient/solid)", "Alpha slider"], "category": "Vertices", "skiaSharpApis": ["SKVertices.CreateCopy", "SKCanvas.DrawVertices", "SKPaint.BlendMode", "SKShader.CreateLinearGradient", "SKShader.CreateColor", "SKColorFilter.CreateBlendMode", "SKCanvas.Concat", "SKPaint.Shader", "SKPaint.ColorFilter"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "verylargebitmap.cpp", "name": "Very Large Bitmap", "description": "Tests rendering very large images (150px up to 65K pixels wide) created with radial gradients, using both raster surfaces and picture-backed images. Shows full image, subset, and scaled drawing modes.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkSurfaces::Raster", "SkCanvas::drawImage", "SkCanvas::drawImageRect", "SkShaders::RadialGradient", "SkPictureRecorder", "SkImages::DeferredFromPicture", "SkCanvas::clipRect"], "notes": "Tests edge cases of very large image dimensions that stress GPU tiling and memory limits. Four variants: raster/picture × manual-tile/auto. Useful for understanding image size limitations.", "visualGoal": "Four rows of radial gradient images at different sizes (small, big, medium, very-big), each shown as full image, subset crop, and scaled-to-fit in 128×128 bordered frames", "suggestedControls": ["Image size selector", "Image source (raster/picture)"], "category": "Images", "skiaSharpApis": ["SKSurface.Create", "SKCanvas.DrawImage", "SKCanvas.DrawImage (rect overload)", "SKShader.CreateRadialGradient", "SKPictureRecorder", "SKCanvas.ClipRect"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "video_decoder.cpp", "name": "Video Decoder", "description": "Experimental GM that uses FFmpeg-based SkVideoDecoder to decode and display frames from an MP4 video file on a GPU canvas. Requires external video file and FFmpeg support.", "interesting": "low", "apis_available": false, "missing_apis": ["SkVideoDecoder", "FFmpeg integration", "Video codec support"], "key_apis": ["SkVideoDecoder::loadStream", "SkVideoDecoder::nextImage", "SkCanvas::drawImage"], "notes": "Experimental feature requiring FFmpeg. Video decoding is not available in SkiaSharp. The GM loads /skia/ice.mp4 and displays decoded frames.", "visualGoal": "A single video frame from an MP4 file rendered on the canvas", "suggestedControls": [], "category": "Codec", "skiaSharpApis": [], "sampleStatus": "existing", "matchedSample": "Image Decoder"}, {"file": "wacky_yuv_formats.cpp", "name": "Wacky YUV Formats", "description": "Exhaustive test of YUV/YCbCr image formats with various planar configurations, subsampling modes (410, 411, 420, 422, 440, 444), color spaces, and GPU texture creation paths. Tests both opaque and transparent YUV images.", "interesting": "low", "apis_available": false, "missing_apis": ["SkYUVAInfo", "SkYUVAPixmaps", "YUV planar image creation", "GPU YUV texture support"], "key_apis": ["SkYUVAInfo", "SkYUVAPixmaps", "SkImage::MakeFromYUVAPixmaps", "SkCanvas::drawImage", "SkCanvas::drawImageRect"], "notes": "Very large file (55KB+) with comprehensive YUV format testing. GPU-only, requires Ganesh or Graphite backend. YUV/YCbCr APIs are not available in SkiaSharp.", "visualGoal": "Grid of small images showing the same source rendered through different YUV planar configurations and subsampling ratios, comparing GPU YUV decode against reference", "suggestedControls": [], "category": "YUV", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Image Decoder"}, {"file": "widebuttcaps.cpp", "name": "Wide Butt Caps", "description": "Tests stroke rendering with very wide strokes (width=100) on short path segments, showing how different stroke join styles (bevel, round, miter) handle tight angles. Includes both line-to and cubic-to paths.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkCanvas::drawPath", "SkPaint::setStrokeWidth", "SkPaint::setStrokeJoin", "SkPaint::kStroke_Style", "SkPathBuilder::lineTo", "SkPathBuilder::cubicTo"], "notes": "Good educational sample showing how stroke joins behave at extreme widths. Four rows of paths with three join styles plus a cubic variant per row, all on a black background with random bright colors.", "visualGoal": "Grid of brightly colored wide strokes on black background, 4 rows × 4 columns showing bevel/round/miter joins and cubic curves at extreme stroke widths", "suggestedControls": ["Stroke width slider", "Stroke join selector", "Path type (lines/cubics)"], "category": "Stroking", "skiaSharpApis": ["SKCanvas.DrawPath", "SKPaint.StrokeWidth", "SKPaint.StrokeJoin", "SKPaint.Style", "SKPath.LineTo", "SKPath.CubicTo"], "sampleStatus": "none"}, {"file": "windowrectangles.cpp", "name": "Window Rectangles", "description": "Tests GPU window rectangles clipping by building a clip stack with multiple difference-clipped rects and round-rects over a checkerboard background. Uses internal SkClipStack API.", "interesting": "low", "apis_available": false, "missing_apis": ["Window rectangles (GPU-only clipping)", "SkClipStack (internal API)"], "key_apis": ["SkClipStack", "SkCanvas::clipRect", "SkCanvas::clipRRect", "SkCanvas::drawRect", "SkClipOp::kDifference"], "notes": "Uses internal SkClipStack and SkCanvasPriv APIs. Window rectangles are a GPU-only optimization for difference clipping. The visual result could be approximated with standard clip APIs, but the internal API usage makes this impractical to port.", "visualGoal": "Checkerboard background with a teal-colored rectangle that has several rectangular and rounded-rectangular holes cut out via difference clipping", "suggestedControls": [], "category": "Clipping", "skiaSharpApis": [], "sampleStatus": "none"}, {"file": "workingspace.cpp", "name": "Working Color Space", "description": "Tests color space working space transformations using runtime effects, managed/unmanaged color uniforms, color filters, and shaders. Verifies correct color management when applying a 'color spin' working space transform.", "interesting": "medium", "apis_available": false, "missing_apis": ["SkShader::makeWithWorkingColorSpace (internal)", "SkColorFilter::makeWithWorkingColorSpace (internal)", "SkWorkingColorSpaceShader (internal)"], "key_apis": ["SkRuntimeEffect::MakeForShader", "SkRuntimeEffect::MakeForColorFilter", "SkColorFilters::Blend", "SkShaders::Color", "SkShaders::LinearGradient", "SkColorSpace::makeColorSpin"], "notes": "Uses internal APIs (makeWithWorkingColorSpace, SkWorkingColorSpaceShader) not exposed in SkiaSharp. The GM is designed so all cells draw green if working space transforms are correct. Includes a second GM (workingspace_input_output) testing premul/unpremul conversions.", "visualGoal": "7×4 grid of small squares, mostly green (correct) with a bottom row showing red-to-green gradients going through brown (sRGB) or yellow (linear)", "suggestedControls": [], "category": "Color Management", "skiaSharpApis": ["SKRuntimeEffect.BuilderForShader", "SKRuntimeEffect.BuilderForColorFilter", "SKColorFilter.CreateBlendMode", "SKShader.CreateColor", "SKShader.CreateLinearGradient", "SKColorSpace.CreateSrgb"], "sampleStatus": "similar", "matchedSample": "2D Transforms"}, {"file": "xfermodeimagefilter.cpp", "name": "Blend Mode Image Filters", "description": "Demonstrates all 29 blend modes applied as image filters, compositing a text bitmap foreground over a checkerboard background. Also tests arithmetic mode, offset filters, and crop rects for image filter composition.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkImageFilters::Blend", "SkImageFilters::Arithmetic", "SkImageFilters::Offset", "SkImageFilters::Image", "SkCanvas::drawImage", "SkCanvas::clipRect", "SkCanvas::drawPaint", "SkBlendMode"], "notes": "Comprehensive image filter blending demo. Shows all blend modes plus arithmetic compositing, offset-based composition, and crop-rect behavior. Excellent teaching sample for image filter pipelines.", "visualGoal": "Grid of 80×80 tiles showing a green 'e' letter composited over a gray checkerboard using each blend mode, plus additional tiles showing offset and cropped compositions", "suggestedControls": ["Blend mode selector", "Foreground image", "Background image", "Arithmetic coefficients"], "category": "Image Filters", "skiaSharpApis": ["SKImageFilter.CreateBlendMode", "SKImageFilter.CreateArithmetic", "SKImageFilter.CreateOffset", "SKImageFilter.CreateImage", "SKCanvas.DrawImage", "SKCanvas.ClipRect", "SKCanvas.DrawPaint"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "xfermodes.cpp", "name": "Blend Modes (Classic)", "description": "Classic blend mode reference showing all 29 Porter-Duff and advanced blend modes with 8 different source types (rectangle image, alpha, scaled, direct rect, quarter-clear, layer, transparent, masked) over a destination oval.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkBlendMode", "SkCanvas::drawImage", "SkCanvas::drawRect", "SkCanvas::drawOval", "SkCanvas::saveLayer", "SkCanvas::clipRect", "SkPaint::setBlendMode", "SkPaint::setAlpha", "SkBitmap::makeShader"], "notes": "The definitive blend mode reference GM. Shows every blend mode with multiple source types to demonstrate how each mode interacts with different alpha/shape configurations. Wide output (1990×570).", "visualGoal": "Large labeled grid showing an orange oval destination composited with various blue rectangle sources using every blend mode, with each row showing a different source type", "suggestedControls": ["Blend mode selector", "Source type selector", "Source/destination colors"], "category": "Blend Modes", "skiaSharpApis": ["SKPaint.BlendMode", "SKCanvas.DrawImage", "SKCanvas.DrawRect", "SKCanvas.DrawOval", "SKCanvas.SaveLayer", "SKCanvas.ClipRect", "SKPaint.Color"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "xfermodes2.cpp", "name": "Blend Modes 2 (Gradient)", "description": "Shows all blend modes in a clean 6-column grid using gradient source/destination bitmaps (one with horizontal alpha gradient, one with vertical) over a checkerboard background, with saveLayer for correct compositing.", "interesting": "high", "apis_available": true, "missing_apis": [], "key_apis": ["SkBlendMode", "SkCanvas::drawRect", "SkCanvas::saveLayer", "SkPaint::setShader", "SkPaint::setBlendMode", "SkBitmap::makeShader"], "notes": "Two variants: color and grayscale. Cleaner and more systematic than xfermodes.cpp. Uses programmatically-generated gradient bitmaps for precise alpha testing. Good for a compact blend mode reference.", "visualGoal": "6-column labeled grid of 64×64 squares showing every blend mode applied to overlapping color gradients (magenta horizontal vs cyan vertical) on a checkerboard background", "suggestedControls": ["Toggle grayscale mode", "Blend mode highlight"], "category": "Blend Modes", "skiaSharpApis": ["SKPaint.BlendMode", "SKCanvas.DrawRect", "SKCanvas.SaveLayer", "SKPaint.Shader"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "xfermodes3.cpp", "name": "Blend Modes 3 (Solid & Shader)", "description": "Tests all blend modes with solid colors (transparent, blue, semi-transparent olive) and bitmap shaders at two alpha levels, drawn over a checkerboard with both fill and wide stroke styles. Uses off-screen surfaces for correct GPU compositing.", "interesting": "medium", "apis_available": true, "missing_apis": [], "key_apis": ["SkBlendMode", "SkCanvas::drawRect", "SkSurface::makeSurface", "SkSurface::draw", "SkPaint::setShader", "SkPaint::setBlendMode", "SkPaint::setStyle", "SkPaint::setStrokeWidth", "SkShaders::RadialGradient"], "notes": "Third blend mode variation focusing on solid color vs shader inputs and fill vs stroke rendering. Uses temporary surfaces for GPU-correct compositing. Less visually distinct from xfermodes/xfermodes2.", "visualGoal": "Large 15-column grid of tiny 30×30 cells showing every blend mode with solid colors and radial gradient shaders in both fill and stroke styles over a checkerboard", "suggestedControls": ["Blend mode selector", "Source type (solid/shader)", "Fill/stroke toggle", "Alpha slider"], "category": "Blend Modes", "skiaSharpApis": ["SKPaint.BlendMode", "SKCanvas.DrawRect", "SKSurface.Create", "SKSurface.Draw", "SKPaint.Shader", "SKPaint.Style", "SKPaint.StrokeWidth", "SKShader.CreateRadialGradient"], "sampleStatus": "similar", "matchedSample": "Blend Modes"}, {"file": "ycbcrimage.cpp", "name": "YCbCr Image (Vulkan)", "description": "Tests native YCbCr image format sampling on Vulkan using VkYcbcrSamplerHelper. Creates an I420 backend texture and wraps it as an SkImage for display. Vulkan-only.", "interesting": "low", "apis_available": false, "missing_apis": ["YCbCr/YUV image APIs", "Vulkan YCbCr sampler", "VkYcbcrSamplerHelper"], "key_apis": ["VkYcbcrSamplerHelper", "SkImages::WrapTexture", "SkImages::BorrowTextureFrom", "SkCanvas::drawImage"], "notes": "Vulkan-only GM that tests hardware YCbCr sampling. Requires Vulkan backend with YCbCr support. YCbCr/YUV APIs are not available in SkiaSharp.", "visualGoal": "Single 112×112 YCbCr-sampled image on a gray background", "suggestedControls": [], "category": "YUV", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Image Decoder"}, {"file": "yuv420_odd_dim.cpp", "name": "YUV 420 Odd Dimensions", "description": "Tests that GPU YUV code path handles odd-sized images with 4:2:0 chroma subsampling correctly. Creates a small JPEG with odd dimensions, decodes it as YUV planes on GPU, and compares with SW path. Includes a repeat-tiling variant.", "interesting": "low", "apis_available": false, "missing_apis": ["SkYUVAInfo", "SkYUVAPixmaps", "GPU YUV planar image creation", "LazyYUVImage"], "key_apis": ["SkJpegEncoder", "sk_gpu_test::LazyYUVImage", "SkYUVAPixmaps", "SkCanvas::drawImage", "SkImage::makeShader"], "notes": "GPU-only GM testing edge cases in YUV subsampled plane handling. The repeat variant tests that subsampled U/V planes tile at the correct frequency relative to the Y plane. Not portable to SkiaSharp.", "visualGoal": "A tiny 5×5 random-color image scaled up 10× to 50×50, comparing GPU YUV decode to software reference; plus a tiled version with rotation", "suggestedControls": [], "category": "YUV", "skiaSharpApis": [], "sampleStatus": "similar", "matchedSample": "Image Decoder"}, {"file": "yuvtorgbsubset.cpp", "name": "YUV to RGB Subset Effect", "description": "Tests subsetting YUV multiplanar images where U and V planes have different resolution from Y (4:2:0 subsampling). Shows subsets with all four tile modes at two filter modes. GPU-only.", "interesting": "low", "apis_available": false, "missing_apis": ["SkYUVAInfo", "SkYUVAPixmaps", "GPU YUV planar image creation", "SkImage::makeSubset with YUV"], "key_apis": ["SkYUVAInfo", "SkYUVAPixmaps", "SkImage::makeSubset", "SkImage::makeShader", "SkCanvas::drawRect", "SkTileMode"], "notes": "GPU-only GM for skbug.com/40040241. Tests that subsetting a YUV image correctly handles the different plane resolutions. Uses internal sk_gpu_test utilities. Not portable to SkiaSharp.", "visualGoal": "2×5 grid of 10× scaled YUV images showing different tile modes (clamp, repeat, mirror, decal) and filter modes (nearest, linear) for both full and subset images", "suggestedControls": [], "category": "YUV", "skiaSharpApis": [], "sampleStatus": "none"}];
const IO={high:0,medium:1,low:2};
const IL={high:'🟢 High',medium:'🟡 Medium',low:'⚪ Low'};
const SSO={none:0,similar:1,existing:2};
const SSL={none:'🆕 No sample',similar:'🔶 Similar exists',existing:'✅ Covered'};
const AO={true:0,false:1};
const AL={true:'✅ APIs ready',false:'❌ Blocked'};
let fI=new Set(),fA=new Set(),fS=new Set();
function esc(s){const d=document.createElement('div');d.textContent=s||'';return d.innerHTML;}
function getDir(id){return document.getElementById(id).textContent==='▲'?-1:1;}
function tF(type,val){const m={interest:fI,avail:fA,status:fS};const f=m[type];f.has(val)?f.delete(val):f.add(val);applyFilters();}
function applyFilters(){
const sT=document.getElementById('search').value.toLowerCase();
const filtered=DATA.filter(f=>{
if(fI.size&&!fI.has(f.interesting))return false;
if(fA.size){const av=f.apis_available?'yes':'no';if(!fA.has(av))return false;}
if(fS.size&&!fS.has(f.sampleStatus||'none'))return false;
if(sT&&!JSON.stringify(f).toLowerCase().includes(sT))return false;
return true;
});
const sorted=sortFindings(filtered);
document.getElementById('filter-count').textContent='Showing '+filtered.length+' of '+DATA.length;
const by=document.getElementById('group-by').value;
const el=document.getElementById('list');
if(by==='none'){el.innerHTML=sorted.map(renderRow).join('');updatePillDim();return;}
const groups={};sorted.forEach(f=>{const k=groupKey(f,by);if(!groups[k])groups[k]=[];groups[k].push(f);});
const gOrder=Object.keys(groups);const gDir=getDir('group-dir');
if(by==='interesting')gOrder.sort((a,b)=>((IO[a]??9)-(IO[b]??9))*gDir);
else if(by==='sampleStatus')gOrder.sort((a,b)=>((SSO[a]??9)-(SSO[b]??9))*gDir);
else if(by==='apis_available')gOrder.sort((a,b)=>((AO[a]??9)-(AO[b]??9))*gDir);
else gOrder.sort((a,b)=>a.localeCompare(b)*gDir);
el.innerHTML=gOrder.map(k=>'<div class="group-header">'+groupLabel(k,by)+' <span class="count-badge">'+groups[k].length+'</span></div>'+groups[k].map(renderRow).join('')).join('');
updatePillDim();
}
function groupKey(f,by){
if(by==='interesting')return f.interesting;
if(by==='sampleStatus')return f.sampleStatus||'none';
if(by==='apis_available')return String(f.apis_available);
return '';
}
function groupLabel(key,by){
if(by==='interesting')return IL[key]||key;
if(by==='sampleStatus')return SSL[key]||key;
if(by==='apis_available')return AL[key]||key;
return key;
}
function sortFindings(arr){
const s=document.getElementById('sort-by').value;
const dir=getDir('sort-dir');
return[...arr].sort((a,b)=>{let r=0;switch(s){
case'interest':r=(IO[a.interesting]??9)-(IO[b.interesting]??9);if(r===0)r=(a.name||'').localeCompare(b.name||'');break;
case'name':r=(a.name||'').localeCompare(b.name||'');break;
case'file':r=(a.file||'').localeCompare(b.file||'');break;
case'coverage':r=(SSO[a.sampleStatus||'none']??9)-(SSO[b.sampleStatus||'none']??9);break;
case'apis':r=(a.apis_available?0:1)-(b.apis_available?0:1);break;
}return r*dir;});
}
function updatePillDim(){
document.querySelectorAll('.pill[data-filter]').forEach(p=>{
const[t,v]=p.dataset.filter.split(':');
const m={interest:fI,avail:fA,status:fS};
const f=m[t];if(f)p.classList.toggle('dim',f.size>0&&!f.has(v));
});
}
function generatePrompt(f){
const gh='https://github.com/google/skia/blob/main/gm/'+f.file;
let p='Build a new interactive Gallery sample for the SkiaSharp Blazor WASM Gallery app at `samples/Gallery/`.\n\n';
p+='Look at existing demos in `samples/Gallery/Shared/Samples/` to match the pattern — subclass `CanvasSampleBase`, use `SampleControl` records for interactivity, set Title/Description/Category properties, and auto-discover via reflection.\n\n';
p+='## Sample\n\n';
p+='**Title:** '+f.name+'\n';
p+='**Category:** '+f.category+'\n';
p+='**Inspiration:** Skia GM [`'+f.file+'`]('+gh+')\n';
p+='Fetch this file to see the original C++ implementation, then translate to idiomatic C#/SkiaSharp.\n\n';
p+='**What it looks like:**\n'+f.visualGoal+'\n\n';
p+='**Key SkiaSharp APIs to demonstrate:**\n';
f.skiaSharpApis.forEach(a=>{p+='- `'+a+'`\n';});
p+='\n';
if(f.suggestedControls.length){
p+='**Interactive controls:**\n';
f.suggestedControls.forEach(c=>{p+='- '+c+'\n';});
p+='\n';
}
if(!f.apis_available&&f.missing_apis.length){
p+='⚠️ **Missing APIs:** '+f.missing_apis.join(', ')+'\n';
p+='These are not yet available in SkiaSharp. Skip the parts that need them (with a TODO comment), or use the `add-api` skill to add them first.\n\n';
}
if(f.matchedSample){
p+='**Note:** The Gallery already has a "'+f.matchedSample+'" sample that covers similar ground. Make this new sample distinct — focus on the specific technique from the Skia GM.\n\n';
}
p+='## Rules\n\n';
p+='- Match the existing Gallery demo pattern exactly.\n';
p+='- Visually impressive and self-contained.\n';
p+='- Render a title and brief explanation on the canvas.\n';
p+='- Use only existing SkiaSharp APIs — leave a TODO for missing ones.\n';
p+='- Do NOT create a PR or push branches — keep everything local.\n';
p+='- Verify it builds: `dotnet build samples/Gallery/Shared/SkiaSharpSample.Shared.csproj`\n';
return p;
}
function copyPrompt(idx,evt){
evt.stopPropagation();
const f=DATA[idx];
const prompt=generatePrompt(f);
navigator.clipboard.writeText(prompt).then(()=>{
const btn=evt.target;
const orig=btn.textContent;
btn.textContent='✅ Copied!';
btn.style.background='#dcfce7';
setTimeout(()=>{btn.textContent=orig;btn.style.background='';},1500);
});
}
function renderRow(f){
const ss=f.sampleStatus||'none';
const idx=DATA.indexOf(f);
const missing=(f.missing_apis||[]).map(a=>'<code>'+esc(a)+'</code>').join(', ')||'';
const apis=f.skiaSharpApis.map(a=>'<code>'+esc(a)+'</code>').join(', ')||'—';
const gh='https://github.com/google/skia/blob/main/gm/'+f.file;
let det='<div class="detail-grid">';
if(f.visualGoal)det+='<div class="detail-label">Visual</div><div class="detail-value">'+esc(f.visualGoal)+'</div>';
det+='<div class="detail-label">APIs</div><div class="detail-value">'+apis+'</div>';
if(!f.apis_available&&missing)det+='<div class="detail-label">Missing</div><div class="detail-value" style="color:#991b1b">'+missing+'</div>';
if(f.suggestedControls&&f.suggestedControls.length)det+='<div class="detail-label">Controls</div><div class="detail-value">'+f.suggestedControls.map(c=>esc(c)).join(', ')+'</div>';
if(f.category)det+='<div class="detail-label">Category</div><div class="detail-value">'+esc(f.category)+'</div>';
if(f.matchedSample)det+='<div class="detail-label">Matched</div><div class="detail-value">Gallery: <strong>'+esc(f.matchedSample)+'</strong></div>';
if(f.notes)det+='<div class="detail-label">Notes</div><div class="detail-value">'+esc(f.notes)+'</div>';
det+='<div class="detail-label">Source</div><div class="detail-value"><a href="'+gh+'" target="_blank">gm/'+esc(f.file)+'</a></div>';
det+='<div class="detail-label">Prompt</div><div class="detail-value"><button class="prompt-btn" onclick="copyPrompt('+idx+',event)">📋 Copy Prompt</button></div>';
det+='</div>';
return '<div class="row-item" onclick="this.classList.toggle(\'expanded\')"><div class="d-flex align-items-start"><span class="row-chevron">▶</span><div style="flex:1"><div class="row-name">'+esc(f.name||f.file)+' <span class="pill i-'+f.interesting+'" data-filter="interest:'+f.interesting+'" onclick="event.stopPropagation();tF(\'interest\',\''+f.interesting+'\')">'+f.interesting+'</span> <span class="pill '+(f.apis_available?'a-yes':'a-no')+'" data-filter="avail:'+(f.apis_available?'yes':'no')+'" onclick="event.stopPropagation();tF(\'avail\',\''+(f.apis_available?'yes':'no')+'\')">'+(f.apis_available?'✅ APIs':'❌ APIs')+'</span> <span class="pill ss-'+ss+'" data-filter="status:'+ss+'" onclick="event.stopPropagation();tF(\'status\',\''+ss+'\')">'+SSL[ss]+'</span>'+(f.category?' <span class="pill" style="background:#e0e7ff;color:#3730a3">'+esc(f.category)+'</span>':'')+'</div><div class="row-desc">'+esc(f.description)+'</div><div class="row-detail">'+det+'</div></div></div></div>';
}
document.addEventListener('DOMContentLoaded',()=>{
const high=DATA.filter(f=>f.interesting==='high').length;
const med=DATA.filter(f=>f.interesting==='medium').length;
const low=DATA.filter(f=>f.interesting==='low').length;
const avail=DATA.filter(f=>f.apis_available).length;
const blocked=DATA.filter(f=>!f.apis_available).length;
const none=DATA.filter(f=>(f.sampleStatus||'none')==='none').length;
const similar=DATA.filter(f=>f.sampleStatus==='similar').length;
const existing=DATA.filter(f=>f.sampleStatus==='existing').length;
const opp=DATA.filter(f=>f.interesting==='high'&&f.apis_available&&(f.sampleStatus||'none')==='none').length;
document.getElementById('summary-bar').innerHTML=[
['Total',DATA.length,'#1f2328'],['High',high,'#166534'],['Medium',med,'#92400e'],['Low',low,'#6b7280'],
['APIs Ready',avail,'#166534'],['Blocked',blocked,'#991b1b'],
['🆕 New',none,'#1e40af'],['🔶 Similar',similar,'#92400e'],['✅ Covered',existing,'#6b7280'],
['🎯 Opportunity',opp,'#7e22ce']
].map(([l,n,c])=>'<div class="text-center"><div class="summary-num" style="color:'+c+'">'+n+'</div><div class="summary-label">'+l+'</div></div>').join('');
document.getElementById('fr-interest').innerHTML=['high','medium','low'].map(v=>'<span class="pill i-'+v+'" data-filter="interest:'+v+'" onclick="tF(\'interest\',\''+v+'\')">'+v+'</span>').join(' ');
document.getElementById('fr-avail').innerHTML=['yes','no'].map(v=>'<span class="pill a-'+v+'" data-filter="avail:'+v+'" onclick="tF(\'avail\',\''+v+'\')">'+(v==='yes'?'✅ APIs ready':'❌ Blocked')+'</span>').join(' ');
document.getElementById('fr-status').innerHTML=['none','similar','existing'].map(v=>'<span class="pill ss-'+v+'" data-filter="status:'+v+'" onclick="tF(\'status\',\''+v+'\')">'+(SSL[v])+'</span>').join(' ');
applyFilters();
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment