| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 void CompositingRequirementsUpdater::updateRecursive(RenderLayer* ancestorLayer,
RenderLayer* layer, OverlapMap& overlapMap, RecursionData& currentRecursionData
, bool& descendantHas3DTransform, Vector<RenderLayer*>& unclippedDescendants, In
tRect& absoluteDecendantBoundingBox) | 207 void CompositingRequirementsUpdater::updateRecursive(RenderLayer* ancestorLayer,
RenderLayer* layer, OverlapMap& overlapMap, RecursionData& currentRecursionData
, bool& descendantHas3DTransform, Vector<RenderLayer*>& unclippedDescendants, In
tRect& absoluteDecendantBoundingBox) |
| 208 { | 208 { |
| 209 RenderLayerCompositor* compositor = m_renderView.compositor(); | 209 RenderLayerCompositor* compositor = m_renderView.compositor(); |
| 210 | 210 |
| 211 layer->stackingNode()->updateLayerListsIfNeeded(); | 211 layer->stackingNode()->updateLayerListsIfNeeded(); |
| 212 | 212 |
| 213 CompositingReasons reasonsToComposite = CompositingReasonNone; | 213 CompositingReasons reasonsToComposite = CompositingReasonNone; |
| 214 CompositingReasons directReasons = m_compositingReasonFinder.directReasons(l
ayer); | 214 CompositingReasons directReasons = m_compositingReasonFinder.directReasons(l
ayer); |
| 215 | 215 |
| 216 // Video is special. It's the only RenderLayer type that can both have | |
| 217 // RenderLayer children and whose children can't use its backing to render | |
| 218 // into. These children (the controls) always need to be promoted into their | |
| 219 // own layers to draw on top of the accelerated video. | |
| 220 if (currentRecursionData.m_compositingAncestor && currentRecursionData.m_com
positingAncestor->renderer()->isVideo()) | |
| 221 directReasons |= CompositingReasonVideoOverlay; | |
| 222 | |
| 223 if (compositor->canBeComposited(layer)) | 216 if (compositor->canBeComposited(layer)) |
| 224 reasonsToComposite |= directReasons; | 217 reasonsToComposite |= directReasons; |
| 225 | 218 |
| 226 // Next, accumulate reasons related to overlap. | 219 // Next, accumulate reasons related to overlap. |
| 227 // If overlap testing is used, this reason will be overridden. If overlap te
sting is not | 220 // If overlap testing is used, this reason will be overridden. If overlap te
sting is not |
| 228 // used, we must assume we overlap if there is anything composited behind us
in paint-order. | 221 // used, we must assume we overlap if there is anything composited behind us
in paint-order. |
| 229 CompositingReasons overlapCompositingReason = currentRecursionData.m_subtree
IsCompositing ? CompositingReasonAssumedOverlap : CompositingReasonNone; | 222 CompositingReasons overlapCompositingReason = currentRecursionData.m_subtree
IsCompositing ? CompositingReasonAssumedOverlap : CompositingReasonNone; |
| 230 | 223 |
| 231 if (m_renderView.compositor()->preferCompositingToLCDTextEnabled()) { | 224 if (m_renderView.compositor()->preferCompositingToLCDTextEnabled()) { |
| 232 Vector<size_t> unclippedDescendantsToRemove; | 225 Vector<size_t> unclippedDescendantsToRemove; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 | 397 |
| 405 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); | 398 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); |
| 406 } | 399 } |
| 407 | 400 |
| 408 // At this point we have finished collecting all reasons to composite this l
ayer. | 401 // At this point we have finished collecting all reasons to composite this l
ayer. |
| 409 layer->setCompositingReasons(reasonsToComposite); | 402 layer->setCompositingReasons(reasonsToComposite); |
| 410 | 403 |
| 411 } | 404 } |
| 412 | 405 |
| 413 } // namespace blink | 406 } // namespace blink |
| OLD | NEW |