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

Issue 987383003: Fix ASSERT(m_canvas) failures when contextDisabled() (Closed)

Created:
5 years, 9 months ago by Xianzhu
Modified:
5 years, 9 months ago
CC:
blink-reviews, Rik, danakj, Dominik Röttsches, dshwang, krit, jbroman, Justin Novosad, pdr+graphicswatchlist_chromium.org, rwlbuis
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix ASSERT(m_canvas) failures when contextDisabled() contextDisabled() is for performance tests to let GraphicsContext to draw nothing. In either slimming-paint mode or non-slimming-paint mode, we should check it at beginning of every drawing method of GraphicsContext to ensure the performance when contextDisabled() is as expected. Especially in slimming-paint mode, missing the check causes null dereference of m_canvas or ASSERT(m_canvas) failure. - Ensure contextDisabled() is checked in all drawing methods of GraphicsContext; - Use SkNullCanvas when contextDisabled() to ensure drawings directly using GraphicsContext::canvas() will not encounter null canvas and be also controled by contextDisabled(). Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191673 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191734

Patch Set 1 #

Total comments: 8

Patch Set 2 : SkNullCanvas in beginRecording() #

Patch Set 3 : Avoid 2 unnecessary blank line changes #

Patch Set 4 : Keep contextDisabled checks #

Patch Set 5 : Keep contextDisabled checks #

Patch Set 6 : Rebase #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -26 lines) Patch
M Source/platform/graphics/GraphicsContext.cpp View 1 2 3 4 5 18 chunks +31 lines, -26 lines 4 comments Download

Messages

