Make SkPictureImageFilter::drawPictureAtLocalResolution use color xform
This creates a temporary SkCanvas, which needs to be wrapped in a color xform canvas to behave appropriately. bug:725372 Change-Id: I572437770f271b7fb813519c0966cd3177b9eeaf Reviewed-on: https://skia-review.googlesource.com/17658 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Christopher Cameron <ccameron@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
This commit is contained in:
parent
ee92f131b8
commit
92eaad6d50
@ -193,7 +193,14 @@ void SkPictureImageFilter::drawPictureAtLocalResolution(SkSpecialImage* source,
|
||||
|
||||
SkCanvas* localCanvas = localSurface->getCanvas();
|
||||
SkASSERT(localCanvas);
|
||||
|
||||
std::unique_ptr<SkCanvas> xformCanvas = nullptr;
|
||||
if (fColorSpace) {
|
||||
// Only non-null in the case where onMakeColorSpace() was called. This instructs
|
||||
// us to do the color space xform on playback.
|
||||
xformCanvas = SkCreateColorSpaceXformCanvas(localCanvas, fColorSpace);
|
||||
localCanvas = xformCanvas.get();
|
||||
}
|
||||
|
||||
localCanvas->clear(0x0);
|
||||
|
||||
localCanvas->translate(-SkIntToScalar(localIBounds.fLeft),
|
||||
|
Loading…
Reference in New Issue
Block a user