| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Google Inc. All rights reserved. | 3 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 CompositingReasons directReasons = m_compositingReasonFinder.directReasons(l
ayer); | 220 CompositingReasons directReasons = m_compositingReasonFinder.directReasons(l
ayer); |
| 221 | 221 |
| 222 // Video is special. It's the only PaintLayer type that can both have | 222 // Video is special. It's the only PaintLayer type that can both have |
| 223 // PaintLayer children and whose children can't use its backing to render | 223 // PaintLayer children and whose children can't use its backing to render |
| 224 // into. These children (the controls) always need to be promoted into their | 224 // into. These children (the controls) always need to be promoted into their |
| 225 // own layers to draw on top of the accelerated video. | 225 // own layers to draw on top of the accelerated video. |
| 226 if (currentRecursionData.m_compositingAncestor && currentRecursionData.m_com
positingAncestor->layoutObject()->isVideo()) | 226 if (currentRecursionData.m_compositingAncestor && currentRecursionData.m_com
positingAncestor->layoutObject()->isVideo()) |
| 227 directReasons |= CompositingReasonVideoOverlay; | 227 directReasons |= CompositingReasonVideoOverlay; |
| 228 | 228 |
| 229 if (currentRecursionData.m_hasCompositedScrollingAncestor && layer->layoutOb
ject()->styleRef().hasViewportConstrainedPosition()) | 229 if (currentRecursionData.m_hasCompositedScrollingAncestor && layer->layoutOb
ject()->styleRef().hasViewportConstrainedPosition()) |
| 230 directReasons |= CompositingReasonPositionFixed; | 230 directReasons |= CompositingReasonScrollDependentPosition; |
| 231 | 231 |
| 232 bool canBeComposited = compositor->canBeComposited(layer); | 232 bool canBeComposited = compositor->canBeComposited(layer); |
| 233 if (canBeComposited) { | 233 if (canBeComposited) { |
| 234 reasonsToComposite |= directReasons; | 234 reasonsToComposite |= directReasons; |
| 235 | 235 |
| 236 if (layer->isRootLayer() && compositor->rootShouldAlwaysComposite()) | 236 if (layer->isRootLayer() && compositor->rootShouldAlwaysComposite()) |
| 237 reasonsToComposite |= CompositingReasonRoot; | 237 reasonsToComposite |= CompositingReasonRoot; |
| 238 | 238 |
| 239 if (reasonsToComposite && layer->scrollsOverflow() && !layer->needsCompo
sitedScrolling()) { | 239 if (reasonsToComposite && layer->scrollsOverflow() && !layer->needsCompo
sitedScrolling()) { |
| 240 // We will only set needsCompositedScrolling if we don't care about | 240 // We will only set needsCompositedScrolling if we don't care about |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 overlapMap.finishCurrentOverlapTestingContext(); | 448 overlapMap.finishCurrentOverlapTestingContext(); |
| 449 | 449 |
| 450 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); | 450 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); |
| 451 } | 451 } |
| 452 | 452 |
| 453 // At this point we have finished collecting all reasons to composite this l
ayer. | 453 // At this point we have finished collecting all reasons to composite this l
ayer. |
| 454 layer->setCompositingReasons(reasonsToComposite); | 454 layer->setCompositingReasons(reasonsToComposite); |
| 455 } | 455 } |
| 456 | 456 |
| 457 } // namespace blink | 457 } // namespace blink |
| OLD | NEW |