Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Issue 2514263002: Handle simple SkImageShaders (Closed)

Created:
4 years, 1 month ago by ericrk
Modified:
4 years ago
Reviewers:
vmiura, vmpstr
CC:
chromium-reviews, cc-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle simple SkImageShaders Currently, the Image Decode Controller (IDC) can't process images that are embedded in a SkPaint's SkShader. This change expands coverage to handle cases where the SkShader is a simple SkImageShader, for which Skia provides introspection via isAImage(). This change updates DiscardableImageMap to allow us to track and pre- decode these images. It additionally updates ImageHijackCanvas to replace the un-decoded images with decoded ones at runtime. This change does not yet handle decoding sub-rects of images used in an SkImageShader, although that should be a relatively straight-forward follow-up. R=vmpstr,vmiura BUG=667479 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Committed: https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934 Cr-Commit-Position: refs/heads/master@{#436796}

Patch Set 1 #

Patch Set 2 : Cleanup #

Patch Set 3 : rebase #

Patch Set 4 : Handle more cases (RRect/Arc/Oval) and fix std::move issue for ScopedDecodedImageLock #

Patch Set 5 : Fix prescale/postscale mix-up #

Patch Set 6 : Add blink rebaseline #

Patch Set 7 : rebase #

Patch Set 8 : rebase #

Total comments: 2

Patch Set 9 : rebase #

Patch Set 10 : Include paint scale when calculating image scale #

Patch Set 11 : layout test updates #

Patch Set 12 : fix unit test #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+275 lines, -25 lines) Patch
M cc/playback/discardable_image_map.cc View 1 2 3 4 5 6 7 8 9 4 chunks +46 lines, -1 line 2 comments Download
M cc/playback/discardable_image_map_unittest.cc View 3 4 5 6 7 8 9 10 11 14 chunks +100 lines, -21 lines 0 comments Download
M cc/playback/image_hijack_canvas.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -1 line 0 comments Download
M cc/playback/image_hijack_canvas.cc View 1 2 3 4 5 6 7 8 9 4 chunks +120 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/backgrounds/size/backgroundSize18-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/fast/backgrounds/size/backgroundSize19-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/fast/backgrounds/size/backgroundSize21-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/fast/backgrounds/size/backgroundSize22-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/fast/borders/border-image-rotate-transform-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/backgrounds/size/backgroundSize16-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-image-rotate-transform-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-background-image-repeat-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-border-image-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-group-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/css3/blending/effect-background-blend-mode-tiled-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/size/backgroundSize16-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-background-image-repeat-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-border-image-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-group-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/css3/blending/effect-background-blend-mode-tiled-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/backgrounds/size/backgroundSize16-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-background-image-repeat-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-border-image-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-group-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download

Dependent Patchsets:

Messages

Total messages: 87 (74 generated)
ericrk
Here's an attempt at handling SkImageShaders based on vmiura@'s SkPicture code. Seems to work pretty ...
4 years, 1 month ago (2016-11-21 02:40:17 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2514263002/40001
4 years, 1 month ago (2016-11-21 02:55:42 UTC) #12
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 1 month ago (2016-11-21 02:55:43 UTC) #14
ericrk
Other than needing to rebase again :/, this should be good to go. vmpstr@, can ...
4 years ago (2016-11-29 00:43:08 UTC) #62
vmpstr
lgtm, thanks! https://codereview.chromium.org/2514263002/diff/140001/cc/playback/image_hijack_canvas.cc File cc/playback/image_hijack_canvas.cc (right): https://codereview.chromium.org/2514263002/diff/140001/cc/playback/image_hijack_canvas.cc#newcode99 cc/playback/image_hijack_canvas.cc:99: matrix.preScale(1.f / (decoded_image.scale_adjustment().width()), nit: no need for ...
4 years ago (2016-11-29 01:00:03 UTC) #63
ericrk
https://codereview.chromium.org/2514263002/diff/140001/cc/playback/image_hijack_canvas.cc File cc/playback/image_hijack_canvas.cc (right): https://codereview.chromium.org/2514263002/diff/140001/cc/playback/image_hijack_canvas.cc#newcode99 cc/playback/image_hijack_canvas.cc:99: matrix.preScale(1.f / (decoded_image.scale_adjustment().width()), On 2016/11/29 01:00:03, vmpstr wrote: > ...
4 years ago (2016-11-29 21:46:05 UTC) #64
ericrk
Ok, fixed an issue where we were not including the full scale when pre-decoding. Now ...
4 years ago (2016-12-06 21:16:05 UTC) #75
vmpstr
lgtm https://codereview.chromium.org/2514263002/diff/260001/cc/playback/discardable_image_map.cc File cc/playback/discardable_image_map.cc (right): https://codereview.chromium.org/2514263002/diff/260001/cc/playback/discardable_image_map.cc#newcode218 cc/playback/discardable_image_map.cc:218: // TODO(ericrk): Handle cases where we only need ...
4 years ago (2016-12-06 22:43:36 UTC) #76
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2514263002/260001
4 years ago (2016-12-06 23:05:34 UTC) #78
ericrk
https://codereview.chromium.org/2514263002/diff/260001/cc/playback/discardable_image_map.cc File cc/playback/discardable_image_map.cc (right): https://codereview.chromium.org/2514263002/diff/260001/cc/playback/discardable_image_map.cc#newcode218 cc/playback/discardable_image_map.cc:218: // TODO(ericrk): Handle cases where we only need a ...
4 years ago (2016-12-06 23:08:51 UTC) #79
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2514263002/260001
4 years ago (2016-12-06 23:37:04 UTC) #82
commit-bot: I haz the power
Committed patchset #12 (id:260001)
4 years ago (2016-12-07 00:52:33 UTC) #85
commit-bot: I haz the power
4 years ago (2016-12-07 00:56:42 UTC) #87
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934
Cr-Commit-Position: refs/heads/master@{#436796}

Powered by Google App Engine
This is Rietveld 408576698