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

Issue 840483005: Fold alpha to the draw in savelayer-draw-restore patterns with non-opaque draw (Closed)

Created:
5 years, 11 months ago by Kimmo Kinnunen
Modified:
5 years, 11 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@unique-id-unflatten
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Fold alpha to the draw in savelayer-draw-restore patterns with non-opaque draw Fold alpha of a save layer call to the subsequent draw call paint, even when the draw call paint color is already non-opaque. Comparing the difference of the unoptimized and the optimized call pattern with all (layer alpha, draw alpha) combinations, this produces off-by-one pixels ~50% of the time. Reduces layers of current desk_carsvg.skp (recorded with cross-process picture image filters allowed) from 122 to 115. BUG=skia:3119 Committed: https://skia.googlesource.com/skia/+/678c1b019ac98bc7d94841132c8105a77490bc64

Patch Set 1 #

Patch Set 2 : #

Total comments: 8

Patch Set 3 : address review comments #

Patch Set 4 : #

Total comments: 5

Patch Set 5 : address review comments #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -27 lines) Patch
M src/core/SkRecordOpts.cpp View 1 2 3 4 5 2 chunks +3 lines, -8 lines 0 comments Download
M tests/RecordOptsTest.cpp View 1 2 3 4 5 1 chunk +19 lines, -19 lines 0 comments Download

Messages

Total messages: 21 (4 generated)
Kimmo Kinnunen
Robert, you mentioned in the bug: > 3) SaveLayer|DrawPath|Restore where both paints have an alpha ...
5 years, 11 months ago (2015-01-13 08:31:28 UTC) #2
mtklein
Thanks for doing this TODO! I have only nits. https://codereview.chromium.org/840483005/diff/20001/gm/recordopts.cpp File gm/recordopts.cpp (right): https://codereview.chromium.org/840483005/diff/20001/gm/recordopts.cpp#newcode62 gm/recordopts.cpp:62: ...
5 years, 11 months ago (2015-01-13 18:48:20 UTC) #4
mtklein
https://codereview.chromium.org/840483005/diff/20001/gm/recordopts.cpp File gm/recordopts.cpp (right): https://codereview.chromium.org/840483005/diff/20001/gm/recordopts.cpp#newcode62 gm/recordopts.cpp:62: fPicture->playback(canvas); On 2015/01/13 18:48:20, mtklein wrote: > Seems like ...
5 years, 11 months ago (2015-01-13 18:50:58 UTC) #5
Kimmo Kinnunen
https://codereview.chromium.org/840483005/diff/20001/gm/recordopts.cpp File gm/recordopts.cpp (right): https://codereview.chromium.org/840483005/diff/20001/gm/recordopts.cpp#newcode62 gm/recordopts.cpp:62: fPicture->playback(canvas); On 2015/01/13 18:50:58, mtklein wrote: > On 2015/01/13 ...
5 years, 11 months ago (2015-01-14 13:07:51 UTC) #6
mtklein
https://codereview.chromium.org/840483005/diff/60001/gm/recordopts.cpp File gm/recordopts.cpp (right): https://codereview.chromium.org/840483005/diff/60001/gm/recordopts.cpp#newcode21 gm/recordopts.cpp:21: // can not save layer for every call. This ...
5 years, 11 months ago (2015-01-14 13:28:31 UTC) #7
Kimmo Kinnunen
https://codereview.chromium.org/840483005/diff/60001/gm/recordopts.cpp File gm/recordopts.cpp (right): https://codereview.chromium.org/840483005/diff/60001/gm/recordopts.cpp#newcode267 gm/recordopts.cpp:267: // execute so many save layers in time. Thus ...
5 years, 11 months ago (2015-01-14 14:07:20 UTC) #8
mtklein
LGTM Greg mentioned to me just now he was rejiggering how GPU transfermodes work, so ...
5 years, 11 months ago (2015-01-14 14:53:10 UTC) #9
egdaniel
The main question I have here on the gpu side is will this Xfer effect ...
5 years, 11 months ago (2015-01-14 15:00:38 UTC) #11
mtklein
Hmm. Let me un-lgtm this. Why don't we just readPixels() back after we draw, do ...
5 years, 11 months ago (2015-01-14 15:12:52 UTC) #12
mtklein
On 2015/01/14 15:12:52, mtklein wrote: > Hmm. Let me un-lgtm this. Why don't we just ...
5 years, 11 months ago (2015-01-14 15:13:05 UTC) #13
egdaniel
On 2015/01/14 15:13:05, mtklein wrote: > On 2015/01/14 15:12:52, mtklein wrote: > > Hmm. Let ...
5 years, 11 months ago (2015-01-14 15:37:28 UTC) #14
Kimmo Kinnunen
On 2015/01/14 15:12:52, mtklein wrote: > Hmm. Let me un-lgtm this. Why don't we just ...
5 years, 11 months ago (2015-01-15 08:38:04 UTC) #15
mtklein
Let's land this today without yet landing a new GM. It's starting to bother me ...
5 years, 11 months ago (2015-01-15 16:08:27 UTC) #16
Kimmo Kinnunen
On 2015/01/15 16:08:27, mtklein wrote: > Let's land this today without yet landing a new ...
5 years, 11 months ago (2015-01-16 09:02:44 UTC) #17
mtklein
lgtm
5 years, 11 months ago (2015-01-16 12:54:52 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/840483005/100001
5 years, 11 months ago (2015-01-16 12:55:31 UTC) #20
commit-bot: I haz the power
5 years, 11 months ago (2015-01-16 13:04:39 UTC) #21
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://skia.googlesource.com/skia/+/678c1b019ac98bc7d94841132c8105a77490bc64

Powered by Google App Engine
This is Rietveld 408576698