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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2872423002: Tweak PaintInvalidationReasons (Closed)
Patch Set: Rebaseline-cl Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 5ac9de0dd96cd20cdc1b9a0df7524ce1bf754341..f6df1e5dfb1d23cb6f0e4499844afddb8f7f4516 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1727,20 +1727,22 @@ void LayoutBox::PaintMask(const PaintInfo& paint_info,
}
void LayoutBox::ImageChanged(WrappedImagePtr image, const IntRect*) {
- // TODO(chrishtr): support kPaintInvalidationDelayedFull for animated border
- // images.
+ // TODO(chrishtr): support PaintInvalidationReason::kDelayedFull for animated
+ // border images.
if ((StyleRef().BorderImage().GetImage() &&
StyleRef().BorderImage().GetImage()->Data() == image) ||
(StyleRef().MaskBoxImage().GetImage() &&
StyleRef().MaskBoxImage().GetImage()->Data() == image) ||
(StyleRef().BoxReflect() && StyleRef().BoxReflect()->Mask().GetImage() &&
StyleRef().BoxReflect()->Mask().GetImage()->Data() == image)) {
- SetShouldDoFullPaintInvalidationWithoutGeometryChange();
+ SetShouldDoFullPaintInvalidationWithoutGeometryChange(
+ PaintInvalidationReason::kImage);
} else {
for (const FillLayer* layer = &StyleRef().MaskLayers(); layer;
layer = layer->Next()) {
if (layer->GetImage() && image == layer->GetImage()->Data()) {
- SetShouldDoFullPaintInvalidationWithoutGeometryChange();
+ SetShouldDoFullPaintInvalidationWithoutGeometryChange(
+ PaintInvalidationReason::kImage);
break;
}
}
@@ -1758,7 +1760,8 @@ void LayoutBox::ImageChanged(WrappedImagePtr image, const IntRect*) {
if (maybe_animated) {
SetMayNeedPaintInvalidationAnimatedBackgroundImage();
} else {
- SetShouldDoFullPaintInvalidationWithoutGeometryChange();
+ SetShouldDoFullPaintInvalidationWithoutGeometryChange(
+ PaintInvalidationReason::kImage);
SetBackgroundChangedSinceLastPaintInvalidation();
}
break;
@@ -1841,19 +1844,20 @@ void LayoutBox::EnsureIsReadyForPaintInvalidation() {
if (MayNeedPaintInvalidationAnimatedBackgroundImage() &&
!BackgroundIsKnownToBeObscured()) {
SetShouldDoFullPaintInvalidationWithoutGeometryChange(
- kPaintInvalidationDelayedFull);
+ PaintInvalidationReason::kDelayedFull);
}
- if (FullPaintInvalidationReason() != kPaintInvalidationDelayedFull ||
+ if (FullPaintInvalidationReason() != PaintInvalidationReason::kDelayedFull ||
!IntersectsVisibleViewport())
return;
// Do regular full paint invalidation if the object with
- // kPaintInvalidationDelayedFull is onscreen.
+ // PaintInvalidationReason::kDelayedFull is onscreen.
// Conservatively assume the delayed paint invalidation was caused by
// background image change.
SetBackgroundChangedSinceLastPaintInvalidation();
- SetShouldDoFullPaintInvalidationWithoutGeometryChange(kPaintInvalidationFull);
+ SetShouldDoFullPaintInvalidationWithoutGeometryChange(
+ PaintInvalidationReason::kFull);
}
PaintInvalidationReason LayoutBox::DeprecatedInvalidatePaint(

Powered by Google App Engine
This is Rietveld 408576698