Go to file
Christopher Cameron eb0e60f1ec 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>
2017-06-01 14:42:24 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Reland of SkShaderBase 2017-05-25 14:59:07 +00:00
bin bin/fetch-clang-format 2017-03-08 16:43:49 +00:00
debugger Get Debugger app compiling again 2017-01-06 16:18:27 +00:00
dm wait for DM status thread to exit on iOS 2017-05-26 20:01:00 +00:00
example Revert "Revert "Plumb the use of GrBackendRenderTarget throughout Skia"" 2017-05-01 14:14:50 +00:00
experimental move perlinenoise2 into effects 2017-05-30 20:15:37 +00:00
fuzz Revert "Revert "Delete SkGaussianEdgeShader"" 2017-05-31 14:52:12 +00:00
gm fix and test colorfiltershader 2017-06-01 13:58:05 +00:00
gn remove 565 sprite blitter too 2017-05-31 16:51:47 +00:00
include Disable deferred proxies for M60 branch 2017-05-31 23:12:39 +00:00
infra Convert last step.context stragglers. 2017-06-01 11:39:57 +00:00
platform_tools Enable ios on Raspberry Pi 2017-04-25 16:56:41 +00:00
resources Add ship.png for DrawShip sample 2017-05-23 20:35:17 +00:00
samplecode delete some dead code in SampleApp 2017-05-31 20:59:39 +00:00
site Fix resource and skp paths in Android viewer 2017-05-26 18:29:48 +00:00
src Ensure SkPictureImageFilter::onFilterImage doesn't double-convert color 2017-06-01 14:42:24 +00:00
tests Disable deferred proxies for M60 branch 2017-05-31 23:12:39 +00:00
third_party Reduce absolute paths in generated ninja files in skia 2017-05-24 20:16:55 +00:00
tools slant colorfilter away from filterSpan4f 2017-05-31 19:54:05 +00:00
.clang-format Mark flatennable macros as block beginning/ending in .clang-format 2017-01-09 15:31:36 +00:00
.gitignore Refactor Vulkan support to support Fuchsia 2017-04-05 17:32:09 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Added support for building for tvOS 2017-03-14 22:55:04 +00:00
BUILD.gn Fiddle can use EGL if available. 2017-05-31 14:23:56 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Update build tools to newer gn. 2017-03-17 17:38:58 +00:00
Doxyfile Make the housekeeper upload doxygen to a newer bucket 2016-10-04 13:23:57 -07:00
LICENSE BUG=skia:5602 2016-09-02 11:19:34 -07:00
PRESUBMIT.py Use Gerrit style format for footers in Presubmit 2017-05-23 20:44:36 +00:00
public.bzl [Reland] Relocate shaders to own dir 2017-05-30 21:01:46 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
whitespace.txt Marker for Win AMD driver update. 2017-05-22 17:21:14 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.