Total messages: 33 (4 generated)
Xianzhu
5 years, 9 months ago (2015-03-10 18:48:52 UTC) #2
chrishtr
How about just setting the SkNullCanvas in beginRecording() and removing it in endRecording()?
5 years, 9 months ago (2015-03-10 18:53:19 UTC) #3
Xianzhu
On 2015/03/10 18:53:19, chrishtr wrote: > How about just setting the SkNullCanvas in beginRecording() and ...
5 years, 9 months ago (2015-03-10 19:05:20 UTC) #4
f(malita)
This should not be a problem in non-slimming-paint mode: we have perf tests which pass ...
5 years, 9 months ago (2015-03-10 19:12:02 UTC) #5
Xianzhu
On 2015/03/10 19:12:02, f(malita) wrote: > This should not be a problem in non-slimming-paint mode: ...
5 years, 9 months ago (2015-03-10 19:29:02 UTC) #6
f(malita)
https://codereview.chromium.org/987383003/diff/1/Source/platform/graphics/GraphicsContext.cpp File Source/platform/graphics/GraphicsContext.cpp (right): https://codereview.chromium.org/987383003/diff/1/Source/platform/graphics/GraphicsContext.cpp#newcode559 Source/platform/graphics/GraphicsContext.cpp:559: if (contextDisabled()) Already checked below. Probably just need to ...
5 years, 9 months ago (2015-03-10 19:34:24 UTC) #8
f(malita)
On 2015/03/10 19:29:02, Xianzhu wrote: > On 2015/03/10 19:12:02, f(malita) wrote: > > This should ...
5 years, 9 months ago (2015-03-10 19:36:43 UTC) #9
f(malita)
On 2015/03/10 19:36:43, f(malita) wrote: > On 2015/03/10 19:29:02, Xianzhu wrote: > > On 2015/03/10 ...
5 years, 9 months ago (2015-03-10 20:22:05 UTC) #10
chrishtr
On 2015/03/10 at 20:22:05, fmalita wrote: > On 2015/03/10 19:36:43, f(malita) wrote: > > On ...
5 years, 9 months ago (2015-03-10 20:24:11 UTC) #11
f(malita)
On 2015/03/10 20:24:11, chrishtr wrote: > On 2015/03/10 at 20:22:05, fmalita wrote: > > So ...
5 years, 9 months ago (2015-03-10 20:32:18 UTC) #12
chrishtr
On 2015/03/10 at 20:32:18, fmalita wrote: > On 2015/03/10 20:24:11, chrishtr wrote: > > On ...
5 years, 9 months ago (2015-03-10 20:45:34 UTC) #13
chrishtr
5 years, 9 months ago (2015-03-10 20:45:38 UTC) #14
Xianzhu
PTAL. Thanks for the pointers. Now I believe contextDisabled() is the SP counterpart of non-SP's ...
5 years, 9 months ago (2015-03-10 20:50:02 UTC) #15
chrishtr
lgtm
5 years, 9 months ago (2015-03-10 22:18:02 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/987383003/40001
5 years, 9 months ago (2015-03-10 23:00:57 UTC) #18
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://src.chromium.org/viewvc/blink?view=rev&revision=191673
5 years, 9 months ago (2015-03-11 03:02:24 UTC) #19
f(malita)
On 2015/03/10 20:50:02, Xianzhu wrote: > In Patch Set I removed all contextDisabled() > checks, ...
5 years, 9 months ago (2015-03-11 03:17:58 UTC) #20
Stephen Chennney
On 2015/03/11 03:17:58, f(malita) wrote: > On 2015/03/10 20:50:02, Xianzhu wrote: > > In Patch ...
5 years, 9 months ago (2015-03-11 12:58:05 UTC) #21
f(malita)
On 2015/03/11 12:58:05, Stephen Chenney wrote: > Expect to see a regression in rasterize_and_record for ...
5 years, 9 months ago (2015-03-11 13:06:57 UTC) #22
Xianzhu
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/997113004/ by wangxianzhu@chromium.org. ...
5 years, 9 months ago (2015-03-11 16:19:26 UTC) #23
Xianzhu
PTAL. The latest patch set is basically the same as Patch Set 1, with fmalita's ...
5 years, 9 months ago (2015-03-11 16:45:10 UTC) #24
f(malita)
LGTM, but I'll defer to Stephen for final say. https://codereview.chromium.org/987383003/diff/100001/Source/platform/graphics/GraphicsContext.cpp File Source/platform/graphics/GraphicsContext.cpp (right): https://codereview.chromium.org/987383003/diff/100001/Source/platform/graphics/GraphicsContext.cpp#newcode111 Source/platform/graphics/GraphicsContext.cpp:111: ...
5 years, 9 months ago (2015-03-11 18:20:51 UTC) #25
chrishtr
lgtm
5 years, 9 months ago (2015-03-11 18:25:46 UTC) #26
Stephen Chennney
On 2015/03/11 18:25:46, chrishtr wrote: > lgtm lgtm from me too. Moving the asserts gives ...
5 years, 9 months ago (2015-03-11 18:30:55 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/987383003/100001
5 years, 9 months ago (2015-03-11 18:44:25 UTC) #29
f(malita)
On 2015/03/11 18:30:55, Stephen Chenney wrote: > I never liked having an "if (contextDisabled())" at ...
5 years, 9 months ago (2015-03-11 18:49:32 UTC) #30
Xianzhu
On 2015/03/11 18:49:32, f(malita) wrote: > On 2015/03/11 18:30:55, Stephen Chenney wrote: > > I ...
5 years, 9 months ago (2015-03-11 19:10:55 UTC) #31
Xianzhu
Late publishing of drafts: https://codereview.chromium.org/987383003/diff/100001/Source/platform/graphics/GraphicsContext.cpp File Source/platform/graphics/GraphicsContext.cpp (right): https://codereview.chromium.org/987383003/diff/100001/Source/platform/graphics/GraphicsContext.cpp#newcode111 Source/platform/graphics/GraphicsContext.cpp:111: if (contextDisabled()) { On 2015/03/11 ...
5 years, 9 months ago (2015-03-11 19:40:47 UTC) #32
commit-bot: I haz the power
5 years, 9 months ago (2015-03-11 21:10:39 UTC) #33
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=191734

Powered by Google App Engine
This is Rietveld 408576698