Commit 256619b4 authored by chrishtr's avatar chrishtr Committed by Commit bot

Remove begin/end subseq. display items, and store on PaintController instead.

Subsequence display items cause complications for the SPv2 compositing algorithm
because they confuse the PaintChunker. Also, they are the last remaining
paired display item in SPv2 that blocks simplifying the display list format.

BUG=692614

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2793233002
Cr-Commit-Position: refs/heads/master@{#462735}
parent 5cba6a6e
......@@ -110,6 +110,7 @@ Bug(none) virtual/without-smil/ [ Skip ]
Bug(none) compositing/3d-cube.html [ Failure ]
Bug(none) compositing/absolute-inside-out-of-view-fixed.html [ Failure ]
Bug(none) compositing/always-composite-fixed-position-when-descendants-composite.html [ Failure ]
Bug(none) compositing/animation/hidden-composited.html [ Failure ]
Bug(none) compositing/backface-visibility/backface-visibility-image.html [ Failure ]
Bug(none) compositing/backface-visibility/backface-visibility-webgl.html [ Failure ]
......@@ -1366,6 +1367,11 @@ crbug.com/692310 virtual/threaded/animations/zoom-responsive-transform-animation
crbug.com/692310 virtual/threaded/transitions/opacity-transition-zindex.html [ Timeout ]
crbug.com/692310 virtual/threaded/transitions/unprefixed-transform.html [ Timeout ]
Bug(none) virtual/threaded/animations/3d/change-transform-in-end-event.html [ Failure ]
Bug(none) virtual/threaded/animations/composited-pseudo-element-animation.html [ Failure ]
Bug(none) virtual/threaded/animations/css-composite-animation-affects-use-elements.html [ Failure ]
Bug(none) virtual/threaded/transitions/transition-end-event-rendering.html [ Failure ]
# Compositor Worker logic has not yet been fully ported to SPv2.
crbug.com/686897 virtual/threaded/fast/compositorworker/compositor-attribute-change-worker.html [ Timeout ]
crbug.com/686897 virtual/threaded/fast/compositorworker/compositor-proxy-disconnect-worker.html [ Timeout ]
......
......@@ -36,12 +36,9 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2,
*toLayoutText(div.firstChild()->layoutObject())->firstTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 4,
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(textInlineBox, foregroundType),
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(textInlineBox, foregroundType));
} else {
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
TestDisplayItem(layoutView(), documentBackgroundType),
......@@ -53,14 +50,12 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2,
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 5,
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
rootPaintController().getDisplayItemList(), 3,
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(textInlineBox, foregroundType),
TestDisplayItem(
document().frame()->selection().caretDisplayItemClientForTesting(),
DisplayItem::kCaret), // New!
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
DisplayItem::kCaret)); // New!
} else {
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 3,
......@@ -83,12 +78,9 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) {
InlineTextBox& firstTextBox = *text.firstTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 4,
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(firstTextBox, foregroundType),
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(firstTextBox, foregroundType));
} else {
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
TestDisplayItem(layoutView(), documentBackgroundType),
......@@ -103,13 +95,10 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) {
InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 5,
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(newFirstTextBox, foregroundType),
TestDisplayItem(secondTextBox, foregroundType),
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 3,
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(newFirstTextBox, foregroundType),
TestDisplayItem(secondTextBox, foregroundType));
} else {
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 3,
TestDisplayItem(layoutView(), documentBackgroundType),
......@@ -126,21 +115,13 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV2, ChunkIdClientCacheFlag) {
" <div style='width: 100px; height: 100px; background-color: "
"blue'></div>"
"</div>");
PaintLayer& htmlLayer =
*toLayoutBoxModelObject(document().documentElement()->layoutObject())
->layer();
LayoutBlock& div = *toLayoutBlock(getLayoutObjectByElementId("div"));
LayoutObject& subDiv = *div.firstChild();
LayoutObject& subDiv2 = *subDiv.nextSibling();
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 7,
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(htmlLayer, DisplayItem::kSubsequence),
TestDisplayItem(subDiv, backgroundType),
TestDisplayItem(subDiv2, backgroundType),
TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence),
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 3,
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(subDiv, backgroundType),
TestDisplayItem(subDiv2, backgroundType));
// Verify that the background does not scroll.
const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0];
......@@ -168,20 +149,12 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV2, CompositingNoFold) {
" <div style='width: 100px; height: 100px; background-color: "
"blue'></div>"
"</div>");
PaintLayer& htmlLayer =
*toLayoutBoxModelObject(document().documentElement()->layoutObject())
->layer();
LayoutBlock& div = *toLayoutBlock(getLayoutObjectByElementId("div"));
LayoutObject& subDiv = *div.firstChild();
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 6,
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(htmlLayer, DisplayItem::kSubsequence),
TestDisplayItem(subDiv, backgroundType),
TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence),
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(subDiv, backgroundType));
}
} // namespace blink
......@@ -146,7 +146,6 @@ TEST_P(PaintPropertyTreeUpdateTest, ParentFrameMainThreadScrollReasons) {
"<style>body { margin: 0; }</style>"
"<div id='forceScroll' style='height: 8888px;'></div>");
document().view()->updateAllLifecyclePhases();
FrameView* parent = document().view();
EXPECT_TRUE(frameScroll(parent)->hasBackgroundAttachmentFixedDescendants());
FrameView* child = childDocument().view();
......
......@@ -122,9 +122,6 @@ TEST_F(TablePainterTest, BackgroundInSelfPaintingRow) {
LayoutObject& cell1 = *getLayoutObjectByElementId("cell1");
LayoutObject& cell2 = *getLayoutObjectByElementId("cell2");
LayoutObject& row = *getLayoutObjectByElementId("row");
PaintLayer& htmlLayer =
*toLayoutBoxModelObject(document().documentElement()->layoutObject())
->layer();
rootPaintController().invalidateAll();
document().view()->updateAllLifecyclePhasesExceptPaint();
......@@ -133,14 +130,12 @@ TEST_F(TablePainterTest, BackgroundInSelfPaintingRow) {
paint(&interestRect);
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 7,
rootPaintController().getDisplayItemList(), 5,
TestDisplayItem(layoutView, DisplayItem::kDocumentBackground),
TestDisplayItem(htmlLayer, DisplayItem::kSubsequence),
TestDisplayItem(row, DisplayItem::kBeginCompositing),
TestDisplayItem(row, DisplayItem::kBoxDecorationBackground),
TestDisplayItem(cell1, DisplayItem::kBoxDecorationBackground),
TestDisplayItem(row, DisplayItem::kEndCompositing),
TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence));
TestDisplayItem(row, DisplayItem::kEndCompositing));
document().view()->updateAllLifecyclePhasesExceptPaint();
// Intersects the spacing only.
......@@ -148,10 +143,8 @@ TEST_F(TablePainterTest, BackgroundInSelfPaintingRow) {
paint(&interestRect);
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 3,
TestDisplayItem(layoutView, DisplayItem::kDocumentBackground),
TestDisplayItem(htmlLayer, DisplayItem::kSubsequence),
TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence));
rootPaintController().getDisplayItemList(), 1,
TestDisplayItem(layoutView, DisplayItem::kDocumentBackground));
document().view()->updateAllLifecyclePhasesExceptPaint();
// Intersects cell2 only.
......@@ -159,14 +152,12 @@ TEST_F(TablePainterTest, BackgroundInSelfPaintingRow) {
paint(&interestRect);
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 7,
rootPaintController().getDisplayItemList(), 5,
TestDisplayItem(layoutView, DisplayItem::kDocumentBackground),
TestDisplayItem(htmlLayer, DisplayItem::kSubsequence),
TestDisplayItem(row, DisplayItem::kBeginCompositing),
TestDisplayItem(row, DisplayItem::kBoxDecorationBackground),
TestDisplayItem(cell2, DisplayItem::kBoxDecorationBackground),
TestDisplayItem(row, DisplayItem::kEndCompositing),
TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence));
TestDisplayItem(row, DisplayItem::kEndCompositing));
}
TEST_F(TablePainterTest, CollapsedBorderAndOverflow) {
......
......@@ -1050,7 +1050,6 @@ component("platform") {
"graphics/paint/ScrollDisplayItem.h",
"graphics/paint/ScrollPaintPropertyNode.cpp",
"graphics/paint/ScrollPaintPropertyNode.h",
"graphics/paint/SubsequenceDisplayItem.h",
"graphics/paint/SubsequenceRecorder.cpp",
"graphics/paint/SubsequenceRecorder.h",
"graphics/paint/Transform3DDisplayItem.cpp",
......
......@@ -180,9 +180,7 @@ static void recordPairedEndDisplayItems(
static gfx::Rect largeRect(-200000, -200000, 400000, 400000);
static void appendDisplayItemToCcDisplayItemList(const DisplayItem& displayItem,
cc::DisplayItemList* list) {
DCHECK(DisplayItem::isDrawingType(displayItem.getType()) ||
displayItem.getType() == DisplayItem::kSubsequence ||
displayItem.getType() == DisplayItem::kEndSubsequence);
DCHECK(DisplayItem::isDrawingType(displayItem.getType()));
if (DisplayItem::isDrawingType(displayItem.getType())) {
sk_sp<const PaintRecord> record =
static_cast<const DrawingDisplayItem&>(displayItem).GetPaintRecord();
......
......@@ -217,8 +217,6 @@ WTF::String DisplayItem::typeAsDebugString(Type type) {
DEBUG_STRING_CASE(EndTransform);
DEBUG_STRING_CASE(BeginClipPath);
DEBUG_STRING_CASE(EndClipPath);
DEBUG_STRING_CASE(Subsequence);
DEBUG_STRING_CASE(EndSubsequence);
DEBUG_STRING_CASE(UninitializedType);
DEFAULT_CASE;
}
......
......@@ -182,10 +182,6 @@ class PLATFORM_EXPORT DisplayItem {
kEndTransform,
kBeginClipPath,
kEndClipPath,
kSubsequence,
kEndSubsequence,
kUninitializedType,
kTypeLast = kUninitializedType
};
......@@ -314,9 +310,7 @@ class PLATFORM_EXPORT DisplayItem {
DEFINE_PAIRED_CATEGORY_METHODS(Transform3D, transform3D)
static bool isCacheableType(Type type) {
return isDrawingType(type) || type == kSubsequence;
}
static bool isCacheableType(Type type) { return isDrawingType(type); }
bool isCacheable() const {
return !skippedCache() && isCacheableType(m_type);
}
......
......@@ -8,7 +8,6 @@
#include "platform/graphics/paint/DrawingDisplayItem.h"
#include "platform/graphics/paint/PaintFlags.h"
#include "platform/graphics/paint/PaintRecorder.h"
#include "platform/graphics/paint/SubsequenceDisplayItem.h"
#include "platform/graphics/skia/SkiaUtils.h"
#include "platform/testing/FakeDisplayItemClient.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -62,24 +61,14 @@ TEST_F(DisplayItemListTest, AppendVisualRect_BlockContainingDrawing) {
// represent the union of all drawing display item visual rects between the
// pair. We should consider revising Blink's display item list in some form
// so as to only store visual rects for drawing display items.
IntRect subsequenceBounds(5, 6, 7, 8);
m_list.allocateAndConstruct<BeginSubsequenceDisplayItem>(m_client);
m_list.appendVisualRect(subsequenceBounds);
IntRect drawingBounds(5, 6, 1, 1);
m_list.allocateAndConstruct<DrawingDisplayItem>(
m_client, DisplayItem::Type::kDocumentBackground,
createRectRecord(drawingBounds), true);
m_list.appendVisualRect(drawingBounds);
m_list.allocateAndConstruct<EndSubsequenceDisplayItem>(m_client);
m_list.appendVisualRect(subsequenceBounds);
EXPECT_EQ(static_cast<size_t>(3), m_list.size());
EXPECT_RECT_EQ(subsequenceBounds, m_list.visualRect(0));
EXPECT_RECT_EQ(drawingBounds, m_list.visualRect(1));
EXPECT_RECT_EQ(subsequenceBounds, m_list.visualRect(2));
EXPECT_EQ(static_cast<size_t>(1), m_list.size());
EXPECT_RECT_EQ(drawingBounds, m_list.visualRect(0));
}
} // namespace
} // namespace blink
......@@ -36,20 +36,13 @@ TEST(PaintChunkTest, IdNotMatches) {
PaintChunkProperties properties;
FakeDisplayItemClient client1;
client1.updateCacheGeneration();
DisplayItem::Id id1a(client1, DisplayItem::kDrawingFirst);
DisplayItem::Id id1b(client1, DisplayItem::kSubsequence);
EXPECT_FALSE(PaintChunk(0, 1, &id1a, properties)
.matches(PaintChunk(0, 1, &id1b, properties)));
EXPECT_FALSE(PaintChunk(0, 1, &id1b, properties)
.matches(PaintChunk(0, 1, &id1a, properties)));
DisplayItem::Id id1(client1, DisplayItem::kDrawingFirst);
FakeDisplayItemClient client2;
client2.updateCacheGeneration();
DisplayItem::Id id2(client2, DisplayItem::kDrawingFirst);
EXPECT_FALSE(PaintChunk(0, 1, &id1a, properties)
.matches(PaintChunk(0, 1, &id2, properties)));
EXPECT_FALSE(PaintChunk(0, 1, &id2, properties)
.matches(PaintChunk(0, 1, &id1a, properties)));
.matches(PaintChunk(0, 1, &id1, properties)));
}
TEST(PaintChunkTest, IdNotMatchesNull) {
......
......@@ -109,8 +109,11 @@ class PLATFORM_EXPORT PaintController {
// true. Otherwise returns false.
bool useCachedSubsequenceIfPossible(const DisplayItemClient&);
void addCachedSubsequence(const DisplayItemClient&,
unsigned start,
unsigned end);
// True if the last display item is a begin that doesn't draw content.
bool lastDisplayItemIsNoopBegin() const;
void removeLastDisplayItem();
const DisplayItem* lastDisplayItem(unsigned offset);
......@@ -194,6 +197,17 @@ class PLATFORM_EXPORT PaintController {
return m_paintChunksRasterInvalidationTrackingMap.get();
}
#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
void beginShouldKeepAlive(const DisplayItemClient&);
void beginSubsequence(const DisplayItemClient& client) {
m_currentSubsequenceClients.push_back(&client);
beginShouldKeepAlive(client);
}
void endSubsequence() { m_currentSubsequenceClients.pop_back(); }
#endif
protected:
PaintController()
: m_newDisplayItemList(0),
......@@ -204,14 +218,14 @@ class PLATFORM_EXPORT PaintController {
m_imagePainted(false),
m_skippingCacheCount(0),
m_numCachedNewItems(0),
m_currentCachedSubsequenceBeginIndexInNewList(kNotFound)
m_currentCachedSubsequenceBeginIndexInNewList(kNotFound),
#ifndef NDEBUG
,
m_numSequentialMatches(0),
m_numOutOfOrderMatches(0),
m_numIndexedItems(0)
m_numIndexedItems(0),
#endif
{
m_underInvalidationCheckingBegin(0),
m_underInvalidationCheckingEnd(0) {
resetCurrentListIndices();
setTracksRasterInvalidations(
RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled());
......@@ -221,6 +235,8 @@ class PLATFORM_EXPORT PaintController {
friend class PaintControllerTestBase;
friend class PaintControllerPaintTestBase;
bool lastDisplayItemIsNoopBegin() const;
void ensureNewDisplayItemListInitialCapacity() {
if (m_newDisplayItemList.isEmpty()) {
// TODO(wangxianzhu): Consider revisiting this heuristic.
......@@ -252,7 +268,7 @@ class PLATFORM_EXPORT PaintController {
size_t findCachedItem(const DisplayItem::Id&);
size_t findOutOfOrderCachedItemForward(const DisplayItem::Id&);
void copyCachedSubsequence(size_t&);
void copyCachedSubsequence(size_t beginIndex, size_t endIndex);
// Resets the indices (e.g. m_nextItemToMatch) of
// m_currentPaintArtifact.getDisplayItemList() to their initial values. This
......@@ -273,12 +289,30 @@ class PLATFORM_EXPORT PaintController {
void showUnderInvalidationError(const char* reason,
const DisplayItem& newItem,
const DisplayItem* oldItem) const;
void showSequenceUnderInvalidationError(const char* reason,
const DisplayItemClient&,
int start,
int end);
void checkUnderInvalidation();
bool isCheckingUnderInvalidation() const {
return m_underInvalidationCheckingEnd - m_underInvalidationCheckingBegin >
0;
}
struct SubsequenceMarkers {
SubsequenceMarkers() : start(0), end(0) {}
SubsequenceMarkers(size_t startArg, size_t endArg)
: start(startArg), end(endArg) {}
// The start and end index within m_currentPaintArtifact of this
// subsequence.
size_t start;
size_t end;
};
SubsequenceMarkers* getSubsequenceMarkers(const DisplayItemClient&);
// The last complete paint artifact.
// In SPv2, this includes paint chunks as well as display items.
PaintArtifact m_currentPaintArtifact;
......@@ -378,6 +412,14 @@ class PLATFORM_EXPORT PaintController {
// A stack recording subsequence clients that are currently painting.
Vector<const DisplayItemClient*> m_currentSubsequenceClients;
#endif
typedef HashMap<const DisplayItemClient*, SubsequenceMarkers>
CachedSubsequenceMap;
CachedSubsequenceMap m_currentCachedSubsequences;
CachedSubsequenceMap m_newCachedSubsequences;
FRIEND_TEST_ALL_PREFIXES(PaintControllerTest, CachedSubsequenceSwapOrder);
FRIEND_TEST_ALL_PREFIXES(PaintControllerTest, CachedNestedSubsequenceUpdate);
};
} // namespace blink
......
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SubsequenceDisplayItem_h
#define SubsequenceDisplayItem_h
#include "platform/geometry/FloatRect.h"
#include "platform/graphics/paint/DisplayItem.h"
#include "platform/wtf/Assertions.h"
namespace blink {
class BeginSubsequenceDisplayItem final : public PairedBeginDisplayItem {
public:
BeginSubsequenceDisplayItem(const DisplayItemClient& client)
: PairedBeginDisplayItem(client, kSubsequence, sizeof(*this)) {}
};
class EndSubsequenceDisplayItem final : public PairedEndDisplayItem {
public:
EndSubsequenceDisplayItem(const DisplayItemClient& client)
: PairedEndDisplayItem(client, kEndSubsequence, sizeof(*this)) {}
#if DCHECK_IS_ON()
bool isEndAndPairedWith(DisplayItem::Type otherType) const final {
return getType() == kEndSubsequence && otherType == kSubsequence;
}
#endif
};
} // namespace blink
#endif // SubsequenceDisplayItem_h
......@@ -7,7 +7,6 @@
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/paint/PaintController.h"
#include "platform/graphics/paint/SubsequenceDisplayItem.h"
namespace blink {
......@@ -20,26 +19,27 @@ SubsequenceRecorder::SubsequenceRecorder(GraphicsContext& context,
return;
m_beginSubsequenceIndex = m_paintController.newDisplayItemList().size();
m_paintController.createAndAppend<BeginSubsequenceDisplayItem>(m_client);
#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
m_paintController.beginSubsequence(m_client);
#endif
}
SubsequenceRecorder::~SubsequenceRecorder() {
#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
m_paintController.endSubsequence();
#endif
if (m_paintController.displayItemConstructionIsDisabled())
return;
if (m_paintController.lastDisplayItemIsNoopBegin()) {
ASSERT(m_beginSubsequenceIndex ==
m_paintController.newDisplayItemList().size() - 1);
// Remove uncacheable no-op BeginSubsequence/EndSubsequence pairs.
// Don't remove cacheable no-op pairs because we need to match them later
// with CachedSubsequences.
if (m_paintController.newDisplayItemList().last().skippedCache()) {
m_paintController.removeLastDisplayItem();
return;
}
}
m_paintController.createAndAppend<EndSubsequenceDisplayItem>(m_client);
// Skip empty subsequences.
if (m_paintController.newDisplayItemList().size() == m_beginSubsequenceIndex)
return;
m_paintController.addCachedSubsequence(
m_client, m_beginSubsequenceIndex,
m_paintController.newDisplayItemList().size() - 1);
}
} // namespace blink
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment