| 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/compositing/CompositingTriggers.h" | 8 #include "core/layout/compositing/CompositingTriggers.h" |
| 9 #include "platform/graphics/CompositingReasons.h" | 9 #include "platform/graphics/CompositingReasons.h" |
| 10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class DeprecatedPaintLayer; | 14 class DeprecatedPaintLayer; |
| 15 class LayoutObject; | 15 class LayoutObject; |
| 16 class LayoutStyle; | 16 class ComputedStyle; |
| 17 class LayoutView; | 17 class LayoutView; |
| 18 | 18 |
| 19 class CompositingReasonFinder { | 19 class CompositingReasonFinder { |
| 20 WTF_MAKE_NONCOPYABLE(CompositingReasonFinder); | 20 WTF_MAKE_NONCOPYABLE(CompositingReasonFinder); |
| 21 public: | 21 public: |
| 22 explicit CompositingReasonFinder(LayoutView&); | 22 explicit CompositingReasonFinder(LayoutView&); |
| 23 | 23 |
| 24 CompositingReasons potentialCompositingReasonsFromStyle(LayoutObject*) const
; | 24 CompositingReasons potentialCompositingReasonsFromStyle(LayoutObject*) const
; |
| 25 CompositingReasons directReasons(const DeprecatedPaintLayer*) const; | 25 CompositingReasons directReasons(const DeprecatedPaintLayer*) const; |
| 26 | 26 |
| 27 void updateTriggers(); | 27 void updateTriggers(); |
| 28 | 28 |
| 29 bool hasOverflowScrollTrigger() const; | 29 bool hasOverflowScrollTrigger() const; |
| 30 bool requiresCompositingForScrollableFrame() const; | 30 bool requiresCompositingForScrollableFrame() const; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 bool isMainFrame() const; | 33 bool isMainFrame() const; |
| 34 | 34 |
| 35 CompositingReasons nonStyleDeterminedDirectReasons(const DeprecatedPaintLaye
r*) const; | 35 CompositingReasons nonStyleDeterminedDirectReasons(const DeprecatedPaintLaye
r*) const; |
| 36 | 36 |
| 37 bool requiresCompositingForTransform(LayoutObject*) const; | 37 bool requiresCompositingForTransform(LayoutObject*) const; |
| 38 bool requiresCompositingForAnimation(const LayoutStyle&) const; | 38 bool requiresCompositingForAnimation(const ComputedStyle&) const; |
| 39 bool requiresCompositingForPositionFixed(const DeprecatedPaintLayer*) const; | 39 bool requiresCompositingForPositionFixed(const DeprecatedPaintLayer*) const; |
| 40 bool requiresCompositingForScrollBlocksOn(const LayoutObject*) const; | 40 bool requiresCompositingForScrollBlocksOn(const LayoutObject*) const; |
| 41 | 41 |
| 42 LayoutView& m_layoutView; | 42 LayoutView& m_layoutView; |
| 43 CompositingTriggerFlags m_compositingTriggers; | 43 CompositingTriggerFlags m_compositingTriggers; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace blink | 46 } // namespace blink |
| 47 | 47 |
| 48 #endif // CompositingReasonFinder_h | 48 #endif // CompositingReasonFinder_h |
| OLD | NEW |