Rasterized content chopped off when using SkCreateColorSpaceXformCanvas |
||||
Issue descriptionWhen running Chrome with --enable-color-correct-rendering, only the first few tiles of content end up being rendered -- the rest are blank. See attached images -- disabled.png is with no flags and enabled.png is with --enable-color-correct-rednering. Both are with --show-composited-layer-borders. This happens (in one form or another) with and without GPU raster. The difference in code is whether or not "target_color_space.IsValid()" returns true or false at https://cs.chromium.org/chromium/src/cc/raster/raster_source.cc?rcl=f7f370dba5703b1df78ae7a6bc54b498fcd18589&l=201 This may be a bug in SkCreateColorSpaceXformCanvas, or it may be a bug in Chrome's use of it.
,
Mar 21 2017
I bet this is SkColorSpaceXformCanvas neglecting to tell its SkCanvas part about clips. I always forget that those virtuals replace the SkCanvas ones, not just FYI hooks like the other state change methods (save, restore, matrix changes, etc).
,
Mar 21 2017
The following revision refers to this bug: https://skia.googlesource.com/skia/+/1683f786cadf57a56fb1983ab8bb6df91c50d0ef commit 1683f786cadf57a56fb1983ab8bb6df91c50d0ef Author: Mike Klein <mtklein@chromium.org> Date: Tue Mar 21 13:55:20 2017 Have SkColorSpaceXformCanas tell SkCanvas about clips. This should make queries like SkCanvas::getLocalClipBounds() work. BUG= chromium:703363 Change-Id: I1d8a39880152ba1da99cc8b289072ef747271bc8 Reviewed-on: https://skia-review.googlesource.com/9915 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> [modify] https://crrev.com/1683f786cadf57a56fb1983ab8bb6df91c50d0ef/src/core/SkColorSpaceXformCanvas.cpp
,
Mar 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/926bcd0f17209ee4f86d4234a41a62736f86dc81 commit 926bcd0f17209ee4f86d4234a41a62736f86dc81 Author: skia-deps-roller@chromium.org <skia-deps-roller@chromium.org> Date: Tue Mar 21 15:35:10 2017 Roll src/third_party/skia/ 3130fbb1a..1683f786c (11 commits) https://skia.googlesource.com/skia.git/+log/3130fbb1a7aa..1683f786cadf $ git log 3130fbb1a..1683f786c --date=short --no-merges --format='%ad %ae %s' 2017-03-20 mtklein Have SkColorSpaceXformCanas tell SkCanvas about clips. 2017-03-20 benjaminwagner Enable GLES on Intel Linux bots. 2017-03-21 robertphillips rename makeCopyForTextureParams to isACopyNeededForTextureParams 2017-03-21 robertphillips Revert "Make SkImage_Gpu be deferred" 2017-03-20 bsalomon Attempt to fix AMD ANGLE bots. 2017-03-21 borenet Followup fixes for recipe roll 2017-03-20 brianosman readpixels GM uses GPU image in GPU configs 2017-03-20 msarett Add support for F32 sources to SkColorSpaceXform 2017-03-21 robertphillips Add pre-Flush callback to GrDrawingManager (take 2) 2017-03-20 robertphillips Make SkImage_Gpu be deferred 2017-03-20 borenet Roll Recipe DEPS Created with: roll-dep src/third_party/skia BUG= 703363 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, see: http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel TBR=fmalita@chromium.org Change-Id: Ice2b5600e205fd5fb5cd166baa028a7299e7b4ae Reviewed-on: https://chromium-review.googlesource.com/457477 Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org> Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org> Cr-Commit-Position: refs/heads/master@{#458422} [modify] https://crrev.com/926bcd0f17209ee4f86d4234a41a62736f86dc81/DEPS
,
Mar 22 2017
Just gave this a try after the roll, and I'm still seeing the issue.
,
Mar 27 2017
Is there anything I can do to help move this forward? ToT is still cropping content like in the attached enabled.png.
,
Mar 27 2017
I'll take a look tomorrow. Can you share test-inf.html? Or is this obvious on most web pages (I'm still compiling ToT)?
,
Mar 28 2017
Attached (but any page should do). To see it, run with the flag --enable-color-correct-rendering.
,
Mar 30 2017
The following CL will fix this: https://skia-review.googlesource.com/c/10806/ Our test suite currently assumes that SkColorSpaceXform wraps a brand new SkCanvas. But it's clear that, where this is used in Chrome, the wrapped canvas has already accumulated some state. ImageHijackCanvas has a similar problem, and also solves it by passing on the clip and the matrix. https://cs.chromium.org/chromium/src/cc/raster/raster_source.cc?q=ImageHijack&l=97 We could potentially handle this similarly (on the Chrome side), but I think it makes more sense for the xform canvas to automatically assume the state of the wrapped canvas. Fixing on the Chrome side is also tricky because, if (for example) we call setDeviceClipBounds() on the xform canvas, we need to avoid forwarding that call to the wrapped canvas... but we definitely do want to forward any future clip calls.
,
Mar 30 2017
The following revision refers to this bug: https://skia.googlesource.com/skia/+/9969e7714110253371153e114625f9e5381a1a8b commit 9969e7714110253371153e114625f9e5381a1a8b Author: Matt Sarett <msarett@google.com> Date: Thu Mar 30 22:15:21 2017 SkColorSpaceXformCanvas: setMatrix(), clipRect() in constructor BUG= 703363 Change-Id: Ie0053940dd041614b93400e34145118fb0742cae Change-Id: Ie0053940dd041614b93400e34145118fb0742cae Reviewed-on: https://skia-review.googlesource.com/10806 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> [modify] https://crrev.com/9969e7714110253371153e114625f9e5381a1a8b/src/core/SkColorSpaceXformCanvas.cpp
,
Mar 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/630ff6b6277d73253d16714f0b45daebf8d511c8 commit 630ff6b6277d73253d16714f0b45daebf8d511c8 Author: skia-deps-roller@chromium.org <skia-deps-roller@chromium.org> Date: Fri Mar 31 00:29:06 2017 Roll src/third_party/skia/ 609e7ccc6..9969e7714 (6 commits) https://skia.googlesource.com/skia.git/+log/609e7ccc664f..9969e7714110 $ git log 609e7ccc6..9969e7714 --date=short --no-merges --format='%ad %ae %s' 2017-03-30 msarett SkColorSpaceXformCanvas: setMatrix(), clipRect() in constructor 2017-03-30 msarett Add more overrides to SkColorSpaceXformCanvas 2017-03-29 mtklein Turn on SkJumper all the time, try 2. 2017-03-30 ethannicholas fixed skslc SPIR-V memory error 2017-03-30 kjlubick Add Linux HD2000 jobs 2017-03-30 benjaminwagner Remove Galaxy J5 bot. Created with: roll-dep src/third_party/skia BUG= 703363 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, see: http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel TBR=stephana@chromium.org Change-Id: Ib1f36126d50463c7e3ad5e709641dbc5933de77d Reviewed-on: https://chromium-review.googlesource.com/464108 Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org> Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org> Cr-Commit-Position: refs/heads/master@{#460952} [modify] https://crrev.com/630ff6b6277d73253d16714f0b45daebf8d511c8/DEPS
,
Mar 31 2017
Verified at ToT.
,
Apr 3 2017
The following revision refers to this bug: https://skia.googlesource.com/skia/+/9bb14c87d4b7a62b6e2a83ef8a3418f96ddc85b4 commit 9bb14c87d4b7a62b6e2a83ef8a3418f96ddc85b4 Author: Matt Sarett <msarett@google.com> Date: Mon Apr 03 21:07:12 2017 SkColorSpaceXformCanvas: setMatrix(), clipRect() in constructor BUG= 703363 Change-Id: Ie0053940dd041614b93400e34145118fb0742cae Change-Id: Ie0053940dd041614b93400e34145118fb0742cae Reviewed-on: https://skia-review.googlesource.com/10806 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> (cherry picked from commit 9969e7714110253371153e114625f9e5381a1a8b) Reviewed-on: https://skia-review.googlesource.com/11181 Reviewed-by: Matt Sarett <msarett@google.com> [modify] https://crrev.com/9bb14c87d4b7a62b6e2a83ef8a3418f96ddc85b4/src/core/SkColorSpaceXformCanvas.cpp |
||||
►
Sign in to add a comment |
||||
Comment 1 by msarett@chromium.org
, Mar 20 2017