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

Issue 696763002: Shrink saveLayer device bounds when it supplies an explicit bounds and has a complex paint (Closed)

Created:
6 years, 1 month ago by robertphillips
Modified:
6 years, 1 month ago
Reviewers:
mtklein, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Shrink saveLayer device bounds when it supplies an explicit bounds and has a complex paint This CL shrinks the bound computed for saveLayers that possess both an explicit bound and a complex paint (e.g., one that affects transparent black). In this case the bound of the layer should be the clipped explicit bound rather then the clip prior/after the saveLayer/restore block. In the following the first bound is the currently computed bound while the second is the new/desired one: For a 100x100 picture saveLayer (no bound, no paint) [ 0 0 100 100 ] [ 50 50 100 100 ] setMatrix (translate 50, 50) [ 0 0 100 100 ] [ 50 50 100 100 ] saveLayer (bound of 0, 0, 50, 50 - complex paint) [ 0 0 100 100 ] [ 50 50 100 100 ] restore [ 0 0 100 100 ] [ 50 50 100 100 ] restore [ 0 0 100 100 ] [ 50 50 100 100 ] Committed: https://skia.googlesource.com/skia/+/4d52afef5cf90a2fed3bb69db71675c6450ab397

Patch Set 1 #

Total comments: 3

Patch Set 2 : Propagate use of cull rect #

Patch Set 3 : Add unit test #

Total comments: 7

Patch Set 4 : Address code review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -31 lines) Patch
M src/core/SkPicture.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkRecordDraw.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkRecordDraw.cpp View 1 2 3 10 chunks +24 lines, -24 lines 0 comments Download
M tests/RecordDrawTest.cpp View 1 2 4 chunks +28 lines, -5 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
robertphillips
6 years, 1 month ago (2014-10-31 17:58:29 UTC) #2
mtklein
Can you add your example as a new unit test? Is this a perf-motivated change ...
6 years, 1 month ago (2014-10-31 18:21:01 UTC) #3
robertphillips
> Can you add your example as a new unit test? This came up because ...
6 years, 1 month ago (2014-10-31 18:49:42 UTC) #4
robertphillips
https://codereview.chromium.org/696763002/diff/1/src/core/SkRecordDraw.cpp File src/core/SkRecordDraw.cpp (right): https://codereview.chromium.org/696763002/diff/1/src/core/SkRecordDraw.cpp#newcode124 src/core/SkRecordDraw.cpp:124: static const SkRect kUnbounded = { -2e9f, -2e9f, 2e9f, ...
6 years, 1 month ago (2014-10-31 18:49:55 UTC) #5
mtklein
lgtm, just some nits https://codereview.chromium.org/696763002/diff/40001/src/core/SkRecordDraw.cpp File src/core/SkRecordDraw.cpp (right): https://codereview.chromium.org/696763002/diff/40001/src/core/SkRecordDraw.cpp#newcode253 src/core/SkRecordDraw.cpp:253: // then the current clip ...
6 years, 1 month ago (2014-11-03 14:59:31 UTC) #6
robertphillips
https://codereview.chromium.org/696763002/diff/40001/src/core/SkRecordDraw.cpp File src/core/SkRecordDraw.cpp (right): https://codereview.chromium.org/696763002/diff/40001/src/core/SkRecordDraw.cpp#newcode253 src/core/SkRecordDraw.cpp:253: // then the current clip bounds. On 2014/11/03 14:59:31, ...
6 years, 1 month ago (2014-11-03 16:11:18 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/696763002/60001
6 years, 1 month ago (2014-11-03 16:12:07 UTC) #9
commit-bot: I haz the power
6 years, 1 month ago (2014-11-03 16:19:49 UTC) #10
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as 4d52afef5cf90a2fed3bb69db71675c6450ab397

Powered by Google App Engine
This is Rietveld 408576698