OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CCLayerIterator_h | 5 #ifndef CCLayerIterator_h |
6 #define CCLayerIterator_h | 6 #define CCLayerIterator_h |
7 | 7 |
8 #include "CCLayerTreeHostCommon.h" | 8 #include "CCLayerTreeHostCommon.h" |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 return position; | 118 return position; |
119 } | 119 } |
120 | 120 |
121 private: | 121 private: |
122 CCLayerIterator(const LayerList* renderSurfaceLayerList, bool start) | 122 CCLayerIterator(const LayerList* renderSurfaceLayerList, bool start) |
123 : m_renderSurfaceLayerList(renderSurfaceLayerList) | 123 : m_renderSurfaceLayerList(renderSurfaceLayerList) |
124 , m_targetRenderSurfaceLayerIndex(0) | 124 , m_targetRenderSurfaceLayerIndex(0) |
125 { | 125 { |
126 for (size_t i = 0; i < renderSurfaceLayerList->size(); ++i) { | 126 for (size_t i = 0; i < renderSurfaceLayerList->size(); ++i) { |
127 if (!(*renderSurfaceLayerList)[i]->renderSurface()) { | 127 if (!(*renderSurfaceLayerList)[i]->renderSurface()) { |
128 ASSERT_NOT_REACHED(); | 128 NOTREACHED(); |
129 m_actions.end(*this); | 129 m_actions.end(*this); |
130 return; | 130 return; |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 if (start && !renderSurfaceLayerList->empty()) | 134 if (start && !renderSurfaceLayerList->empty()) |
135 m_actions.begin(*this); | 135 m_actions.begin(*this); |
136 else | 136 else |
137 m_actions.end(*this); | 137 m_actions.end(*this); |
138 } | 138 } |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 199 |
200 private: | 200 private: |
201 template <typename LayerType, typename LayerList, typename RenderSurface
Type, typename ActionType> | 201 template <typename LayerType, typename LayerList, typename RenderSurface
Type, typename ActionType> |
202 void goToHighestInSubtree(CCLayerIterator<LayerType, LayerList, RenderSu
rfaceType, ActionType>&); | 202 void goToHighestInSubtree(CCLayerIterator<LayerType, LayerList, RenderSu
rfaceType, ActionType>&); |
203 }; | 203 }; |
204 }; | 204 }; |
205 | 205 |
206 } // namespace cc | 206 } // namespace cc |
207 | 207 |
208 #endif | 208 #endif |
OLD | NEW |