| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // via compositing so that they also apply to those composited descdendants. | 155 // via compositing so that they also apply to those composited descdendants. |
| 156 if (hasCompositedDescendants) { | 156 if (hasCompositedDescendants) { |
| 157 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos
itingReasonComboCompositedDescendants; | 157 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos
itingReasonComboCompositedDescendants; |
| 158 | 158 |
| 159 if (layer->shouldIsolateCompositedDescendants()) { | 159 if (layer->shouldIsolateCompositedDescendants()) { |
| 160 ASSERT(layer->stackingNode()->isStackingContext()); | 160 ASSERT(layer->stackingNode()->isStackingContext()); |
| 161 subtreeReasons |= CompositingReasonIsolateCompositedDescendants; | 161 subtreeReasons |= CompositingReasonIsolateCompositedDescendants; |
| 162 } | 162 } |
| 163 | 163 |
| 164 // FIXME: This should move into CompositingReasonFinder::potentialCompos
itingReasonsFromStyle, but | 164 // FIXME: This should move into CompositingReasonFinder::potentialCompos
itingReasonsFromStyle, but |
| 165 // theres a poor interaction with RenderTextControlSingleLine, which set
s this hasOverflowClip directly. | 165 // theres a poor interaction with LayoutTextControlSingleLine, which set
s this hasOverflowClip directly. |
| 166 if (layer->renderer()->hasClipOrOverflowClip()) | 166 if (layer->renderer()->hasClipOrOverflowClip()) |
| 167 subtreeReasons |= CompositingReasonClipsCompositingDescendants; | 167 subtreeReasons |= CompositingReasonClipsCompositingDescendants; |
| 168 } | 168 } |
| 169 | 169 |
| 170 // A layer with preserve-3d or perspective only needs to be composited if th
ere are descendant layers that | 170 // A layer with preserve-3d or perspective only needs to be composited if th
ere are descendant layers that |
| 171 // will be affected by the preserve-3d or perspective. | 171 // will be affected by the preserve-3d or perspective. |
| 172 if (has3DTransformedDescendants) | 172 if (has3DTransformedDescendants) |
| 173 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos
itingReasonCombo3DDescendants; | 173 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos
itingReasonCombo3DDescendants; |
| 174 | 174 |
| 175 return subtreeReasons; | 175 return subtreeReasons; |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 433 |
| 434 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); | 434 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); |
| 435 } | 435 } |
| 436 | 436 |
| 437 // At this point we have finished collecting all reasons to composite this l
ayer. | 437 // At this point we have finished collecting all reasons to composite this l
ayer. |
| 438 layer->setCompositingReasons(reasonsToComposite); | 438 layer->setCompositingReasons(reasonsToComposite); |
| 439 | 439 |
| 440 } | 440 } |
| 441 | 441 |
| 442 } // namespace blink | 442 } // namespace blink |
| OLD | NEW |