It seems safer (and is probably more performant) to enforce this internal to SkSpecialSurface.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903553002
Review URL: https://codereview.chromium.org/
1903553002
fBitmap.setPixelRef(pr);
fCanvas.reset(new SkCanvas(fBitmap, this->props()));
+ fCanvas->clipRect(SkRect::Make(subset));
}
~SkSpecialSurface_Raster() override { }
}
fCanvas.reset(new SkCanvas(device));
+ fCanvas->clipRect(SkRect::Make(subset));
}
~SkSpecialSurface_Gpu() override { }