| 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/layout/Layer.h" | 8 #include "core/layout/Layer.h" |
| 9 #include "core/layout/compositing/CompositingTriggers.h" | 9 #include "core/layout/compositing/CompositingTriggers.h" |
| 10 #include "platform/graphics/CompositingReasons.h" | 10 #include "platform/graphics/CompositingReasons.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class RenderObject; | 14 class LayoutObject; |
| 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 potentialCompositingReasonsFromStyle(RenderObject*) const
; | 22 CompositingReasons potentialCompositingReasonsFromStyle(LayoutObject*) const
; |
| 23 CompositingReasons directReasons(const Layer*) const; | 23 CompositingReasons directReasons(const Layer*) const; |
| 24 | 24 |
| 25 void updateTriggers(); | 25 void updateTriggers(); |
| 26 | 26 |
| 27 bool hasOverflowScrollTrigger() const; | 27 bool hasOverflowScrollTrigger() const; |
| 28 bool requiresCompositingForScrollableFrame() const; | 28 bool requiresCompositingForScrollableFrame() const; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 bool isMainFrame() const; | 31 bool isMainFrame() const; |
| 32 | 32 |
| 33 CompositingReasons nonStyleDeterminedDirectReasons(const Layer*) const; | 33 CompositingReasons nonStyleDeterminedDirectReasons(const Layer*) const; |
| 34 | 34 |
| 35 bool requiresCompositingForTransform(RenderObject*) const; | 35 bool requiresCompositingForTransform(LayoutObject*) const; |
| 36 bool requiresCompositingForAnimation(RenderStyle*) const; | 36 bool requiresCompositingForAnimation(RenderStyle*) const; |
| 37 bool requiresCompositingForPositionFixed(const Layer*) const; | 37 bool requiresCompositingForPositionFixed(const Layer*) const; |
| 38 bool requiresCompositingForScrollBlocksOn(const RenderObject*) const; | 38 bool requiresCompositingForScrollBlocksOn(const LayoutObject*) const; |
| 39 | 39 |
| 40 RenderView& m_renderView; | 40 RenderView& m_renderView; |
| 41 CompositingTriggerFlags m_compositingTriggers; | 41 CompositingTriggerFlags m_compositingTriggers; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace blink | 44 } // namespace blink |
| 45 | 45 |
| 46 #endif // CompositingReasonFinder_h | 46 #endif // CompositingReasonFinder_h |
| OLD | NEW |