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

Issue 2823113002: Fix crash in PaintOpBuffer alpha optimization (Closed)

Created:
3 years, 8 months ago by enne (OOO)
Modified:
3 years, 8 months ago
Reviewers:
vmpstr
CC:
cc-bugs_chromium.org, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix crash in PaintOpBuffer alpha optimization PaintOpBuffer in general checks if ops are draw ops before applying the save/draw/restore alpha folding optimization to remove save layers. However, the specific code that tries to recursively apply this op to DrawRecordOp with a single op does not check draw op status. Printing generates single op pictures containing annotate ops (for pdf links, etc), which causes this to crash in practice. The last unit test in this patch causes this to crash without the code change applied. The other unit tests are there just for completeness. An alternative to this patch would be to implement RasterWithAlpha for all op types, but that seems like needless code gen for a bunch of functions that will never get called in practice. BUG=712093 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2823113002 Cr-Commit-Position: refs/heads/master@{#465145} Committed: https://chromium.googlesource.com/chromium/src/+/52c5ec950ba33ce26507840a34fd8690f86fe801

Patch Set 1 #

Patch Set 2 : Fix windows question mark #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -46 lines) Patch
M cc/paint/paint_op_buffer.h View 1 31 chunks +41 lines, -36 lines 0 comments Download
M cc/paint/paint_op_buffer.cc View 1 3 chunks +20 lines, -10 lines 0 comments Download
M cc/paint/paint_op_buffer_unittest.cc View 1 chunk +73 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (10 generated)
enne (OOO)
3 years, 8 months ago (2017-04-17 23:33:33 UTC) #3
vmpstr
lgtm
3 years, 8 months ago (2017-04-17 23:39:00 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2823113002/20001
3 years, 8 months ago (2017-04-18 03:54:15 UTC) #11
commit-bot: I haz the power
3 years, 8 months ago (2017-04-18 05:07:59 UTC) #14
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/52c5ec950ba33ce26507840a34fd...

Powered by Google App Engine
This is Rietveld 408576698