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

Issue 800553002: Disable drawing recorder cache for carets (Closed)

Created:
6 years ago by pdr.
Modified:
6 years ago
Reviewers:
chrishtr, Xianzhu
CC:
blink-reviews, blink-reviews-paint_chromium.org, Rik, danakj, Dominik Röttsches, krit, f(malita), jbroman, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney, slimming-paint-reviews_chromium.org
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

Disable drawing recorder cache for carets Carets paint into other renderer's display items and can change without invalidating! This leads to problems in the display list update because cached display items should not change. This patch adds a cache disabler for caret rendering. Carrot rendering is unaffected by this change: http://pr.gg/carrot_display_list.png BUG=441108

Patch Set 1 #

Patch Set 2 : Cleanup #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -7 lines) Patch
A LayoutTests/fast/text/caret-crash.html View 1 1 chunk +17 lines, -0 lines 1 comment Download
A LayoutTests/fast/text/caret-crash-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/paint/BlockPainter.cpp View 1 chunk +1 line, -1 line 2 comments Download
M Source/core/paint/RenderDrawingRecorder.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/RenderDrawingRecorder.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/platform/graphics/paint/DrawingRecorder.h View 1 1 chunk +6 lines, -1 line 0 comments Download
M Source/platform/graphics/paint/DrawingRecorder.cpp View 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (1 generated)
pdr.
6 years ago (2014-12-11 20:24:02 UTC) #2
Xianzhu
lgtm. It's great that slimming paint can also reduce painting for caret. Previously I thought ...
6 years ago (2014-12-11 20:50:04 UTC) #3
pdr.
On 2014/12/11 at 20:50:04, wangxianzhu wrote: > lgtm. > > It's great that slimming paint ...
6 years ago (2014-12-11 21:01:08 UTC) #4
Xianzhu
(Got 'Internal error' when replying in the CL, so reply the email here) Just noticed ...
6 years ago (2014-12-11 21:46:41 UTC) #5
chrishtr
I also got an error. My comment: Also, how exactly do carets paint without invalidation? ...
6 years ago (2014-12-11 21:48:36 UTC) #6
Xianzhu
Did more debugging, and I'm sure this is an under-invalidation issue: on setCaretBrowsingEnabled(), the caret ...
6 years ago (2014-12-11 23:26:20 UTC) #7
Xianzhu
Scratch the lgtm because we need to think more about this. I'm tracing invalidation about ...
6 years ago (2014-12-11 23:57:43 UTC) #8
chrishtr
https://codereview.chromium.org/800553002/diff/20001/Source/core/paint/BlockPainter.cpp File Source/core/paint/BlockPainter.cpp (right): https://codereview.chromium.org/800553002/diff/20001/Source/core/paint/BlockPainter.cpp#newcode228 Source/core/paint/BlockPainter.cpp:228: RenderDrawingRecorder recorder(paintInfo.context, &m_renderBlock, paintPhase, bounds, DrawingRecorder::DisableCache); Add a comment ...
6 years ago (2014-12-12 00:18:01 UTC) #9
Xianzhu
https://codereview.chromium.org/800553002/diff/20001/Source/core/paint/BlockPainter.cpp File Source/core/paint/BlockPainter.cpp (right): https://codereview.chromium.org/800553002/diff/20001/Source/core/paint/BlockPainter.cpp#newcode228 Source/core/paint/BlockPainter.cpp:228: RenderDrawingRecorder recorder(paintInfo.context, &m_renderBlock, paintPhase, bounds, DrawingRecorder::DisableCache); On 2014/12/12 00:18:01, ...
6 years ago (2014-12-12 00:24:16 UTC) #10
chrishtr
On 2014/12/12 at 00:24:16, wangxianzhu wrote: > https://codereview.chromium.org/800553002/diff/20001/Source/core/paint/BlockPainter.cpp > File Source/core/paint/BlockPainter.cpp (right): > > https://codereview.chromium.org/800553002/diff/20001/Source/core/paint/BlockPainter.cpp#newcode228 ...
6 years ago (2014-12-12 00:36:10 UTC) #11
pdr.
6 years ago (2014-12-12 00:46:27 UTC) #12
On 2014/12/12 at 00:36:10, chrishtr wrote:
> On 2014/12/12 at 00:24:16, wangxianzhu wrote:
> >
https://codereview.chromium.org/800553002/diff/20001/Source/core/paint/BlockP...
> > File Source/core/paint/BlockPainter.cpp (right):
> > 
> >
https://codereview.chromium.org/800553002/diff/20001/Source/core/paint/BlockP...
> > Source/core/paint/BlockPainter.cpp:228: RenderDrawingRecorder
recorder(paintInfo.context, &m_renderBlock, paintPhase, bounds,
DrawingRecorder::DisableCache);
> > On 2014/12/12 00:18:01, chrishtr wrote:
> > > Add a comment explaining the situation. Also, how exactly do carets paint
> > > without invalidation?
> > > 
> > > How much work is it for carets to start invalidating their containing
block?
> > 
> > Actually we already invalidated carets within their containing block. We
just miss the invalidation when caretBrowsing setting changes which is a common
bug of all paint modes. I'm looking into the bug.
> > 
> > This shows that our cached display item assertions are good to discover
under-invalidation bugs :)
> 
> Amazing! Thanks for finding the root issue.

Teamwork ftw! My analysis above was all using my reduced testcase so I didn't
see that carets actually do invalidate properly :/

One strange aspect of this is that this setting is being set asynchronously in
the first place.

wangxianzhu is going to take over landing this.

Powered by Google App Engine
This is Rietveld 408576698