| 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 directReasons |= CompositingReasonVideoOverlay; | 221 directReasons |= CompositingReasonVideoOverlay; |
| 222 | 222 |
| 223 if (compositor->canBeComposited(layer)) | 223 if (compositor->canBeComposited(layer)) |
| 224 reasonsToComposite |= directReasons; | 224 reasonsToComposite |= directReasons; |
| 225 | 225 |
| 226 // Next, accumulate reasons related to overlap. | 226 // Next, accumulate reasons related to overlap. |
| 227 // If overlap testing is used, this reason will be overridden. If overlap te
sting is not | 227 // 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. | 228 // 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; | 229 CompositingReasons overlapCompositingReason = currentRecursionData.m_subtree
IsCompositing ? CompositingReasonAssumedOverlap : CompositingReasonNone; |
| 230 | 230 |
| 231 if (m_renderView.compositor()->acceleratedCompositingForOverflowScrollEnable
d()) { | 231 if (m_renderView.compositor()->preferCompositingToLCDTextEnabled()) { |
| 232 Vector<size_t> unclippedDescendantsToRemove; | 232 Vector<size_t> unclippedDescendantsToRemove; |
| 233 for (size_t i = 0; i < unclippedDescendants.size(); i++) { | 233 for (size_t i = 0; i < unclippedDescendants.size(); i++) { |
| 234 RenderLayer* unclippedDescendant = unclippedDescendants.at(i); | 234 RenderLayer* unclippedDescendant = unclippedDescendants.at(i); |
| 235 // If we've reached the containing block of one of the unclipped | 235 // If we've reached the containing block of one of the unclipped |
| 236 // descendants, that element is no longer relevant to whether or not
we | 236 // descendants, that element is no longer relevant to whether or not
we |
| 237 // should opt in. Unfortunately we can't easily remove from the list | 237 // should opt in. Unfortunately we can't easily remove from the list |
| 238 // while we're iterating, so we have to store it for later removal. | 238 // while we're iterating, so we have to store it for later removal. |
| 239 if (unclippedDescendant->renderer()->containingBlock() == layer->ren
derer()) { | 239 if (unclippedDescendant->renderer()->containingBlock() == layer->ren
derer()) { |
| 240 unclippedDescendantsToRemove.append(i); | 240 unclippedDescendantsToRemove.append(i); |
| 241 continue; | 241 continue; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 | 412 |
| 413 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); | 413 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); |
| 414 } | 414 } |
| 415 | 415 |
| 416 // At this point we have finished collecting all reasons to composite this l
ayer. | 416 // At this point we have finished collecting all reasons to composite this l
ayer. |
| 417 layer->setCompositingReasons(reasonsToComposite); | 417 layer->setCompositingReasons(reasonsToComposite); |
| 418 | 418 |
| 419 } | 419 } |
| 420 | 420 |
| 421 } // namespace blink | 421 } // namespace blink |
| OLD | NEW |