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 27 matching lines...) Expand all Loading... |
38 class PaintLayer; | 38 class PaintLayer; |
39 class LayoutView; | 39 class LayoutView; |
40 | 40 |
41 class CompositingRequirementsUpdater { | 41 class CompositingRequirementsUpdater { |
42 STACK_ALLOCATED(); | 42 STACK_ALLOCATED(); |
43 | 43 |
44 public: | 44 public: |
45 CompositingRequirementsUpdater(LayoutView&, CompositingReasonFinder&); | 45 CompositingRequirementsUpdater(LayoutView&, CompositingReasonFinder&); |
46 ~CompositingRequirementsUpdater(); | 46 ~CompositingRequirementsUpdater(); |
47 | 47 |
48 // Recurse through the layers in z-index and overflow order (which is equival
ent to painting order) | 48 // Recurse through the layers in z-index and overflow order (which is |
| 49 // equivalent to painting order) |
49 // For the z-order children of a compositing layer: | 50 // For the z-order children of a compositing layer: |
50 // If a child layers has a compositing layer, then all subsequent layers
must | 51 // If a child layers has a compositing layer, then all subsequent layers |
51 // be compositing in order to render above that layer. | 52 // must be compositing in order to render above that layer. |
52 // | 53 // |
53 // If a child in the negative z-order list is compositing, then the layer
itself | 54 // If a child in the negative z-order list is compositing, then the layer |
54 // must be compositing so that its contents render over that child. | 55 // itself must be compositing so that its contents render over that |
55 // This implies that its positive z-index children must also be compositi
ng. | 56 // child. This implies that its positive z-index children must also be |
| 57 // compositing. |
56 // | 58 // |
57 void update(PaintLayer* root); | 59 void update(PaintLayer* root); |
58 | 60 |
59 private: | 61 private: |
60 class OverlapMap; | 62 class OverlapMap; |
61 class RecursionData; | 63 class RecursionData; |
62 | 64 |
63 void updateRecursive(PaintLayer* ancestorLayer, | 65 void updateRecursive(PaintLayer* ancestorLayer, |
64 PaintLayer* currentLayer, | 66 PaintLayer* currentLayer, |
65 OverlapMap&, | 67 OverlapMap&, |
66 RecursionData&, | 68 RecursionData&, |
67 bool& descendantHas3DTransform, | 69 bool& descendantHas3DTransform, |
68 Vector<PaintLayer*>& unclippedDescendants, | 70 Vector<PaintLayer*>& unclippedDescendants, |
69 IntRect& absoluteDescendantBoundingBox); | 71 IntRect& absoluteDescendantBoundingBox); |
70 | 72 |
71 LayoutView& m_layoutView; | 73 LayoutView& m_layoutView; |
72 CompositingReasonFinder& m_compositingReasonFinder; | 74 CompositingReasonFinder& m_compositingReasonFinder; |
73 }; | 75 }; |
74 | 76 |
75 } // namespace blink | 77 } // namespace blink |
76 | 78 |
77 #endif // CompositingRequirementsUpdater_h | 79 #endif // CompositingRequirementsUpdater_h |
OLD | NEW |