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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 return !!layer->scrollParent(); | 256 return !!layer->scrollParent(); |
257 } | 257 } |
258 | 258 |
259 bool CompositingReasonFinder::requiresCompositingForOutOfFlowClipping(const Rend
erLayer* layer) const | 259 bool CompositingReasonFinder::requiresCompositingForOutOfFlowClipping(const Rend
erLayer* layer) const |
260 { | 260 { |
261 return m_renderView.compositorDrivenAcceleratedScrollingEnabled() && layer->
isUnclippedDescendant(); | 261 return m_renderView.compositorDrivenAcceleratedScrollingEnabled() && layer->
isUnclippedDescendant(); |
262 } | 262 } |
263 | 263 |
264 bool CompositingReasonFinder::requiresCompositingForWillChange(const RenderObjec
t* renderer) const | 264 bool CompositingReasonFinder::requiresCompositingForWillChange(const RenderObjec
t* renderer) const |
265 { | 265 { |
266 return renderer->style()->hasWillChangeCompositingHint(); | 266 if (renderer->style()->hasWillChangeCompositingHint()) |
| 267 return true; |
| 268 |
| 269 if (Settings* settings = m_renderView.document().settings()) { |
| 270 if (!settings->acceleratedCompositingForGpuRasterizationHintEnabled()) |
| 271 return false; |
| 272 } |
| 273 |
| 274 return renderer->style()->hasWillChangeGpuRasterizationHint(); |
267 } | 275 } |
268 | 276 |
269 bool CompositingReasonFinder::isViewportConstrainedFixedOrStickyLayer(const Rend
erLayer* layer) | 277 bool CompositingReasonFinder::isViewportConstrainedFixedOrStickyLayer(const Rend
erLayer* layer) |
270 { | 278 { |
271 if (layer->renderer()->isStickyPositioned()) | 279 if (layer->renderer()->isStickyPositioned()) |
272 return !layer->enclosingOverflowClipLayer(ExcludeSelf); | 280 return !layer->enclosingOverflowClipLayer(ExcludeSelf); |
273 | 281 |
274 if (layer->renderer()->style()->position() != FixedPosition) | 282 if (layer->renderer()->style()->position() != FixedPosition) |
275 return false; | 283 return false; |
276 | 284 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 392 |
385 return true; | 393 return true; |
386 } | 394 } |
387 | 395 |
388 bool CompositingReasonFinder::requiresCompositingForOverflowScrolling(const Rend
erLayer* layer) const | 396 bool CompositingReasonFinder::requiresCompositingForOverflowScrolling(const Rend
erLayer* layer) const |
389 { | 397 { |
390 return layer->needsCompositedScrolling(); | 398 return layer->needsCompositedScrolling(); |
391 } | 399 } |
392 | 400 |
393 } | 401 } |
OLD | NEW |