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 CC_QUADS_RENDER_PASS_H_ | 5 #ifndef CC_QUADS_RENDER_PASS_H_ |
6 #define CC_QUADS_RENDER_PASS_H_ | 6 #define CC_QUADS_RENDER_PASS_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
13 #include "cc/base/cc_export.h" | 13 #include "cc/base/cc_export.h" |
14 #include "cc/base/hash_pair.h" | |
15 #include "cc/base/scoped_ptr_hash_map.h" | 14 #include "cc/base/scoped_ptr_hash_map.h" |
16 #include "cc/base/scoped_ptr_vector.h" | 15 #include "cc/base/scoped_ptr_vector.h" |
17 #include "skia/ext/refptr.h" | 16 #include "skia/ext/refptr.h" |
18 #include "third_party/WebKit/public/platform/WebFilterOperations.h" | 17 #include "third_party/WebKit/public/platform/WebFilterOperations.h" |
19 #include "third_party/skia/include/core/SkColor.h" | 18 #include "third_party/skia/include/core/SkColor.h" |
20 #include "third_party/skia/include/core/SkImageFilter.h" | 19 #include "third_party/skia/include/core/SkImageFilter.h" |
21 #include "ui/gfx/rect.h" | 20 #include "ui/gfx/rect.h" |
22 #include "ui/gfx/rect_f.h" | 21 #include "ui/gfx/rect_f.h" |
23 #include "ui/gfx/transform.h" | 22 #include "ui/gfx/transform.h" |
24 | 23 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // this list. This property should not be serialized between compositors, as | 103 // this list. This property should not be serialized between compositors, as |
105 // it only makes sense in the root compositor. | 104 // it only makes sense in the root compositor. |
106 ScopedPtrVector<CopyOutputRequest> copy_requests; | 105 ScopedPtrVector<CopyOutputRequest> copy_requests; |
107 | 106 |
108 QuadList quad_list; | 107 QuadList quad_list; |
109 SharedQuadStateList shared_quad_state_list; | 108 SharedQuadStateList shared_quad_state_list; |
110 | 109 |
111 protected: | 110 protected: |
112 RenderPass(); | 111 RenderPass(); |
113 | 112 |
| 113 private: |
114 DISALLOW_COPY_AND_ASSIGN(RenderPass); | 114 DISALLOW_COPY_AND_ASSIGN(RenderPass); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace cc | 117 } // namespace cc |
118 | 118 |
119 namespace BASE_HASH_NAMESPACE { | 119 namespace BASE_HASH_NAMESPACE { |
120 #if defined(COMPILER_MSVC) | 120 #if defined(COMPILER_MSVC) |
121 template<> | 121 template<> |
122 inline size_t hash_value<cc::RenderPass::Id>(const cc::RenderPass::Id& key) { | 122 inline size_t hash_value<cc::RenderPass::Id>(const cc::RenderPass::Id& key) { |
123 return hash_value<std::pair<int, int> >( | 123 return hash_value<std::pair<int, int> >( |
124 std::pair<int, int>(key.layer_id, key.index)); | 124 std::pair<int, int>(key.layer_id, key.index)); |
125 } | 125 } |
126 #elif defined(COMPILER_GCC) | 126 #elif defined(COMPILER_GCC) |
127 template<> | 127 template<> |
128 struct hash<cc::RenderPass::Id> { | 128 struct hash<cc::RenderPass::Id> { |
129 size_t operator()(cc::RenderPass::Id key) const { | 129 size_t operator()(cc::RenderPass::Id key) const { |
130 return hash<std::pair<int, int> >()( | 130 return hash<std::pair<int, int> >()( |
131 std::pair<int, int>(key.layer_id, key.index)); | 131 std::pair<int, int>(key.layer_id, key.index)); |
132 } | 132 } |
133 }; | 133 }; |
134 #else | 134 #else |
135 #error define a hash function for your compiler | 135 #error define a hash function for your compiler |
136 #endif // COMPILER | 136 #endif // COMPILER |
137 } | 137 } // namespace BASE_HASH_NAMESPACE |
138 | 138 |
139 namespace cc { | 139 namespace cc { |
140 typedef ScopedPtrVector<RenderPass> RenderPassList; | 140 typedef ScopedPtrVector<RenderPass> RenderPassList; |
141 typedef base::hash_map<RenderPass::Id, RenderPass*> RenderPassIdHashMap; | 141 typedef base::hash_map<RenderPass::Id, RenderPass*> RenderPassIdHashMap; |
142 } // namespace cc | 142 } // namespace cc |
143 | 143 |
144 #endif // CC_QUADS_RENDER_PASS_H_ | 144 #endif // CC_QUADS_RENDER_PASS_H_ |
OLD | NEW |