Chromium Code Reviews| Index: Source/WebCore/rendering/RenderView.h |
| diff --git a/Source/WebCore/rendering/RenderView.h b/Source/WebCore/rendering/RenderView.h |
| index 33d8e3c4ca249b06004e92c0a54b31dbd826e126..b69cb47fd50a89c4ebe0a317af6a421a25578976 100644 |
| --- a/Source/WebCore/rendering/RenderView.h |
| +++ b/Source/WebCore/rendering/RenderView.h |
| @@ -39,8 +39,28 @@ class RenderWidget; |
| class CustomFilterGlobalContext; |
| #endif |
| +enum CompositedScrollingUpdateMode { |
| + UpdateNeedsCompositedScrolling, |
| + UpdateDescendantsAreContiguousInStackingOrder |
| +}; |
| + |
| +// This object allows postponing calls to RenderLayer::updateNeedsCompositedScrolling |
| +// while any instance is in scope. When the last instance is destructed, all |
| +// updates are processed. This allows us to postpone updates during layer list |
| +// updates. (If we didn't postpone the updates, they would cause errors since |
| +// they require clean lists). |
| +struct ScopedCompositedScrollingUpdater { |
|
jamesr
2013/04/09 21:10:00
in particular this class seems very hacky
|
| + ScopedCompositedScrollingUpdater(RenderView*); |
| + ScopedCompositedScrollingUpdater(RenderLayer*, CompositedScrollingUpdateMode); |
| + ~ScopedCompositedScrollingUpdater(); |
| +private: |
| + RenderView* m_renderView; |
| +}; |
| + |
| class RenderView : public RenderBlock { |
| public: |
| + friend struct ScopedCompositedScrollingUpdater; |
| + |
| explicit RenderView(Document*); |
| virtual ~RenderView(); |
| @@ -214,7 +234,9 @@ public: |
| void addRenderCounter() { m_renderCounterCount++; } |
| void removeRenderCounter() { ASSERT(m_renderCounterCount > 0); m_renderCounterCount--; } |
| bool hasRenderCounters() { return m_renderCounterCount; } |
| - |
| + |
| + void cancelScheduledCompositedScrollingUpdatesForLayer(RenderLayer*); |
| + |
| virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) OVERRIDE; |
| protected: |
| @@ -316,6 +338,11 @@ private: |
| LayoutState* m_layoutState; |
| unsigned m_layoutStateDisableCount; |
| OwnPtr<RenderLayerCompositor> m_compositor; |
| + |
| + unsigned m_scopedCompositedScrollingUpdatersCount; |
| + HashSet<RenderLayer*> m_pendingCompositedScrollingUpdates; |
| + HashSet<RenderLayer*> m_pendingContiguityUpdates; |
| + |
| #if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS) |
| OwnPtr<CustomFilterGlobalContext> m_customFilterGlobalContext; |
| #endif |