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

Unified Diff: Source/core/layout/LayoutView.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/LayoutObject.cpp ('k') | Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutView.h
diff --git a/Source/core/layout/LayoutView.h b/Source/core/layout/LayoutView.h
index 1af5fd647c7e678b8ef5256dbdb22976aac43741..7fc19351267eb0c8aa66b0bf2ddda4bdf999b7c9 100644
--- a/Source/core/layout/LayoutView.h
+++ b/Source/core/layout/LayoutView.h
@@ -171,6 +171,12 @@ public:
void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState->next(); }
virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override final;
+ // 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); }
+
+ // Invalidates paint for all objects that were added via pushDelayedPaintInvalidationTarget, and clears the pending vector.
+ void invalidatePaintForDelayedTargets();
+
private:
virtual void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const override;
virtual const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ancestorToStopAt, LayoutGeometryMap&) const override;
@@ -208,6 +214,8 @@ private:
unsigned m_hitTestCount;
OwnPtrWillBePersistent<PendingSelection> m_pendingSelection;
+
+ Vector<LayoutObject*> m_pendingDelayedPaintInvalidations;
esprehn 2015/03/26 21:09:26 This is a use-after-free since you don't remove ob
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView());
« no previous file with comments | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698