23static constexpr int kSize = 64;
26 if (rContext->abandoned()) {
37 auto make_offscreen = [&](
const SkISize dimensions) {
43 sfc->colorInfo().refColorSpace(),
46 sfc->asSurfaceProxy()->backendFormat(),
49 sfc->asSurfaceProxy()->isProtected(),
68 for (
const auto& c : clears) {
69 sfc->clear(c.rect, c.color);
73 auto offscreen = make_offscreen({2*
kSize, 2*
kSize});
74 for (
const auto& c : clears) {
75 offscreen->clear(c.rect, c.color);
77 sfc->blitTexture(offscreen->readSurfaceView(),
82 for (
const auto& c : clears) {
83 offscreen = make_offscreen(c.rect.size());
85 sfc->blitTexture(offscreen->readSurfaceView(),
@ kTopLeft_GrSurfaceOrigin
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
static constexpr Swizzle Concat(const Swizzle &a, const Swizzle &b)
static constexpr char kErrorMsg_DrawSkippedGpuOnly[]
sk_sp< SkBlender > blender SkRect rect
SurfaceFillContext * TopDeviceSurfaceFillContext(const SkCanvas *canvas)
DEF_SIMPLE_GPU_GM_CAN_FAIL(clear_swizzle, rContext, canvas, errorMsg, 6 *kSize, 2 *kSize)
static constexpr SkIRect MakeSize(const SkISize &size)
constexpr SkIPoint topLeft() const