| 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 #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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |