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

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

Issue 206543005: Add GPURasterizationTrigger (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/CompositingTriggers.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/animation/ActiveAnimations.h" 10 #include "core/animation/ActiveAnimations.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 bool CompositingReasonFinder::requiresCompositingForOutOfFlowClipping(const Rend erLayer* layer) const 191 bool CompositingReasonFinder::requiresCompositingForOutOfFlowClipping(const Rend erLayer* layer) const
192 { 192 {
193 return m_renderView.compositorDrivenAcceleratedScrollingEnabled() && layer-> isUnclippedDescendant(); 193 return m_renderView.compositorDrivenAcceleratedScrollingEnabled() && layer-> isUnclippedDescendant();
194 } 194 }
195 195
196 bool CompositingReasonFinder::requiresCompositingForWillChange(const RenderObjec t* renderer) const 196 bool CompositingReasonFinder::requiresCompositingForWillChange(const RenderObjec t* renderer) const
197 { 197 {
198 if (renderer->style()->hasWillChangeCompositingHint()) 198 if (renderer->style()->hasWillChangeCompositingHint())
199 return true; 199 return true;
200 200
201 if (Settings* settings = m_renderView.document().settings()) { 201 if (!(m_compositingTriggers & GPURasterizationTrigger))
202 if (!settings->acceleratedCompositingForGpuRasterizationHintEnabled()) 202 return false;
203 return false;
204 }
205 203
206 return renderer->style()->hasWillChangeGpuRasterizationHint(); 204 return renderer->style()->hasWillChangeGpuRasterizationHint();
207 } 205 }
208 206
209 bool CompositingReasonFinder::isViewportConstrainedFixedOrStickyLayer(const Rend erLayer* layer) 207 bool CompositingReasonFinder::isViewportConstrainedFixedOrStickyLayer(const Rend erLayer* layer)
210 { 208 {
211 if (layer->renderer()->isStickyPositioned()) 209 if (layer->renderer()->isStickyPositioned())
212 return !layer->enclosingOverflowClipLayer(ExcludeSelf); 210 return !layer->enclosingOverflowClipLayer(ExcludeSelf);
213 211
214 if (layer->renderer()->style()->position() != FixedPosition) 212 if (layer->renderer()->style()->position() != FixedPosition)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 322
325 return true; 323 return true;
326 } 324 }
327 325
328 bool CompositingReasonFinder::requiresCompositingForOverflowScrolling(const Rend erLayer* layer) const 326 bool CompositingReasonFinder::requiresCompositingForOverflowScrolling(const Rend erLayer* layer) const
329 { 327 {
330 return layer->needsCompositedScrolling(); 328 return layer->needsCompositedScrolling();
331 } 329 }
332 330
333 } 331 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/compositing/CompositingTriggers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698