Commit 253ef880 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[rm-for-spv175] Cleanup DisplayItem and PaintController about paired display items

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I3524d99338e48de260f1ff7acf7fa2cda537ed10
Reviewed-on: https://chromium-review.googlesource.com/1112313
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569897}
parent 807c7cf8
...@@ -115,7 +115,7 @@ struct CORE_EXPORT PaintInfo { ...@@ -115,7 +115,7 @@ struct CORE_EXPORT PaintInfo {
} }
DisplayItem::Type DisplayItemTypeForClipping() const { DisplayItem::Type DisplayItemTypeForClipping() const {
return DisplayItem::PaintPhaseToClipBoxType(phase); return DisplayItem::PaintPhaseToClipType(phase);
} }
const LayoutBoxModelObject* PaintContainer() const { const LayoutBoxModelObject* PaintContainer() const {
......
...@@ -985,7 +985,7 @@ void PaintLayerPainter::PaintOverflowControlsForFragments( ...@@ -985,7 +985,7 @@ void PaintLayerPainter::PaintOverflowControlsForFragments(
fragment_paint_chunk_properties.emplace( fragment_paint_chunk_properties.emplace(
context.GetPaintController(), context.GetPaintController(),
fragment.fragment_data->LocalBorderBoxProperties(), paint_layer_, fragment.fragment_data->LocalBorderBoxProperties(), paint_layer_,
DisplayItem::kScrollOverflowControls); DisplayItem::kOverflowControls);
} }
// We need to apply the same clips and transforms that // We need to apply the same clips and transforms that
......
...@@ -183,9 +183,9 @@ void ScrollableAreaPainter::PaintOverflowControls( ...@@ -183,9 +183,9 @@ void ScrollableAreaPainter::PaintOverflowControls(
DCHECK(properties); DCHECK(properties);
if (properties) { if (properties) {
if (const auto* clip = properties->OverflowControlsClip()) { if (const auto* clip = properties->OverflowControlsClip()) {
scoped_paint_chunk_properties.emplace( scoped_paint_chunk_properties.emplace(context.GetPaintController(), clip,
context.GetPaintController(), clip, box, box,
DisplayItem::kClipLayerOverflowControls); DisplayItem::kOverflowControls);
} }
} }
......
...@@ -373,8 +373,7 @@ bool GraphicsLayer::Paint(const IntRect* interest_rect, ...@@ -373,8 +373,7 @@ bool GraphicsLayer::Paint(const IntRect* interest_rect,
if (auto record = tracking.UnderInvalidationRecord()) { if (auto record = tracking.UnderInvalidationRecord()) {
// Add the under-invalidation overlay onto the painted result. // Add the under-invalidation overlay onto the painted result.
GetPaintController().AppendDebugDrawingAfterCommit( GetPaintController().AppendDebugDrawingAfterCommit(
*this, std::move(record), *this, std::move(record), layer_state_->state);
layer_state_ ? &layer_state_->state : nullptr);
// Ensure the compositor will raster the under-invalidation overlay. // Ensure the compositor will raster the under-invalidation overlay.
layer_->SetNeedsDisplay(); layer_->SetNeedsDisplay();
} }
......
...@@ -81,6 +81,7 @@ static WTF::String SpecialDrawingTypeAsDebugString(DisplayItem::Type type) { ...@@ -81,6 +81,7 @@ static WTF::String SpecialDrawingTypeAsDebugString(DisplayItem::Type type) {
DEBUG_STRING_CASE(SVGImage); DEBUG_STRING_CASE(SVGImage);
DEBUG_STRING_CASE(LinkHighlight); DEBUG_STRING_CASE(LinkHighlight);
DEBUG_STRING_CASE(ImageAreaFocusRing); DEBUG_STRING_CASE(ImageAreaFocusRing);
DEBUG_STRING_CASE(OverflowControls);
DEBUG_STRING_CASE(PageOverlay); DEBUG_STRING_CASE(PageOverlay);
DEBUG_STRING_CASE(PopupContainerBorder); DEBUG_STRING_CASE(PopupContainerBorder);
DEBUG_STRING_CASE(PopupListBoxBackground); DEBUG_STRING_CASE(PopupListBoxBackground);
...@@ -131,50 +132,6 @@ static String ForeignLayerTypeAsDebugString(DisplayItem::Type type) { ...@@ -131,50 +132,6 @@ static String ForeignLayerTypeAsDebugString(DisplayItem::Type type) {
} }
} }
static String ScrollHitTestTypeAsDebugString(DisplayItem::Type type) {
switch (type) {
DEBUG_STRING_CASE(ScrollHitTest);
DEFAULT_CASE;
}
}
static WTF::String ClipTypeAsDebugString(DisplayItem::Type type) {
PAINT_PHASE_BASED_DEBUG_STRINGS(ClipBox);
PAINT_PHASE_BASED_DEBUG_STRINGS(ClipColumnBounds);
PAINT_PHASE_BASED_DEBUG_STRINGS(ClipLayerFragment);
switch (type) {
DEBUG_STRING_CASE(ClipFileUploadControlRect);
DEBUG_STRING_CASE(ClipFrameToVisibleContentRect);
DEBUG_STRING_CASE(ClipFrameScrollbars);
DEBUG_STRING_CASE(ClipLayerBackground);
DEBUG_STRING_CASE(ClipLayerColumnBounds);
DEBUG_STRING_CASE(ClipLayerFilter);
DEBUG_STRING_CASE(ClipLayerForeground);
DEBUG_STRING_CASE(ClipLayerParent);
DEBUG_STRING_CASE(ClipLayerOverflowControls);
DEBUG_STRING_CASE(ClipPopupListBoxFrame);
DEBUG_STRING_CASE(ClipScrollbarsToBoxBounds);
DEBUG_STRING_CASE(ClipSelectionImage);
DEFAULT_CASE;
}
}
static String ScrollTypeAsDebugString(DisplayItem::Type type) {
PAINT_PHASE_BASED_DEBUG_STRINGS(Scroll);
switch (type) {
DEBUG_STRING_CASE(ScrollOverflowControls);
DEFAULT_CASE;
}
}
static String Transform3DTypeAsDebugString(DisplayItem::Type type) {
switch (type) {
DEBUG_STRING_CASE(Transform3DElementTransform);
DEFAULT_CASE;
}
}
WTF::String DisplayItem::TypeAsDebugString(Type type) { WTF::String DisplayItem::TypeAsDebugString(Type type) {
if (IsDrawingType(type)) if (IsDrawingType(type))
return DrawingTypeAsDebugString(type); return DrawingTypeAsDebugString(type);
...@@ -182,43 +139,13 @@ WTF::String DisplayItem::TypeAsDebugString(Type type) { ...@@ -182,43 +139,13 @@ WTF::String DisplayItem::TypeAsDebugString(Type type) {
if (IsForeignLayerType(type)) if (IsForeignLayerType(type))
return ForeignLayerTypeAsDebugString(type); return ForeignLayerTypeAsDebugString(type);
if (IsClipType(type)) PAINT_PHASE_BASED_DEBUG_STRINGS(Clip);
return ClipTypeAsDebugString(type); PAINT_PHASE_BASED_DEBUG_STRINGS(Scroll);
if (IsEndClipType(type))
return "End" + ClipTypeAsDebugString(endClipTypeToClipType(type));
PAINT_PHASE_BASED_DEBUG_STRINGS(FloatClip);
if (type == kFloatClipClipPathBounds)
return "FloatClipClipPathBounds";
if (IsEndFloatClipType(type))
return "End" + TypeAsDebugString(endFloatClipTypeToFloatClipType(type));
if (IsScrollType(type))
return ScrollTypeAsDebugString(type);
if (IsEndScrollType(type))
return "End" + ScrollTypeAsDebugString(endScrollTypeToScrollType(type));
PAINT_PHASE_BASED_DEBUG_STRINGS(SVGTransform); PAINT_PHASE_BASED_DEBUG_STRINGS(SVGTransform);
PAINT_PHASE_BASED_DEBUG_STRINGS(SVGEffect); PAINT_PHASE_BASED_DEBUG_STRINGS(SVGEffect);
if (IsTransform3DType(type))
return Transform3DTypeAsDebugString(type);
if (IsEndTransform3DType(type))
return "End" + Transform3DTypeAsDebugString(
endTransform3DTypeToTransform3DType(type));
if (IsScrollHitTestType(type))
return ScrollHitTestTypeAsDebugString(type);
switch (type) { switch (type) {
DEBUG_STRING_CASE(BeginFilter); DEBUG_STRING_CASE(ScrollHitTest);
DEBUG_STRING_CASE(EndFilter);
DEBUG_STRING_CASE(BeginCompositing);
DEBUG_STRING_CASE(EndCompositing);
DEBUG_STRING_CASE(BeginTransform);
DEBUG_STRING_CASE(EndTransform);
DEBUG_STRING_CASE(BeginClipPath);
DEBUG_STRING_CASE(EndClipPath);
DEBUG_STRING_CASE(LayerChunkBackground); DEBUG_STRING_CASE(LayerChunkBackground);
DEBUG_STRING_CASE(LayerChunkNegativeZOrderChildren); DEBUG_STRING_CASE(LayerChunkNegativeZOrderChildren);
DEBUG_STRING_CASE(LayerChunkDescendantBackgrounds); DEBUG_STRING_CASE(LayerChunkDescendantBackgrounds);
......
...@@ -84,6 +84,7 @@ class PLATFORM_EXPORT DisplayItem { ...@@ -84,6 +84,7 @@ class PLATFORM_EXPORT DisplayItem {
kSVGImage, kSVGImage,
kLinkHighlight, kLinkHighlight,
kImageAreaFocusRing, kImageAreaFocusRing,
kOverflowControls,
kPageOverlay, kPageOverlay,
kPopupContainerBorder, kPopupContainerBorder,
kPopupListBoxBackground, kPopupListBoxBackground,
...@@ -127,47 +128,11 @@ class PLATFORM_EXPORT DisplayItem { ...@@ -127,47 +128,11 @@ class PLATFORM_EXPORT DisplayItem {
kForeignLayerContentsWrapper, kForeignLayerContentsWrapper,
kForeignLayerLast = kForeignLayerContentsWrapper, kForeignLayerLast = kForeignLayerContentsWrapper,
kClipFirst, kClipPaintPhaseFirst,
kClipBoxPaintPhaseFirst = kClipFirst, kClipPaintPhaseLast = kClipPaintPhaseFirst + kPaintPhaseMax,
kClipBoxPaintPhaseLast = kClipBoxPaintPhaseFirst + kPaintPhaseMax,
kClipColumnBoundsPaintPhaseFirst, kScrollPaintPhaseFirst,
kClipColumnBoundsPaintPhaseLast =
kClipColumnBoundsPaintPhaseFirst + kPaintPhaseMax,
kClipLayerFragmentPaintPhaseFirst,
kClipLayerFragmentPaintPhaseLast =
kClipLayerFragmentPaintPhaseFirst + kPaintPhaseMax,
kClipFileUploadControlRect,
kClipFrameToVisibleContentRect,
kClipFrameScrollbars,
kClipLayerBackground,
kClipLayerColumnBounds,
kClipLayerFilter,
kClipLayerForeground,
kClipLayerParent,
kClipLayerOverflowControls,
kClipPopupListBoxFrame,
kClipScrollbarsToBoxBounds,
kClipSelectionImage,
kClipLast = kClipSelectionImage,
kEndClipFirst,
kEndClipLast = kEndClipFirst + kClipLast - kClipFirst,
kFloatClipFirst,
kFloatClipPaintPhaseFirst = kFloatClipFirst,
kFloatClipPaintPhaseLast = kFloatClipFirst + kPaintPhaseMax,
kFloatClipClipPathBounds,
kFloatClipLast = kFloatClipClipPathBounds,
kEndFloatClipFirst,
kEndFloatClipLast = kEndFloatClipFirst + kFloatClipLast - kFloatClipFirst,
kScrollFirst,
kScrollPaintPhaseFirst = kScrollFirst,
kScrollPaintPhaseLast = kScrollPaintPhaseFirst + kPaintPhaseMax, kScrollPaintPhaseLast = kScrollPaintPhaseFirst + kPaintPhaseMax,
kScrollOverflowControls,
kScrollLast = kScrollOverflowControls,
kEndScrollFirst,
kEndScrollLast = kEndScrollFirst + kScrollLast - kScrollFirst,
kSVGTransformPaintPhaseFirst, kSVGTransformPaintPhaseFirst,
kSVGTransformPaintPhaseLast = kSVGTransformPaintPhaseFirst + kPaintPhaseMax, kSVGTransformPaintPhaseLast = kSVGTransformPaintPhaseFirst + kPaintPhaseMax,
...@@ -175,21 +140,6 @@ class PLATFORM_EXPORT DisplayItem { ...@@ -175,21 +140,6 @@ class PLATFORM_EXPORT DisplayItem {
kSVGEffectPaintPhaseFirst, kSVGEffectPaintPhaseFirst,
kSVGEffectPaintPhaseLast = kSVGEffectPaintPhaseFirst + kPaintPhaseMax, kSVGEffectPaintPhaseLast = kSVGEffectPaintPhaseFirst + kPaintPhaseMax,
kTransform3DFirst,
kTransform3DElementTransform = kTransform3DFirst,
kTransform3DLast = kTransform3DElementTransform,
kEndTransform3DFirst,
kEndTransform3DLast =
kEndTransform3DFirst + kTransform3DLast - kTransform3DFirst,
kBeginFilter,
kEndFilter,
kBeginCompositing,
kEndCompositing,
kBeginTransform,
kEndTransform,
kBeginClipPath,
kEndClipPath,
kScrollHitTest, kScrollHitTest,
kLayerChunkBackground, kLayerChunkBackground,
...@@ -308,11 +258,6 @@ class PLATFORM_EXPORT DisplayItem { ...@@ -308,11 +258,6 @@ class PLATFORM_EXPORT DisplayItem {
k##Category1##First); \ k##Category1##First); \
} }
#define DEFINE_PAIRED_CATEGORY_METHODS(Category, category) \
DEFINE_CATEGORY_METHODS(Category) \
DEFINE_CATEGORY_METHODS(End##Category) \
DEFINE_CONVERSION_METHODS(Category, category, End##Category, end##Category)
#define DEFINE_PAINT_PHASE_CONVERSION_METHOD(Category) \ #define DEFINE_PAINT_PHASE_CONVERSION_METHOD(Category) \
static Type PaintPhaseTo##Category##Type(PaintPhase paint_phase) { \ static Type PaintPhaseTo##Category##Type(PaintPhase paint_phase) { \
static_assert( \ static_assert( \
...@@ -329,22 +274,11 @@ class PLATFORM_EXPORT DisplayItem { ...@@ -329,22 +274,11 @@ class PLATFORM_EXPORT DisplayItem {
DEFINE_CATEGORY_METHODS(ForeignLayer) DEFINE_CATEGORY_METHODS(ForeignLayer)
DEFINE_PAIRED_CATEGORY_METHODS(Clip, clip) DEFINE_PAINT_PHASE_CONVERSION_METHOD(Clip)
DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipLayerFragment)
DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipBox)
DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipColumnBounds)
DEFINE_PAIRED_CATEGORY_METHODS(FloatClip, floatClip)
DEFINE_PAINT_PHASE_CONVERSION_METHOD(FloatClip)
DEFINE_PAIRED_CATEGORY_METHODS(Scroll, scroll)
DEFINE_PAINT_PHASE_CONVERSION_METHOD(Scroll) DEFINE_PAINT_PHASE_CONVERSION_METHOD(Scroll)
DEFINE_PAINT_PHASE_CONVERSION_METHOD(SVGTransform) DEFINE_PAINT_PHASE_CONVERSION_METHOD(SVGTransform)
DEFINE_PAINT_PHASE_CONVERSION_METHOD(SVGEffect) DEFINE_PAINT_PHASE_CONVERSION_METHOD(SVGEffect)
DEFINE_PAIRED_CATEGORY_METHODS(Transform3D, transform3D)
static bool IsScrollHitTestType(Type type) { return type == kScrollHitTest; } static bool IsScrollHitTestType(Type type) { return type == kScrollHitTest; }
bool IsScrollHitTest() const { return IsScrollHitTestType(GetType()); } bool IsScrollHitTest() const { return IsScrollHitTestType(GetType()); }
...@@ -354,15 +288,6 @@ class PLATFORM_EXPORT DisplayItem { ...@@ -354,15 +288,6 @@ class PLATFORM_EXPORT DisplayItem {
return !SkippedCache() && IsCacheableType(GetType()); return !SkippedCache() && IsCacheableType(GetType());
} }
virtual bool IsBegin() const { return false; }
virtual bool IsEnd() const { return false; }
#if DCHECK_IS_ON()
virtual bool IsEndAndPairedWith(DisplayItem::Type other_type) const {
return false;
}
#endif
virtual bool Equals(const DisplayItem& other) const { virtual bool Equals(const DisplayItem& other) const {
// Failure of this DCHECK would cause bad casts in subclasses. // Failure of this DCHECK would cause bad casts in subclasses.
SECURITY_CHECK(!is_tombstone_); SECURITY_CHECK(!is_tombstone_);
...@@ -418,36 +343,6 @@ inline bool operator!=(const DisplayItem::Id& a, const DisplayItem::Id& b) { ...@@ -418,36 +343,6 @@ inline bool operator!=(const DisplayItem::Id& a, const DisplayItem::Id& b) {
return !(a == b); return !(a == b);
} }
class PLATFORM_EXPORT PairedBeginDisplayItem : public DisplayItem {
protected:
PairedBeginDisplayItem(const DisplayItemClient& client,
Type type,
size_t derived_size)
: DisplayItem(client, type, derived_size) {
DCHECK(!RuntimeEnabledFeatures::SlimmingPaintV175Enabled());
}
private:
bool IsBegin() const final { return true; }
};
class PLATFORM_EXPORT PairedEndDisplayItem : public DisplayItem {
protected:
PairedEndDisplayItem(const DisplayItemClient& client,
Type type,
size_t derived_size)
: DisplayItem(client, type, derived_size) {
DCHECK(!RuntimeEnabledFeatures::SlimmingPaintV175Enabled());
}
#if DCHECK_IS_ON()
bool IsEndAndPairedWith(DisplayItem::Type other_type) const override = 0;
#endif
private:
bool IsEnd() const final { return true; }
};
} // namespace blink } // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_PAINT_DISPLAY_ITEM_H_ #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_PAINT_DISPLAY_ITEM_H_
...@@ -56,19 +56,6 @@ class PLATFORM_EXPORT DisplayItemList ...@@ -56,19 +56,6 @@ class PLATFORM_EXPORT DisplayItemList
return result; return result;
} }
// This is used by PaintUnderInvalidationChecking in SPv1 to restore a
// paired-begin display item that was moved to the new display item list then
// was removed because the pair is a no-op. This ensures that we won't compare
// the next new display item against the tombstone display item.
void RestoreTombstone(size_t index, DisplayItem& item) {
DCHECK(!RuntimeEnabledFeatures::SlimmingPaintV175Enabled());
DCHECK((*this)[index].IsTombstone());
SECURITY_CHECK((*this)[index].DerivedSize() == item.DerivedSize());
memcpy(static_cast<void*>(&(*this)[index]), static_cast<void*>(&item),
item.DerivedSize());
new (&item) DisplayItem;
}
// Useful for iterating with a range-based for loop. // Useful for iterating with a range-based for loop.
template <typename Iterator> template <typename Iterator>
class Range { class Range {
......
...@@ -123,23 +123,6 @@ class PLATFORM_EXPORT PaintController { ...@@ -123,23 +123,6 @@ class PLATFORM_EXPORT PaintController {
ProcessNewItem(display_item); ProcessNewItem(display_item);
} }
// Creates and appends an ending display item to pair with a preceding
// beginning item iff the display item actually draws content. For no-op
// items, rather than creating an ending item, the begin item will
// instead be removed, thereby maintaining brevity of the list. If display
// item construction is disabled, no list mutations will be performed.
template <typename DisplayItemClass, typename... Args>
void EndItem(Args&&... args) {
DCHECK(!RuntimeEnabledFeatures::SlimmingPaintV175Enabled());
if (DisplayItemConstructionIsDisabled())
return;
if (LastDisplayItemIsNoopBegin())
RemoveLastDisplayItem();
else
CreateAndAppend<DisplayItemClass>(std::forward<Args>(args)...);
}
// Tries to find the cached drawing display item corresponding to the given // Tries to find the cached drawing display item corresponding to the given
// parameters. If found, appends the cached display item to the new display // parameters. If found, appends the cached display item to the new display
// list and returns true. Otherwise returns false. // list and returns true. Otherwise returns false.
...@@ -155,8 +138,6 @@ class PLATFORM_EXPORT PaintController { ...@@ -155,8 +138,6 @@ class PLATFORM_EXPORT PaintController {
// BeginSubsequence(). // BeginSubsequence().
void EndSubsequence(const DisplayItemClient&, size_t start); void EndSubsequence(const DisplayItemClient&, size_t start);
// True if the last display item is a begin that doesn't draw content.
void RemoveLastDisplayItem();
const DisplayItem* LastDisplayItem(unsigned offset); const DisplayItem* LastDisplayItem(unsigned offset);
void BeginSkippingCache() { ++skipping_cache_count_; } void BeginSkippingCache() { ++skipping_cache_count_; }
...@@ -212,7 +193,7 @@ class PLATFORM_EXPORT PaintController { ...@@ -212,7 +193,7 @@ class PLATFORM_EXPORT PaintController {
void AppendDebugDrawingAfterCommit(const DisplayItemClient&, void AppendDebugDrawingAfterCommit(const DisplayItemClient&,
sk_sp<const PaintRecord>, sk_sp<const PaintRecord>,
const PropertyTreeState*); const PropertyTreeState&);
#if DCHECK_IS_ON() #if DCHECK_IS_ON()
void ShowDebugData() const; void ShowDebugData() const;
...@@ -277,8 +258,6 @@ class PLATFORM_EXPORT PaintController { ...@@ -277,8 +258,6 @@ class PLATFORM_EXPORT PaintController {
void InvalidateAllForTesting() { InvalidateAllInternal(); } void InvalidateAllForTesting() { InvalidateAllInternal(); }
void InvalidateAllInternal(); void InvalidateAllInternal();
bool LastDisplayItemIsNoopBegin() const;
void EnsureNewDisplayItemListInitialCapacity() { void EnsureNewDisplayItemListInitialCapacity() {
if (new_display_item_list_.IsEmpty()) { if (new_display_item_list_.IsEmpty()) {
// TODO(wangxianzhu): Consider revisiting this heuristic. // TODO(wangxianzhu): Consider revisiting this heuristic.
...@@ -458,10 +437,6 @@ class PLATFORM_EXPORT PaintController { ...@@ -458,10 +437,6 @@ class PLATFORM_EXPORT PaintController {
size_t under_invalidation_checking_begin_; size_t under_invalidation_checking_begin_;
size_t under_invalidation_checking_end_; size_t under_invalidation_checking_end_;
// Number of probable under-invalidations that have been skipped temporarily
// because the mismatching display items may be removed in the future because
// of no-op pairs or compositing folding.
int skipped_probable_under_invalidation_count_;
String under_invalidation_message_prefix_; String under_invalidation_message_prefix_;
struct RasterInvalidationTrackingInfo { struct RasterInvalidationTrackingInfo {
......
...@@ -807,8 +807,8 @@ TEST_P(PaintControllerTest, CachedSubsequenceSwapOrder) { ...@@ -807,8 +807,8 @@ TEST_P(PaintControllerTest, CachedSubsequenceSwapOrder) {
container2_properties.SetEffect(container2_effect.get()); container2_properties.SetEffect(container2_effect.get());
{ {
GetPaintController().UpdateCurrentPaintChunkProperties( GetPaintController().UpdateCurrentPaintChunkProperties(
PaintChunk::Id(container1, kBackgroundType), container1_properties); PaintChunk::Id(container1, kBackgroundType), container1_properties);
SubsequenceRecorder r(context, container1); SubsequenceRecorder r(context, container1);
DrawRect(context, container1, kBackgroundType, DrawRect(context, container1, kBackgroundType,
...@@ -819,8 +819,8 @@ TEST_P(PaintControllerTest, CachedSubsequenceSwapOrder) { ...@@ -819,8 +819,8 @@ TEST_P(PaintControllerTest, CachedSubsequenceSwapOrder) {
FloatRect(100, 100, 100, 100)); FloatRect(100, 100, 100, 100));
} }
{ {
GetPaintController().UpdateCurrentPaintChunkProperties( GetPaintController().UpdateCurrentPaintChunkProperties(
PaintChunk::Id(container2, kBackgroundType), container2_properties); PaintChunk::Id(container2, kBackgroundType), container2_properties);
SubsequenceRecorder r(context, container2); SubsequenceRecorder r(context, container2);
DrawRect(context, container2, kBackgroundType, DrawRect(context, container2, kBackgroundType,
...@@ -872,9 +872,9 @@ TEST_P(PaintControllerTest, CachedSubsequenceSwapOrder) { ...@@ -872,9 +872,9 @@ TEST_P(PaintControllerTest, CachedSubsequenceSwapOrder) {
EXPECT_FALSE(SubsequenceRecorder::UseCachedSubsequenceIfPossible( EXPECT_FALSE(SubsequenceRecorder::UseCachedSubsequenceIfPossible(
context, container2)); context, container2));
{ {
PaintChunk::Id id(container2, kBackgroundType); PaintChunk::Id id(container2, kBackgroundType);
GetPaintController().UpdateCurrentPaintChunkProperties( GetPaintController().UpdateCurrentPaintChunkProperties(
id, container2_properties); id, container2_properties);
SubsequenceRecorder r(context, container2); SubsequenceRecorder r(context, container2);
DrawRect(context, container2, kBackgroundType, DrawRect(context, container2, kBackgroundType,
...@@ -889,9 +889,9 @@ TEST_P(PaintControllerTest, CachedSubsequenceSwapOrder) { ...@@ -889,9 +889,9 @@ TEST_P(PaintControllerTest, CachedSubsequenceSwapOrder) {
EXPECT_FALSE(SubsequenceRecorder::UseCachedSubsequenceIfPossible( EXPECT_FALSE(SubsequenceRecorder::UseCachedSubsequenceIfPossible(
context, container1)); context, container1));
{ {
PaintChunk::Id id(container1, kBackgroundType); PaintChunk::Id id(container1, kBackgroundType);
GetPaintController().UpdateCurrentPaintChunkProperties( GetPaintController().UpdateCurrentPaintChunkProperties(
id, container1_properties); id, container1_properties);
SubsequenceRecorder r(context, container1); SubsequenceRecorder r(context, container1);
DrawRect(context, container1, kBackgroundType, DrawRect(context, container1, kBackgroundType,
......
...@@ -130,7 +130,7 @@ const DisplayItem::Type kForegroundType = ...@@ -130,7 +130,7 @@ const DisplayItem::Type kForegroundType =
const DisplayItem::Type kDocumentBackgroundType = const DisplayItem::Type kDocumentBackgroundType =
DisplayItem::kDocumentBackground; DisplayItem::kDocumentBackground;
const DisplayItem::Type kScrollHitTestType = DisplayItem::kScrollHitTest; const DisplayItem::Type kScrollHitTestType = DisplayItem::kScrollHitTest;
const DisplayItem::Type kClipType = DisplayItem::kClipFirst; const DisplayItem::Type kClipType = DisplayItem::kClipPaintPhaseFirst;
} // namespace blink } // 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