Chromium Code Reviews| 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..7f76a59227ebcc95cbd34b15ca24ed2d25101c3b 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 |
|
pdr.
2016/06/09 19:21:44
I worry that the checking part will be very slow o
Xianzhu
2016/06/09 20:47:44
If the flag is not enabled, we do pixel verificati
|
| + { |
| +#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 checkUnderPaintInvalidations(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; |