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

Issue 22867046: Optimize alpha software PictureDrawQuads. (Closed)

Created:
7 years, 4 months ago by aelias_OOO_until_Jul13
Modified:
7 years, 3 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, joth, boliu, benm (inactive)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Optimize alpha software PictureDrawQuads. Instead of mallocing another bitmap, edit the SkPicture's draw commands at playback time to use the PictureDrawQuad's opacity. This results in similar performance as if Blink had baked in the opacity in the first place. However, it's not correct in some cases: filed http://crbug.com/280374 to track. Also turn off setFilterBitmap for software PictureDrawQuads as this is very costly in practice. BUG=275048 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=220257

Patch Set 1 #

Patch Set 2 : Remove default arguments #

Total comments: 3

Patch Set 3 : Add DCHECK for xfermode #

Total comments: 4

Patch Set 4 : Remove SkXfermode override #

Patch Set 5 : Add bug number #

Patch Set 6 : Add a test and bring back Ganesh support #

Total comments: 1

Patch Set 7 : Add TODO to comment #

Total comments: 13

Patch Set 8 : tomhudson@'s code review comments #

Total comments: 4

Patch Set 9 : Rebase to 220074 #

Patch Set 10 : Revert gl_renderer changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -21 lines) Patch
M cc/output/renderer_pixeltest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +73 lines, -0 lines 0 comments Download
M cc/output/software_renderer.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -21 lines 0 comments Download
A skia/ext/opacity_draw_filter.h View 1 2 3 4 5 6 7 8 9 1 chunk +33 lines, -0 lines 0 comments Download
A skia/ext/opacity_draw_filter.cc View 1 2 3 4 5 6 7 1 chunk +27 lines, -0 lines 0 comments Download
M skia/skia_chrome.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
aelias_OOO_until_Jul13
Hi, I found this trick to optimize non-opaque draws without needing any invasive Blink changes. ...
7 years, 4 months ago (2013-08-24 07:50:49 UTC) #1
jamesr
https://codereview.chromium.org/22867046/diff/4001/skia/ext/alpha_proxy_canvas.h File skia/ext/alpha_proxy_canvas.h (right): https://codereview.chromium.org/22867046/diff/4001/skia/ext/alpha_proxy_canvas.h#newcode13 skia/ext/alpha_proxy_canvas.h:13: class SK_API AlphaProxyCanvas : public SkProxyCanvas { why is ...
7 years, 3 months ago (2013-08-26 18:09:08 UTC) #2
aelias_OOO_until_Jul13
On 2013/08/26 18:09:08, jamesr wrote: > https://codereview.chromium.org/22867046/diff/4001/skia/ext/alpha_proxy_canvas.h > File skia/ext/alpha_proxy_canvas.h (right): > > https://codereview.chromium.org/22867046/diff/4001/skia/ext/alpha_proxy_canvas.h#newcode13 > ...
7 years, 3 months ago (2013-08-26 18:30:34 UTC) #3
enne (OOO)
skia/ext seems like a reasonable place for this code to live. It's not really a ...
7 years, 3 months ago (2013-08-26 19:01:31 UTC) #4
enne (OOO)
This is the "fast but not correct" approach, right? We push more cases to blend ...
7 years, 3 months ago (2013-08-27 00:25:52 UTC) #5
aelias_OOO_until_Jul13
Yes, it's not correct. I took a closer look at Blink's logic today and it's ...
7 years, 3 months ago (2013-08-27 07:02:27 UTC) #6
danakj
On Tue, Aug 27, 2013 at 3:02 AM, <aelias@chromium.org> wrote: > Yes, it's not correct. ...
7 years, 3 months ago (2013-08-27 14:45:06 UTC) #7
enne (OOO)
I think you could test this with layout tests by handing this AlphaProxyCanvas to ContentLayerUpdater::PaintContents ...
7 years, 3 months ago (2013-08-27 18:53:29 UTC) #8
aelias_OOO_until_Jul13
PTAL. I got some pushback to adding more virtuals in Skia, and learned that the ...
7 years, 3 months ago (2013-08-28 02:38:40 UTC) #9
joth
thanks for handling this aelias. I'm all for increasing correctness in future if it can ...
7 years, 3 months ago (2013-08-28 03:29:12 UTC) #10
tomhudson
https://codereview.chromium.org/22867046/diff/29001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/22867046/diff/29001/cc/output/gl_renderer.cc#newcode1672 cc/output/gl_renderer.cc:1672: if (quad->opacity() != 1.0f) Do you want to debug ...
7 years, 3 months ago (2013-08-28 14:55:18 UTC) #11
aelias_OOO_until_Jul13
https://codereview.chromium.org/22867046/diff/29001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/22867046/diff/29001/cc/output/gl_renderer.cc#newcode1672 cc/output/gl_renderer.cc:1672: if (quad->opacity() != 1.0f) On 2013/08/28 14:55:18, tomhudson wrote: ...
7 years, 3 months ago (2013-08-28 18:50:35 UTC) #12
enne (OOO)
https://codereview.chromium.org/22867046/diff/35001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/22867046/diff/35001/cc/output/gl_renderer.cc#newcode1640 cc/output/gl_renderer.cc:1640: void GLRenderer::DrawPictureQuadDirectToBackbuffer( Can you not change this path? I'm ...
7 years, 3 months ago (2013-08-28 20:08:42 UTC) #13
aelias_OOO_until_Jul13
https://codereview.chromium.org/22867046/diff/35001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/22867046/diff/35001/cc/output/gl_renderer.cc#newcode1640 cc/output/gl_renderer.cc:1640: void GLRenderer::DrawPictureQuadDirectToBackbuffer( On 2013/08/28 20:08:42, enne wrote: > Can ...
7 years, 3 months ago (2013-08-28 20:22:59 UTC) #14
enne (OOO)
lgtm, thanks!
7 years, 3 months ago (2013-08-28 20:29:47 UTC) #15
aelias_OOO_until_Jul13
OK, I just need OWNERS from Tom for the skia/ change.
7 years, 3 months ago (2013-08-28 20:57:39 UTC) #16
tomhudson
On 2013/08/28 20:57:39, aelias wrote: > OK, I just need OWNERS from Tom for the ...
7 years, 3 months ago (2013-08-29 08:14:09 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aelias@chromium.org/22867046/44001
7 years, 3 months ago (2013-08-29 08:18:27 UTC) #18
commit-bot: I haz the power
7 years, 3 months ago (2013-08-29 11:19:21 UTC) #19
Message was sent while issue was closed.
Change committed as 220257

Powered by Google App Engine
This is Rietveld 408576698