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

Side by Side Diff: Source/core/rendering/compositing/CompositingReasonFinder.cpp

Issue 316513002: Various cleanups to compositing code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/rendering/compositing/RenderLayerCompositor.h » ('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 #include "config.h" 5 #include "config.h"
6 #include "core/rendering/compositing/CompositingReasonFinder.h" 6 #include "core/rendering/compositing/CompositingReasonFinder.h"
7 7
8 #include "CSSPropertyNames.h" 8 #include "CSSPropertyNames.h"
9 #include "HTMLNames.h" 9 #include "HTMLNames.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 bool CompositingReasonFinder::requiresCompositingForScrollableFrame() const 85 bool CompositingReasonFinder::requiresCompositingForScrollableFrame() const
86 { 86 {
87 // Need this done first to determine overflow. 87 // Need this done first to determine overflow.
88 ASSERT(!m_renderView.needsLayout()); 88 ASSERT(!m_renderView.needsLayout());
89 if (isMainFrame()) 89 if (isMainFrame())
90 return false; 90 return false;
91 91
92 if (!(m_compositingTriggers & ScrollableInnerFrameTrigger)) 92 if (!(m_compositingTriggers & ScrollableInnerFrameTrigger))
93 return false; 93 return false;
94 94
95 FrameView* frameView = m_renderView.frameView(); 95 return m_renderView.frameView()->isScrollable();
96 return frameView->isScrollable();
97 } 96 }
98 97
99 CompositingReasons CompositingReasonFinder::styleDeterminedReasons(RenderObject* renderer) const 98 CompositingReasons CompositingReasonFinder::styleDeterminedReasons(RenderObject* renderer) const
100 { 99 {
101 CompositingReasons directReasons = CompositingReasonNone; 100 CompositingReasons directReasons = CompositingReasonNone;
102 101
103 RenderStyle* style = renderer->style(); 102 RenderStyle* style = renderer->style();
104 103
105 if (requiresCompositingForTransform(renderer)) 104 if (requiresCompositingForTransform(renderer))
106 directReasons |= CompositingReason3DTransform; 105 directReasons |= CompositingReason3DTransform;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 if (viewportConstrainedNotCompositedReason) 256 if (viewportConstrainedNotCompositedReason)
258 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompos itedForBoundsOutOfView; 257 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompos itedForBoundsOutOfView;
259 return false; 258 return false;
260 } 259 }
261 } 260 }
262 261
263 return true; 262 return true;
264 } 263 }
265 264
266 } 265 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/compositing/RenderLayerCompositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698