| 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 11 matching lines...) Expand all Loading... |
| 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef CompositingRequirementsUpdater_h | 27 #ifndef CompositingRequirementsUpdater_h |
| 28 #define CompositingRequirementsUpdater_h | 28 #define CompositingRequirementsUpdater_h |
| 29 | 29 |
| 30 #include "platform/geometry/IntRect.h" | 30 #include "platform/geometry/IntRect.h" |
| 31 #include "platform/graphics/CompositingReasons.h" | 31 #include "platform/graphics/CompositingReasons.h" |
| 32 #include "wtf/Allocator.h" |
| 32 #include "wtf/Vector.h" | 33 #include "wtf/Vector.h" |
| 33 | 34 |
| 34 namespace blink { | 35 namespace blink { |
| 35 | 36 |
| 36 class CompositingReasonFinder; | 37 class CompositingReasonFinder; |
| 37 class DeprecatedPaintLayer; | 38 class DeprecatedPaintLayer; |
| 38 class LayoutView; | 39 class LayoutView; |
| 39 | 40 |
| 40 class CompositingRequirementsUpdater { | 41 class CompositingRequirementsUpdater { |
| 42 STACK_ALLOCATED(); |
| 41 public: | 43 public: |
| 42 CompositingRequirementsUpdater(LayoutView&, CompositingReasonFinder&); | 44 CompositingRequirementsUpdater(LayoutView&, CompositingReasonFinder&); |
| 43 ~CompositingRequirementsUpdater(); | 45 ~CompositingRequirementsUpdater(); |
| 44 | 46 |
| 45 // Recurse through the layers in z-index and overflow order (which is equiv
alent to painting order) | 47 // Recurse through the layers in z-index and overflow order (which is equiv
alent to painting order) |
| 46 // For the z-order children of a compositing layer: | 48 // For the z-order children of a compositing layer: |
| 47 // If a child layers has a compositing layer, then all subsequent layer
s must | 49 // If a child layers has a compositing layer, then all subsequent layer
s must |
| 48 // be compositing in order to render above that layer. | 50 // be compositing in order to render above that layer. |
| 49 // | 51 // |
| 50 // If a child in the negative z-order list is compositing, then the lay
er itself | 52 // If a child in the negative z-order list is compositing, then the lay
er itself |
| 51 // must be compositing so that its contents render over that child. | 53 // must be compositing so that its contents render over that child. |
| 52 // This implies that its positive z-index children must also be composi
ting. | 54 // This implies that its positive z-index children must also be composi
ting. |
| 53 // | 55 // |
| 54 void update(DeprecatedPaintLayer* root); | 56 void update(DeprecatedPaintLayer* root); |
| 55 | 57 |
| 56 private: | 58 private: |
| 57 class OverlapMap; | 59 class OverlapMap; |
| 58 class RecursionData; | 60 class RecursionData; |
| 59 | 61 |
| 60 void updateRecursive(DeprecatedPaintLayer* ancestorLayer, DeprecatedPaintLay
er* currentLayer, OverlapMap&, RecursionData&, bool& descendantHas3DTransform, V
ector<DeprecatedPaintLayer*>& unclippedDescendants, IntRect& absoluteDecendantBo
undingBox); | 62 void updateRecursive(DeprecatedPaintLayer* ancestorLayer, DeprecatedPaintLay
er* currentLayer, OverlapMap&, RecursionData&, bool& descendantHas3DTransform, V
ector<DeprecatedPaintLayer*>& unclippedDescendants, IntRect& absoluteDecendantBo
undingBox); |
| 61 | 63 |
| 62 LayoutView& m_layoutView; | 64 LayoutView& m_layoutView; |
| 63 CompositingReasonFinder& m_compositingReasonFinder; | 65 CompositingReasonFinder& m_compositingReasonFinder; |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 } // namespace blink | 68 } // namespace blink |
| 67 | 69 |
| 68 #endif // CompositingRequirementsUpdater_h | 70 #endif // CompositingRequirementsUpdater_h |
| OLD | NEW |