| 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 <wtf/PassOwnPtr.h> | 10 #include <wtf/PassOwnPtr.h> |
| 11 #include <wtf/RefPtr.h> | 11 #include <wtf/RefPtr.h> |
| 12 #include <wtf/Vector.h> | 12 #include <wtf/Vector.h> |
| 13 | 13 |
| 14 namespace WebCore { | 14 namespace cc { |
| 15 | 15 |
| 16 // These classes provide means to iterate over the RenderSurface-Layer tree. | 16 // These classes provide means to iterate over the RenderSurface-Layer tree. |
| 17 | 17 |
| 18 // Example code follows, for a tree of LayerChromium/RenderSurfaceChromium objec
ts. See below for details. | 18 // Example code follows, for a tree of LayerChromium/RenderSurfaceChromium objec
ts. See below for details. |
| 19 // | 19 // |
| 20 // void doStuffOnLayers(const Vector<RefPtr<LayerChromium> >& renderSurfaceLayer
List) | 20 // void doStuffOnLayers(const Vector<RefPtr<LayerChromium> >& renderSurfaceLayer
List) |
| 21 // { | 21 // { |
| 22 // typedef CCLayerIterator<LayerChromium, RenderSurfaceChromium, CCLayerIter
atorActions::FrontToBack> CCLayerIteratorType; | 22 // typedef CCLayerIterator<LayerChromium, RenderSurfaceChromium, CCLayerIter
atorActions::FrontToBack> CCLayerIteratorType; |
| 23 // | 23 // |
| 24 // CCLayerIteratorType end = CCLayerIteratorType::end(&renderSurfaceLayerLis
t); | 24 // CCLayerIteratorType end = CCLayerIteratorType::end(&renderSurfaceLayerLis
t); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 template <typename LayerType, typename LayerList, typename RenderSurface
Type, typename ActionType> | 199 template <typename LayerType, typename LayerList, typename RenderSurface
Type, typename ActionType> |
| 200 void next(CCLayerIterator<LayerType, LayerList, RenderSurfaceType, Actio
nType>&); | 200 void next(CCLayerIterator<LayerType, LayerList, RenderSurfaceType, Actio
nType>&); |
| 201 | 201 |
| 202 private: | 202 private: |
| 203 template <typename LayerType, typename LayerList, typename RenderSurface
Type, typename ActionType> | 203 template <typename LayerType, typename LayerList, typename RenderSurface
Type, typename ActionType> |
| 204 void goToHighestInSubtree(CCLayerIterator<LayerType, LayerList, RenderSu
rfaceType, ActionType>&); | 204 void goToHighestInSubtree(CCLayerIterator<LayerType, LayerList, RenderSu
rfaceType, ActionType>&); |
| 205 }; | 205 }; |
| 206 }; | 206 }; |
| 207 | 207 |
| 208 } // namespace WebCore | 208 } // namespace cc |
| 209 | 209 |
| 210 #endif | 210 #endif |
| OLD | NEW |