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 CompositingReasonFinder_h | 5 #ifndef CompositingReasonFinder_h |
6 #define CompositingReasonFinder_h | 6 #define CompositingReasonFinder_h |
7 | 7 |
8 #include "core/rendering/RenderLayer.h" | 8 #include "core/rendering/RenderLayer.h" |
9 #include "core/rendering/compositing/CompositingTriggers.h" | 9 #include "core/rendering/compositing/CompositingTriggers.h" |
10 #include "platform/graphics/CompositingReasons.h" | 10 #include "platform/graphics/CompositingReasons.h" |
11 | 11 |
12 namespace WebCore { | 12 namespace WebCore { |
13 | 13 |
14 class RenderObject; | 14 class RenderObject; |
15 class RenderView; | 15 class RenderView; |
16 | 16 |
17 class CompositingReasonFinder { | 17 class CompositingReasonFinder { |
18 WTF_MAKE_NONCOPYABLE(CompositingReasonFinder); | 18 WTF_MAKE_NONCOPYABLE(CompositingReasonFinder); |
19 public: | 19 public: |
20 explicit CompositingReasonFinder(RenderView&); | 20 explicit CompositingReasonFinder(RenderView&); |
21 | 21 |
22 CompositingReasons styleDeterminedReasons(RenderObject*) const; | 22 CompositingReasons styleDeterminedReasons(RenderObject*) const; |
23 CompositingReasons directReasons(const RenderLayer*) const; | 23 CompositingReasons directReasons(const RenderLayer*) const; |
24 | 24 |
25 void updateTriggers(); | 25 void updateTriggers(); |
26 | 26 |
27 bool hasOverflowScrollTrigger() const; | 27 bool hasOverflowScrollTrigger() const; |
28 | 28 |
29 bool requiresCompositingForScrollableFrame() const; | 29 bool requiresCompositingForScrollableFrame() const; |
30 bool requiresCompositingForPosition(RenderObject*, const RenderLayer*, Rende
rLayer::ViewportConstrainedNotCompositedReason*) const; | 30 bool requiresCompositingForPositionFixed(RenderObject*, const RenderLayer*,
RenderLayer::ViewportConstrainedNotCompositedReason*) const; |
31 | 31 |
32 private: | 32 private: |
33 bool isMainFrame() const; | 33 bool isMainFrame() const; |
34 | 34 |
35 CompositingReasons nonStyleDeterminedDirectReasons(const RenderLayer*) const
; | 35 CompositingReasons nonStyleDeterminedDirectReasons(const RenderLayer*) const
; |
36 | 36 |
37 bool requiresCompositingForTransform(RenderObject*) const; | 37 bool requiresCompositingForTransform(RenderObject*) const; |
38 bool requiresCompositingForFilters(RenderObject*) const; | 38 bool requiresCompositingForFilters(RenderObject*) const; |
39 bool requiresCompositingForAnimation(RenderStyle*) const; | 39 bool requiresCompositingForAnimation(RenderStyle*) const; |
40 bool requiresCompositingForPositionSticky(RenderObject*, const RenderLayer*)
const; | |
41 bool requiresCompositingForPositionFixed(RenderObject*, const RenderLayer*,
RenderLayer::ViewportConstrainedNotCompositedReason*) const; | |
42 | 40 |
43 RenderView& m_renderView; | 41 RenderView& m_renderView; |
44 CompositingTriggerFlags m_compositingTriggers; | 42 CompositingTriggerFlags m_compositingTriggers; |
45 }; | 43 }; |
46 | 44 |
47 } // namespace WebCore | 45 } // namespace WebCore |
48 | 46 |
49 #endif // CompositingReasonFinder_h | 47 #endif // CompositingReasonFinder_h |
OLD | NEW |