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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.h

Issue 2049263003: Check rect under-invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ImageQuality
Patch Set: x Created 4 years, 6 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/platform/graphics/GraphicsLayer.h
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h
index d1d72afdafb098a350aaa07a649e911fcd9d9568..d5345355ef7734d59a371a7860b6dfd4e765c0b9 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h
@@ -210,10 +210,19 @@ public:
// pointers for the layers and timing data will be included in the returned string.
String layerTreeAsText(LayerTreeFlags = LayerTreeNormal) const;
- bool isTrackingPaintInvalidations() const { return m_client->isTrackingPaintInvalidations(); }
+ void setTracksPaintInvalidations(bool);
+ bool isTrackingOrCheckingPaintInvalidations() const
+ {
+#if DCHECK_IS_ON()
+ if (RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled())
+ return true;
+#endif
+ return m_isTrackingPaintInvalidations;
+ }
+
void resetTrackedPaintInvalidations();
bool hasTrackedPaintInvalidations() const;
- void trackPaintInvalidation(const DisplayItemClient&, const FloatRect&, PaintInvalidationReason);
+ void trackPaintInvalidation(const DisplayItemClient&, const IntRect&, PaintInvalidationReason);
void addLinkHighlight(LinkHighlight*);
void removeLinkHighlight(LinkHighlight*);
@@ -292,6 +301,11 @@ private:
void clearContentsLayerIfUnregistered();
WebLayer* contentsLayerIfRegistered();
+#if DCHECK_IS_ON()
+ PassRefPtr<SkPicture> capturePicture();
+ void checkPaintUnderInvalidations(const SkPicture&);
+#endif
+
GraphicsLayerClient* m_client;
// Offset from the owning layoutObject
@@ -325,6 +339,8 @@ private:
bool m_textPainted : 1;
bool m_imagePainted : 1;
+ bool m_isTrackingPaintInvalidations : 1;
+
GraphicsLayerPaintingPhase m_paintingPhase;
Vector<GraphicsLayer*> m_children;

Powered by Google App Engine
This is Rietveld 408576698