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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h

Issue 1428643004: Repaint on interest rect change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@EnableSyncPaint
Patch Set: Created 5 years, 2 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/compositing/CompositedLayerMapping.h
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
index 9d7507a30ce37e5812d80c2e131e60ff78652943..14ef046a486b1c98984a82ff5fceb968f9e43003 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
@@ -154,8 +154,7 @@ public:
void notifyFirstTextPaint() override;
void notifyFirstImagePaint() override;
- void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& clip) const override;
- void paintContentsIfNeeded(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase) const override;
+ void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect* clip) const override;
bool isTrackingPaintInvalidations() const override;
#if ENABLE(ASSERT)
@@ -214,6 +213,7 @@ public:
private:
static IntRect computeInterestRect(const GraphicsLayer*, LayoutObject* owningLayoutObject);
+ static bool interestRectChangedEnoughToRepaint(const IntRect& previousInterestRect, const IntRect& newInterestRect, const IntSize& layerSize);
static const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObject*, const Vector<GraphicsLayerPaintInfo>& layers, unsigned maxSquashedLayerIndex);
@@ -316,6 +316,8 @@ private:
// not appear earlier in the set of layers for this object.
bool invalidateLayerIfNoPrecedingEntry(size_t);
+ void paintContentsInternal(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& interestRect) const;
+
PaintLayer& m_owningLayer;
// The hierarchy of layers that is maintained by the CompositedLayerMapping looks like this:
@@ -439,6 +441,8 @@ private:
unsigned m_backgroundLayerPaintsFixedRootBackground : 1;
unsigned m_scrollingContentsAreEmpty : 1;
+ mutable IntRect m_previousPaintInterestRect;
+
friend class CompositedLayerMappingTest;
};

Powered by Google App Engine
This is Rietveld 408576698