DescriptionEmit 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 #Messages
Total messages: 20 (7 generated)
|