1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CompositingInputsUpdater_h 6 #define CompositingInputsUpdater_h 7 8 #include "core/rendering/RenderGeometryMap.h" 9 10 namespace WebCore { 11 12 class RenderLayer; 13 14 class CompositingInputsUpdater { 15 private: 16 struct AncestorInfo { 17 AncestorInfo() 18 : enclosingCompositedLayer(0) 19 , ancestorScrollingLayer(0) 20 { 21 } 22 23 RenderLayer* enclosingCompositedLayer; 24 RenderLayer* ancestorScrollingLayer; 25 }; 26 27 public: 28 explicit CompositingInputsUpdater(RenderLayer* rootRenderLayer); 29 ~CompositingInputsUpdater(); 30 31 enum UpdateType { 32 DoNotForceUpdate, 33 ForceUpdate, 34 }; 35 36 void update(RenderLayer*, UpdateType = DoNotForceUpdate, AncestorInfo = AncestorInfo()); 37 38 #if ASSERT_ENABLED 39 static void assertNeedsCompositingInputsUpdateBitsCleared(RenderLayer*); 40 #endif 41 42 private: 43 RenderGeometryMap m_geometryMap; 44 RenderLayer* m_rootRenderLayer; 45 }; 46 47 } // namespace WebCore 48 49 #endif // CompositingInputsUpdater_h 50