New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 667479 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature



Sign in to add a comment

Handle SkImageShader cases in ImageHijackCanvas

Project Member Reported by ericrk@chromium.org, Nov 21 2016

Issue description

Currently, ImageHijackCanvas intercepts images from DrawImage and DrawImageRect. This covers most cases (UMA indicates somewhere around 75%), but still misses a fair number of images.

vmiura@ has an example of handling SkPictureShaders with ImageHijackCanvas, but this is a rare case and may not be worth checking in at the moment. See crrev.com/2516873002

We could extend the ideas from that patch to handle SkImageShaders, a much more common case.
 

Comment 1 by vmp...@chromium.org, Nov 21 2016

Labels: Hotlist-ImageWG
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6dfd1ba1efd6d4669b5f048eab38beaadfa63934

commit 6dfd1ba1efd6d4669b5f048eab38beaadfa63934
Author: ericrk <ericrk@chromium.org>
Date: Wed Dec 07 00:51:50 2016

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

Review-Url: https://codereview.chromium.org/2514263002
Cr-Commit-Position: refs/heads/master@{#436796}

[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/cc/playback/discardable_image_map.cc
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/cc/playback/discardable_image_map_unittest.cc
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/cc/playback/image_hijack_canvas.cc
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/cc/playback/image_hijack_canvas.h
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/fast/backgrounds/size/backgroundSize18-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/fast/backgrounds/size/backgroundSize19-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/fast/backgrounds/size/backgroundSize21-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/fast/backgrounds/size/backgroundSize22-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/fast/borders/border-image-rotate-transform-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/linux/fast/backgrounds/size/backgroundSize16-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-image-rotate-transform-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-background-image-repeat-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-border-image-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-group-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/mac/css3/blending/effect-background-blend-mode-tiled-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/size/backgroundSize16-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-background-image-repeat-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-border-image-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-group-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/win/css3/blending/effect-background-blend-mode-tiled-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/win/fast/backgrounds/size/backgroundSize16-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-background-image-repeat-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-border-image-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-group-expected.png
[modify] https://crrev.com/6dfd1ba1efd6d4669b5f048eab38beaadfa63934/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png

Status: Fixed (was: Started)

Sign in to add a comment