| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
| 15 #include "base/hash.h" |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "cc/base/cc_export.h" | 17 #include "cc/base/cc_export.h" |
| 17 #include "cc/base/list_container.h" | 18 #include "cc/base/list_container.h" |
| 18 #include "cc/quads/render_pass_id.h" | 19 #include "cc/quads/render_pass_id.h" |
| 19 #include "cc/surfaces/surface_id.h" | 20 #include "cc/surfaces/surface_id.h" |
| 20 #include "skia/ext/refptr.h" | 21 #include "skia/ext/refptr.h" |
| 21 #include "ui/gfx/geometry/rect.h" | 22 #include "ui/gfx/geometry/rect.h" |
| 22 #include "ui/gfx/geometry/rect_f.h" | 23 #include "ui/gfx/geometry/rect_f.h" |
| 23 #include "ui/gfx/transform.h" | 24 #include "ui/gfx/transform.h" |
| 24 | 25 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 133 |
| 133 DISALLOW_COPY_AND_ASSIGN(RenderPass); | 134 DISALLOW_COPY_AND_ASSIGN(RenderPass); |
| 134 }; | 135 }; |
| 135 | 136 |
| 136 } // namespace cc | 137 } // namespace cc |
| 137 | 138 |
| 138 namespace BASE_HASH_NAMESPACE { | 139 namespace BASE_HASH_NAMESPACE { |
| 139 template <> | 140 template <> |
| 140 struct hash<cc::RenderPassId> { | 141 struct hash<cc::RenderPassId> { |
| 141 size_t operator()(cc::RenderPassId key) const { | 142 size_t operator()(cc::RenderPassId key) const { |
| 142 return base::HashPair(key.layer_id, static_cast<int>(key.index)); | 143 return base::HashInts(key.layer_id, static_cast<int>(key.index)); |
| 143 } | 144 } |
| 144 }; | 145 }; |
| 145 } // namespace BASE_HASH_NAMESPACE | 146 } // namespace BASE_HASH_NAMESPACE |
| 146 | 147 |
| 147 namespace cc { | 148 namespace cc { |
| 148 typedef std::vector<scoped_ptr<RenderPass>> RenderPassList; | 149 typedef std::vector<scoped_ptr<RenderPass>> RenderPassList; |
| 149 typedef base::hash_map<RenderPassId, RenderPass*> RenderPassIdHashMap; | 150 typedef base::hash_map<RenderPassId, RenderPass*> RenderPassIdHashMap; |
| 150 } // namespace cc | 151 } // namespace cc |
| 151 | 152 |
| 152 #endif // CC_QUADS_RENDER_PASS_H_ | 153 #endif // CC_QUADS_RENDER_PASS_H_ |
| OLD | NEW |