aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetContext.cpp
diff options
context:
space:
mode:
authorGravatar Christopher Cameron <ccameron@chromium.org>2017-05-31 13:47:09 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-01 14:42:24 +0000
commiteb0e60f1ec2498f5cdba96708f25bd7929201aff (patch)
tree08ddc942f5568fb01ae671f3094119fe2d0706ec /src/gpu/GrRenderTargetContext.cpp
parenta03d407aea76a606503a835a45cc8ca7666ed680 (diff)
Ensure SkPictureImageFilter::onFilterImage doesn't double-convert color
Consider the following sequence of events: 1. SkPictureImageFilter::onFilterImage creates a local canvas, wraps it in a SkColorSpaceXformCanvas, and passed to... 2. SkPictureImageFilter::drawPictureAtLocalResolution creates a local canvas (localCanvas) wraps that in a SkColorSpaceXformCanvas, draws the picture to it, doing sRGB->fColorSpace conversion 3. We then call makeImageSnapshot to produce a SkSpecialImage, localImg, which is not tagged with any color space. 4. When the draw that localImg to the passed-in SkColorSpaceXformCanvas, which then performs sRGB->fColorSpace conversion a second time. We now have performed color conversion twice. One fix for this would be to have the image produced by the call to localSurface->makeImageSnapshot() be tagged with fColorSpace. This is somewhat involved. The less invasive fix is to remove the SkColorSpaceXformCanvas in SkPictureImageFilter::onFilterImage, and push it down into the two branches, SkPictureImageFilter::drawPictureAtLocalResolution and SkPictureImageFilter::drawPictureAtDeviceResolution. BUG=728332 Change-Id: If2aa32e18ad660b3e361f1d90845eeb8555fe404 Reviewed-on: https://skia-review.googlesource.com/18282 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Christopher Cameron <ccameron@google.com> Commit-Queue: Christopher Cameron <ccameron@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetContext.cpp')
0 files changed, 0 insertions, 0 deletions