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

Issue 794323004: Emit dummy display item when recorded picture is empty (Closed)

Created:
6 years ago by Xianzhu
Modified:
5 years, 11 months ago
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/heads/master
Project:
blink
Visibility:
Public.

Description

Emit dummy display item when recorded picture is empty Previously we don't emit display item when DrawingRecorder recorded an empty picture. This causes trouble when we merge the new paint list containing CachedDisplayItems: when we emit CachedDisplayItem, we don't know if the last recorded picture is empty; during merging, if we can't find the original display item correponding the CachedDisplayItem, assert will fail in findNextMatchingCachedItem. We could let findNextMatchingCachedItem return m_paintList.end and discard the CachedDisplayItem, but that would cause O(n^2) complexity in worst case. Emit dummy display item when recorded picture is empty to avoid the problem. Add DisplayItem::name() for testing and debugging, especially for dummy display items. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=187088 P.S. BUG=441108

Patch Set 1 #

Patch Set 2 : Add a missed "override" #

Total comments: 3

Patch Set 3 : Create DisplayItem for dummy #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -7 lines) Patch
M Source/core/paint/DrawingRecorderTest.cpp View 2 chunks +28 lines, -1 line 0 comments Download
M Source/core/paint/ViewDisplayListTest.cpp View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/platform/graphics/paint/CachedDisplayItem.h View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/platform/graphics/paint/ClipDisplayItem.h View 2 chunks +6 lines, -0 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItem.h View 1 2 3 chunks +8 lines, -2 lines 0 comments Download
M Source/platform/graphics/paint/DisplayItem.cpp View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M Source/platform/graphics/paint/DrawingDisplayItem.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/graphics/paint/DrawingRecorder.cpp View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M Source/platform/graphics/paint/FilterDisplayItem.h View 2 chunks +6 lines, -0 lines 0 comments Download
M Source/platform/graphics/paint/TransformDisplayItem.h View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M Source/platform/graphics/paint/TransparencyDisplayItem.h View 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (7 generated)
Xianzhu
Actually this is the real root reason of the caret issue.
6 years ago (2014-12-12 18:05:49 UTC) #2
pdr.
I think this is a reasonable approach overall. Instead of creating a new dummy type, ...
6 years ago (2014-12-12 18:39:04 UTC) #3
Stephen Chennney
Or, alternatively, just implement the virtuals on DisplayItem.
6 years ago (2014-12-12 18:40:13 UTC) #5
Xianzhu
Patch Set 3 takes the way that Stephen suggested. There seem some pros not to ...
6 years ago (2014-12-12 19:11:17 UTC) #6
pdr.
LGTM
6 years ago (2014-12-12 19:49:34 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/794323004/40001
6 years ago (2014-12-12 19:50:41 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/41346)
6 years ago (2014-12-12 22:08:33 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/794323004/40001
6 years ago (2014-12-12 22:22:53 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/41373)
6 years ago (2014-12-13 00:37:26 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/794323004/60001
6 years ago (2014-12-13 01:26:46 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://src.chromium.org/viewvc/blink?view=rev&revision=187088
6 years ago (2014-12-13 07:30:21 UTC) #18
chrishtr
Is there a bug that should be associated with this issue?
5 years, 11 months ago (2015-01-05 22:12:07 UTC) #19
Xianzhu
5 years, 11 months ago (2015-01-05 22:20:56 UTC) #20
Message was sent while issue was closed.
On 2015/01/05 22:12:07, chrishtr wrote:
> Is there a bug that should be associated with this issue?

Sorry, I should have referenced crbug.com/441108.

Just noticed we still have an issue about painting carets (crbug.com/444163).
Working on it.

Powered by Google App Engine
This is Rietveld 408576698