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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 private: | 51 private: |
52 struct SquashingState { | 52 struct SquashingState { |
53 SquashingState() | 53 SquashingState() |
54 : mostRecentMapping(0) | 54 : mostRecentMapping(0) |
55 , hasMostRecentMapping(false) | 55 , hasMostRecentMapping(false) |
56 , haveAssignedBackingsToEntireSquashingLayerSubtree(false) | 56 , haveAssignedBackingsToEntireSquashingLayerSubtree(false) |
57 , nextSquashedLayerIndex(0) | 57 , nextSquashedLayerIndex(0) |
58 , totalAreaOfSquashedRects(0) { } | 58 , totalAreaOfSquashedRects(0) { } |
59 | 59 |
60 void updateSquashingStateForNewMapping(CompositedLayerMapping*, bool has
NewCompositedLayerMapping); | 60 void updateSquashingStateForNewMapping(CompositedLayerMapping*); |
61 | 61 |
62 // The most recent composited backing that the layer should squash onto
if needed. | 62 // The most recent composited backing that the layer should squash onto
if needed. |
63 CompositedLayerMapping* mostRecentMapping; | 63 CompositedLayerMapping* mostRecentMapping; |
64 bool hasMostRecentMapping; | 64 bool hasMostRecentMapping; |
65 | 65 |
66 // Whether all RenderLayers in the stacking subtree rooted at the most r
ecent mapping's | 66 // Whether all RenderLayers in the stacking subtree rooted at the most r
ecent mapping's |
67 // owning layer have had CompositedLayerMappings assigned. Layers cannot
squash into a | 67 // owning layer have had CompositedLayerMappings assigned. Layers cannot
squash into a |
68 // CompositedLayerMapping owned by a stacking ancestor, since this chang
es paint order. | 68 // CompositedLayerMapping owned by a stacking ancestor, since this chang
es paint order. |
69 bool haveAssignedBackingsToEntireSquashingLayerSubtree; | 69 bool haveAssignedBackingsToEntireSquashingLayerSubtree; |
70 | 70 |
(...skipping 16 matching lines...) Expand all Loading... |
87 bool needsOwnBacking(const RenderLayer*) const; | 87 bool needsOwnBacking(const RenderLayer*) const; |
88 | 88 |
89 RenderLayerCompositor* m_compositor; | 89 RenderLayerCompositor* m_compositor; |
90 bool m_layerSquashingEnabled; | 90 bool m_layerSquashingEnabled; |
91 bool m_layersChanged; | 91 bool m_layersChanged; |
92 }; | 92 }; |
93 | 93 |
94 } // namespace blink | 94 } // namespace blink |
95 | 95 |
96 #endif // CompositingLayerAssigner_h | 96 #endif // CompositingLayerAssigner_h |
OLD | NEW |