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

Issue 2391373002: Refactor CRC2D::reset() to avoid non-additive SkCanvas state operations (Closed)

Created:
4 years, 2 months ago by f(malita)
Modified:
4 years, 2 months ago
Reviewers:
Justin Novosad, reed1
CC:
chromium-reviews, krit, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, ajuma+watch-canvas_chromium.org, dshwang, pdr+graphicswatchlist_chromium.org, jbroman, Justin Novosad, haraken, Rik, f(malita), blink-reviews, piman+watch_chromium.org, danakj+watch_chromium.org, ajuma+watch_chromium.org, Stephen Chennney, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor CRC2D::reset() to avoid non-additive SkCanvas state operations Skia is considering removing the SkCanvas APIs which allow mutating the state in a non-additive manner: setMatrix() & clip{Rect,RRect,Path}(kReplace_Op). CanvasRenderingContext2D uses the above to reset the canvas state to the initial clip and identity matrix. The same can be achieved with an initial unbalanced save() frame, and a restore/save pair in reset(), to reinstate the original clip & matrix. BUG=skia:5773 R=junov@chromium.org,reed@google.com Committed: https://crrev.com/9942278f26cdbae264501e6ec4d7110018035a1e Cr-Commit-Position: refs/heads/master@{#423699}

Patch Set 1 #

Patch Set 2 : offscreenCanvas #

Patch Set 3 : stricter check #

Patch Set 4 : cleanup #

Patch Set 5 : PaintRenderingContext2D #

Patch Set 6 : unit test fix #

Total comments: 8

Patch Set 7 : review #

Messages

Total messages: 27 (21 generated)
f(malita)
This feels a bit fragile due to non-localized canvas initialization, but hopefully the ASSERTS should ...
4 years, 2 months ago (2016-10-06 18:23:03 UTC) #18
Justin Novosad
lgtm with nits https://codereview.chromium.org/2391373002/diff/100001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp File third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/2391373002/diff/100001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp#newcode161 third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp:161: #if ENABLE(ASSERT) should be DCHECK_IS_ON() https://codereview.chromium.org/2391373002/diff/100001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp#newcode294 ...
4 years, 2 months ago (2016-10-06 19:48:55 UTC) #19
f(malita)
https://codereview.chromium.org/2391373002/diff/100001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp File third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/2391373002/diff/100001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp#newcode161 third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp:161: #if ENABLE(ASSERT) On 2016/10/06 19:48:54, Justin Novosad wrote: > ...
4 years, 2 months ago (2016-10-06 20:02:30 UTC) #20
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/2391373002/120001
4 years, 2 months ago (2016-10-06 20:03:14 UTC) #23
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 2 months ago (2016-10-06 21:50:32 UTC) #25
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 21:52:05 UTC) #27
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/9942278f26cdbae264501e6ec4d7110018035a1e
Cr-Commit-Position: refs/heads/master@{#423699}

Powered by Google App Engine
This is Rietveld 408576698