Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.h

Issue 2593833002: Constrain transform animation direct compositing reason to transforms. (Closed)
Patch Set: Shift tests. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/CoreExport.h"
8 #include "core/layout/compositing/CompositingTriggers.h" 9 #include "core/layout/compositing/CompositingTriggers.h"
9 #include "platform/graphics/CompositingReasons.h" 10 #include "platform/graphics/CompositingReasons.h"
10 #include "wtf/Allocator.h" 11 #include "wtf/Allocator.h"
11 #include "wtf/Noncopyable.h" 12 #include "wtf/Noncopyable.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
15 class PaintLayer; 16 class PaintLayer;
16 class LayoutObject; 17 class LayoutObject;
17 class ComputedStyle; 18 class ComputedStyle;
18 class LayoutView; 19 class LayoutView;
19 20
20 class CompositingReasonFinder { 21 class CORE_EXPORT CompositingReasonFinder {
21 DISALLOW_NEW(); 22 DISALLOW_NEW();
22 WTF_MAKE_NONCOPYABLE(CompositingReasonFinder); 23 WTF_MAKE_NONCOPYABLE(CompositingReasonFinder);
23 24
24 public: 25 public:
25 explicit CompositingReasonFinder(LayoutView&); 26 explicit CompositingReasonFinder(LayoutView&);
26 27
27 CompositingReasons potentialCompositingReasonsFromStyle(LayoutObject*) const; 28 CompositingReasons potentialCompositingReasonsFromStyle(LayoutObject*) const;
28 CompositingReasons directReasons(const PaintLayer*) const; 29 CompositingReasons directReasons(const PaintLayer*) const;
29 30
30 void updateTriggers(); 31 void updateTriggers();
31 32
32 bool hasOverflowScrollTrigger() const; 33 bool hasOverflowScrollTrigger() const;
33 bool requiresCompositingForScrollableFrame() const; 34 bool requiresCompositingForScrollableFrame() const;
34 static bool requiresCompositingForAnimation(const ComputedStyle&); 35 static bool requiresCompositingForAnimation(const ComputedStyle&);
36 static bool requiresCompositingForTransformAnimation(const ComputedStyle&);
35 static bool requiresCompositingForTransform(const LayoutObject&); 37 static bool requiresCompositingForTransform(const LayoutObject&);
36 38
37 private: 39 private:
38 bool isMainFrame() const; 40 bool isMainFrame() const;
39 41
40 CompositingReasons nonStyleDeterminedDirectReasons(const PaintLayer*) const; 42 CompositingReasons nonStyleDeterminedDirectReasons(const PaintLayer*) const;
41 bool requiresCompositingForScrollDependentPosition(const PaintLayer*) const; 43 bool requiresCompositingForScrollDependentPosition(const PaintLayer*) const;
42 44
43 LayoutView& m_layoutView; 45 LayoutView& m_layoutView;
44 CompositingTriggerFlags m_compositingTriggers; 46 CompositingTriggerFlags m_compositingTriggers;
45 }; 47 };
46 48
47 } // namespace blink 49 } // namespace blink
48 50
49 #endif // CompositingReasonFinder_h 51 #endif // CompositingReasonFinder_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698