This now matches how the SkDevices were being created by the device proxy and prevents LCD text from being inadvertently applied.
BUG=602555
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1878143004
Review URL: https://codereview.chromium.org/
1878143004
SkSpecialSurface::SkSpecialSurface(SkImageFilter::Proxy* proxy,
const SkIRect& subset,
const SkSurfaceProps* props)
- : fProps(SkSurfacePropsCopyOrDefault(props))
+ : fProps(SkSurfacePropsCopyOrDefault(props).flags(), kUnknown_SkPixelGeometry)
, fSubset(subset)
, fProxy(proxy) {
SkASSERT(fSubset.width() > 0);
fBitmap.setInfo(info, info.minRowBytes());
fBitmap.setPixelRef(pr);
- fCanvas.reset(new SkCanvas(fBitmap));
+ fCanvas.reset(new SkCanvas(fBitmap, this->props()));
}
~SkSpecialSurface_Raster() override { }
canvas->clear(0x0);
- if (kDeviceSpace_PictureResolution == fPictureResolution ||
+ if (kDeviceSpace_PictureResolution == fPictureResolution ||
0 == (ctx.ctm().getType() & ~SkMatrix::kTranslate_Mask)) {
- this->drawPictureAtDeviceResolution(canvas, bounds, ctx);
+ this->drawPictureAtDeviceResolution(canvas, bounds, ctx);
} else {
this->drawPictureAtLocalResolution(source, canvas, bounds, ctx);
}