OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 CCRenderPass_h | 5 #ifndef CCRenderPass_h |
6 #define CCRenderPass_h | 6 #define CCRenderPass_h |
7 | 7 |
8 #include "CCDrawQuad.h" | 8 #include "CCDrawQuad.h" |
9 #include "CCOcclusionTracker.h" | 9 #include "CCOcclusionTracker.h" |
10 #include "CCSharedQuadState.h" | 10 #include "CCSharedQuadState.h" |
11 #include "FloatRect.h" | 11 #include "FloatRect.h" |
12 #include "SkColor.h" | 12 #include "SkColor.h" |
| 13 #include "cc/own_ptr_vector.h" |
13 #include <public/WebFilterOperations.h> | 14 #include <public/WebFilterOperations.h> |
14 #include <public/WebTransformationMatrix.h> | 15 #include <public/WebTransformationMatrix.h> |
15 #include <wtf/HashMap.h> | 16 #include <wtf/HashMap.h> |
16 #include <wtf/PassOwnPtr.h> | 17 #include <wtf/PassOwnPtr.h> |
17 #include <wtf/Vector.h> | 18 #include <wtf/Vector.h> |
18 | 19 |
19 namespace cc { | 20 namespace cc { |
20 | 21 |
21 class CCLayerImpl; | 22 class CCLayerImpl; |
22 class CCRenderSurface; | 23 class CCRenderSurface; |
23 | 24 |
24 struct CCAppendQuadsData; | 25 struct CCAppendQuadsData; |
25 | 26 |
26 // A list of CCDrawQuad objects, sorted internally in front-to-back order. | 27 // A list of CCDrawQuad objects, sorted internally in front-to-back order. |
27 class CCQuadList : public Vector<OwnPtr<CCDrawQuad> > { | 28 class CCQuadList : public OwnPtrVector<CCDrawQuad> { |
28 public: | 29 public: |
29 typedef reverse_iterator backToFrontIterator; | 30 typedef reverse_iterator backToFrontIterator; |
30 typedef const_reverse_iterator constBackToFrontIterator; | 31 typedef const_reverse_iterator constBackToFrontIterator; |
31 | 32 |
32 inline backToFrontIterator backToFrontBegin() { return rbegin(); } | 33 inline backToFrontIterator backToFrontBegin() { return rbegin(); } |
33 inline backToFrontIterator backToFrontEnd() { return rend(); } | 34 inline backToFrontIterator backToFrontEnd() { return rend(); } |
34 inline constBackToFrontIterator backToFrontBegin() const { return rbegin();
} | 35 inline constBackToFrontIterator backToFrontBegin() const { return rbegin();
} |
35 inline constBackToFrontIterator backToFrontEnd() const { return rend(); } | 36 inline constBackToFrontIterator backToFrontEnd() const { return rend(); } |
36 }; | 37 }; |
37 | 38 |
38 typedef Vector<OwnPtr<CCSharedQuadState> > CCSharedQuadStateList; | 39 typedef OwnPtrVector<CCSharedQuadState> CCSharedQuadStateList; |
39 | 40 |
40 class CCRenderPass { | 41 class CCRenderPass { |
41 WTF_MAKE_NONCOPYABLE(CCRenderPass); | 42 WTF_MAKE_NONCOPYABLE(CCRenderPass); |
42 public: | 43 public: |
43 struct Id { | 44 struct Id { |
44 int layerId; | 45 int layerId; |
45 int index; | 46 int index; |
46 | 47 |
47 Id(int layerId, int index) | 48 Id(int layerId, int index) |
48 : layerId(layerId) | 49 : layerId(layerId) |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 typedef IntHash<cc::CCRenderPass::Id> Hash; | 124 typedef IntHash<cc::CCRenderPass::Id> Hash; |
124 }; | 125 }; |
125 } // namespace WTF | 126 } // namespace WTF |
126 | 127 |
127 namespace cc { | 128 namespace cc { |
128 typedef Vector<CCRenderPass*> CCRenderPassList; | 129 typedef Vector<CCRenderPass*> CCRenderPassList; |
129 typedef HashMap<CCRenderPass::Id, OwnPtr<CCRenderPass> > CCRenderPassIdHashMap; | 130 typedef HashMap<CCRenderPass::Id, OwnPtr<CCRenderPass> > CCRenderPassIdHashMap; |
130 } // namespace cc | 131 } // namespace cc |
131 | 132 |
132 #endif | 133 #endif |
OLD | NEW |