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

Unified Diff: Source/core/layout/PaintInvalidationState.h

Issue 1026823002: [S.P.] Don't draw frames of animated images that are offscreen (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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
« no previous file with comments | « Source/core/layout/LayoutView.cpp ('k') | Source/core/layout/PaintInvalidationState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/PaintInvalidationState.h
diff --git a/Source/core/layout/PaintInvalidationState.h b/Source/core/layout/PaintInvalidationState.h
index 307aacf0b7b2a5887fe94abbc4b7b25e9771758f..f42aa45f5345c60a4cdcc10fd9d49ae327e4bfc0 100644
--- a/Source/core/layout/PaintInvalidationState.h
+++ b/Source/core/layout/PaintInvalidationState.h
@@ -19,10 +19,10 @@ class LayoutView;
class PaintInvalidationState {
WTF_MAKE_NONCOPYABLE(PaintInvalidationState);
public:
- PaintInvalidationState(const PaintInvalidationState& next, LayoutBoxModelObject& renderer, const LayoutBoxModelObject& paintInvalidationContainer);
- PaintInvalidationState(const PaintInvalidationState& next, const LayoutSVGModelObject& renderer);
+ PaintInvalidationState(PaintInvalidationState& next, LayoutBoxModelObject& renderer, const LayoutBoxModelObject& paintInvalidationContainer);
+ PaintInvalidationState(PaintInvalidationState& next, const LayoutSVGModelObject& renderer);
- explicit PaintInvalidationState(const LayoutView&);
+ explicit PaintInvalidationState(const LayoutView&, Vector<LayoutObject*>& pendingDelayedPaintInvalidations);
const LayoutRect& clipRect() const { return m_clipRect; }
const LayoutSize& paintOffset() const { return m_paintOffset; }
@@ -40,6 +40,11 @@ public:
{
return m_cachedOffsetsEnabled && container == &m_paintInvalidationContainer;
}
+
+ // Records |obj| as needing paint invalidation on the next frame. See the definition of PaintInvalidationDelayedFull for more details.
+ void pushDelayedPaintInvalidationTarget(LayoutObject& obj) { m_pendingDelayedPaintInvalidations.append(&obj); }
+ Vector<LayoutObject*>& pendingDelayedPaintInvalidationTargets() { return m_pendingDelayedPaintInvalidations; }
+
private:
void applyClipIfNeeded(const LayoutObject&);
void addClipRectRelativeToPaintOffset(const LayoutSize& clipSize);
@@ -61,6 +66,8 @@ private:
// SVG root to the userspace _before_ the relevant element. Combining this
// with |m_paintOffset| yields the "final" offset.
OwnPtr<AffineTransform> m_svgTransform;
+
+ Vector<LayoutObject*>& m_pendingDelayedPaintInvalidations;
};
} // namespace blink
« no previous file with comments | « Source/core/layout/LayoutView.cpp ('k') | Source/core/layout/PaintInvalidationState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698