| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 CompositingReasons reasonsToComposite = CompositingReasonNone; | 216 CompositingReasons reasonsToComposite = CompositingReasonNone; |
| 217 CompositingReasons directReasons = m_compositingReasonFinder.directReasons(l
ayer); | 217 CompositingReasons directReasons = m_compositingReasonFinder.directReasons(l
ayer); |
| 218 | 218 |
| 219 // Video is special. It's the only DeprecatedPaintLayer type that can both h
ave | 219 // Video is special. It's the only DeprecatedPaintLayer type that can both h
ave |
| 220 // DeprecatedPaintLayer children and whose children can't use its backing to
render | 220 // DeprecatedPaintLayer children and whose children can't use its backing to
render |
| 221 // into. These children (the controls) always need to be promoted into their | 221 // into. These children (the controls) always need to be promoted into their |
| 222 // own layers to draw on top of the accelerated video. | 222 // own layers to draw on top of the accelerated video. |
| 223 if (currentRecursionData.m_compositingAncestor && currentRecursionData.m_com
positingAncestor->layoutObject()->isVideo()) | 223 if (currentRecursionData.m_compositingAncestor && currentRecursionData.m_com
positingAncestor->layoutObject()->isVideo()) |
| 224 directReasons |= CompositingReasonVideoOverlay; | 224 directReasons |= CompositingReasonVideoOverlay; |
| 225 | 225 |
| 226 if (currentRecursionData.m_hasCompositedScrollingAncestor && layer->layoutOb
ject()->styleRef().hasViewportConstrainedPosition()) |
| 227 directReasons |= CompositingReasonPositionFixed; |
| 228 |
| 226 if (compositor->canBeComposited(layer)) { | 229 if (compositor->canBeComposited(layer)) { |
| 227 reasonsToComposite |= directReasons; | 230 reasonsToComposite |= directReasons; |
| 228 | 231 |
| 229 if (layer->isRootLayer() && compositor->rootShouldAlwaysComposite()) | 232 if (layer->isRootLayer() && compositor->rootShouldAlwaysComposite()) |
| 230 reasonsToComposite |= CompositingReasonRoot; | 233 reasonsToComposite |= CompositingReasonRoot; |
| 231 | 234 |
| 232 if (reasonsToComposite && layer->scrollsOverflow() && !layer->needsCompo
sitedScrolling()) { | 235 if (reasonsToComposite && layer->scrollsOverflow() && !layer->needsCompo
sitedScrolling()) { |
| 233 // We will only set needsCompositedScrolling if we don't care about | 236 // We will only set needsCompositedScrolling if we don't care about |
| 234 // the LCD text hit, we may be able to switch to the compositor | 237 // the LCD text hit, we may be able to switch to the compositor |
| 235 // driven path if we're alread composited for other reasons and are | 238 // driven path if we're alread composited for other reasons and are |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 442 |
| 440 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); | 443 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); |
| 441 } | 444 } |
| 442 | 445 |
| 443 // At this point we have finished collecting all reasons to composite this l
ayer. | 446 // At this point we have finished collecting all reasons to composite this l
ayer. |
| 444 layer->setCompositingReasons(reasonsToComposite); | 447 layer->setCompositingReasons(reasonsToComposite); |
| 445 | 448 |
| 446 } | 449 } |
| 447 | 450 |
| 448 } // namespace blink | 451 } // namespace blink |
| OLD | NEW |