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