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

Issue 1959033002: cc: optimize Skia image filter application via SkImage::makeWithFilter(). (Closed)

Created:
4 years, 7 months ago by Stephen White
Modified:
4 years, 7 months ago
Reviewers:
enne (OOO)
CC:
cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: optimize Skia image filter application via SkImage::makeWithFilter(). Instead of allocating a Skia SkSurface, and drawing the source bitmap to its canvas, wrap the input in an SkImage, and call SkImage::makeWithFilter() directly. This saves a texture allocation and a blit. In order to support approx-match textures, the makeWithFilter API also takes a rect (subset) representing the subset of the image which is active/valid, and returns a rect (outSubset) which is the active region of the returned image. This required supporting a non-zero texture coordinate origin in cc. This change depends on https://codereview.chromium.org/1964043002/ in Skia. NOTRY=true CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/5e8ab54bd2b0ab10a85b943a10dc9ebea051bada Cr-Commit-Position: refs/heads/master@{#395263}

Patch Set 1 #

Patch Set 2 : Use new rect-based variant of applyFilter instead #

Patch Set 3 : Fix edge-AA #

Patch Set 4 : fix background filters; fix src offset unit tests #

Patch Set 5 : subset SkISize -> SkIRect; SkImageFilter::Context -> clipBounds; fix style #

Patch Set 6 : Update to SkImage::makeWithFilter() API #

Patch Set 7 : Update to ToT #

Patch Set 8 : Add a comment & bug reference for optimizing background filters #

Patch Set 9 : fix style, tracing strings #

Patch Set 10 : Fix strings (again) #

Patch Set 11 : Refactor wrapping of background texture #

Total comments: 2

Patch Set 12 : Move check for SkImage orientation out of ApplyImageFilter(). #

Patch Set 13 : Add new test to exercise src_offset #

Patch Set 14 : Mark more tests for rebaseline; tweak fuzzy test compares on Win #

Patch Set 15 : Win pixeltest tweakage #

Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -89 lines) Patch
M cc/output/gl_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 10 chunks +119 lines, -87 lines 0 comments Download
A cc/test/data/blur_filter_with_clip_gl.png View 1 2 3 4 5 6 7 8 9 10 11 12 Binary file 0 comments Download
A cc/test/data/blur_filter_with_clip_sw.png View 1 2 3 4 5 6 7 8 9 10 11 12 Binary file 0 comments Download
M cc/test/data/rotated_drop_shadow_filter_gl.png View 1 2 3 Binary file 0 comments Download
M cc/test/data/rotated_filter_gl.png View 1 2 Binary file 0 comments Download
M cc/trees/layer_tree_host_pixeltest_filters.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +58 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (21 generated)
Stephen White
enne@: PTAL. Thanks!
4 years, 7 months ago (2016-05-19 21:53:19 UTC) #8
enne (OOO)
Is it possible to force your tests to use offsets at all? https://codereview.chromium.org/1959033002/diff/220001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc ...
4 years, 7 months ago (2016-05-20 00:53:45 UTC) #11
Stephen White
https://codereview.chromium.org/1959033002/diff/220001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1959033002/diff/220001/cc/output/gl_renderer.cc#newcode653 cc/output/gl_renderer.cc:653: *flip_texture = image->getTexture()->origin() == kBottomLeft_GrSurfaceOrigin; On 2016/05/20 00:53:45, enne ...
4 years, 7 months ago (2016-05-20 03:31:39 UTC) #12
Stephen White
On 2016/05/20 00:53:45, enne wrote: > Is it possible to force your tests to use ...
4 years, 7 months ago (2016-05-20 03:41:02 UTC) #13
Stephen White
New patch up: added a pixel test to exercise src_offset.
4 years, 7 months ago (2016-05-20 15:21:51 UTC) #14
enne (OOO)
lgtm Thanks for the extra test. :)
4 years, 7 months ago (2016-05-20 17:41:55 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1959033002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1959033002/260001
4 years, 7 months ago (2016-05-21 06:08:20 UTC) #17
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/231986)
4 years, 7 months ago (2016-05-21 06:53:07 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1959033002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1959033002/280001
4 years, 7 months ago (2016-05-21 14:54:30 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/74697)
4 years, 7 months ago (2016-05-21 15:46:04 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1959033002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1959033002/300001
4 years, 7 months ago (2016-05-21 17:07:17 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/233439)
4 years, 7 months ago (2016-05-21 19:35:25 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1959033002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1959033002/300001
4 years, 7 months ago (2016-05-21 20:24:39 UTC) #32
commit-bot: I haz the power
Committed patchset #15 (id:300001)
4 years, 7 months ago (2016-05-21 20:27:41 UTC) #34
commit-bot: I haz the power
4 years, 7 months ago (2016-05-21 20:28:52 UTC) #36
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/5e8ab54bd2b0ab10a85b943a10dc9ebea051bada
Cr-Commit-Position: refs/heads/master@{#395263}

Powered by Google App Engine
This is Rietveld 408576698