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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 if (hasCompositedDescendants) { | 159 if (hasCompositedDescendants) { |
160 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos
itingReasonComboCompositedDescendants; | 160 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos
itingReasonComboCompositedDescendants; |
161 | 161 |
162 if (layer->shouldIsolateCompositedDescendants()) { | 162 if (layer->shouldIsolateCompositedDescendants()) { |
163 ASSERT(layer->stackingNode()->isStackingContext()); | 163 ASSERT(layer->stackingNode()->isStackingContext()); |
164 subtreeReasons |= CompositingReasonIsolateCompositedDescendants; | 164 subtreeReasons |= CompositingReasonIsolateCompositedDescendants; |
165 } | 165 } |
166 | 166 |
167 // FIXME: This should move into CompositingReasonFinder::potentialCompos
itingReasonsFromStyle, but | 167 // FIXME: This should move into CompositingReasonFinder::potentialCompos
itingReasonsFromStyle, but |
168 // theres a poor interaction with LayoutTextControlSingleLine, which set
s this hasOverflowClip directly. | 168 // theres a poor interaction with LayoutTextControlSingleLine, which set
s this hasOverflowClip directly. |
169 if (layer->layoutObject()->hasClipOrOverflowClip()) | 169 if (layer->layoutObject()->hasClipRelatedProperty()) |
170 subtreeReasons |= CompositingReasonClipsCompositingDescendants; | 170 subtreeReasons |= CompositingReasonClipsCompositingDescendants; |
171 | 171 |
172 if (layer->layoutObject()->style()->position() == FixedPosition) | 172 if (layer->layoutObject()->style()->position() == FixedPosition) |
173 subtreeReasons |= CompositingReasonPositionFixedWithCompositedDescen
dants; | 173 subtreeReasons |= CompositingReasonPositionFixedWithCompositedDescen
dants; |
174 } | 174 } |
175 | 175 |
176 // A layer with preserve-3d or perspective only needs to be composited if th
ere are descendant layers that | 176 // A layer with preserve-3d or perspective only needs to be composited if th
ere are descendant layers that |
177 // will be affected by the preserve-3d or perspective. | 177 // will be affected by the preserve-3d or perspective. |
178 if (has3DTransformedDescendants) | 178 if (has3DTransformedDescendants) |
179 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos
itingReasonCombo3DDescendants; | 179 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos
itingReasonCombo3DDescendants; |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 | 448 |
449 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); | 449 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); |
450 } | 450 } |
451 | 451 |
452 // At this point we have finished collecting all reasons to composite this l
ayer. | 452 // At this point we have finished collecting all reasons to composite this l
ayer. |
453 layer->setCompositingReasons(reasonsToComposite); | 453 layer->setCompositingReasons(reasonsToComposite); |
454 | 454 |
455 } | 455 } |
456 | 456 |
457 } // namespace blink | 457 } // namespace blink |
OLD | NEW |