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 CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_ |
6 #define CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_ | 6 #define CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include <unordered_map> |
| 11 |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "cc/base/cc_export.h" | 14 #include "cc/base/cc_export.h" |
14 #include "cc/layers/layer_impl.h" | 15 #include "cc/layers/layer_impl.h" |
| 16 #include "cc/quads/render_pass_id.h" |
15 | 17 |
16 namespace cc { | 18 namespace cc { |
17 class DelegatedFrameData; | 19 class DelegatedFrameData; |
18 class RenderPassSink; | 20 class RenderPassSink; |
19 | 21 |
20 class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl { | 22 class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl { |
21 public: | 23 public: |
22 static scoped_ptr<DelegatedRendererLayerImpl> Create( | 24 static scoped_ptr<DelegatedRendererLayerImpl> Create( |
23 LayerTreeImpl* tree_impl, int id) { | 25 LayerTreeImpl* tree_impl, int id) { |
24 return make_scoped_ptr(new DelegatedRendererLayerImpl(tree_impl, id)); | 26 return make_scoped_ptr(new DelegatedRendererLayerImpl(tree_impl, id)); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 const RenderPass* delegated_render_pass, | 85 const RenderPass* delegated_render_pass, |
84 const gfx::Size& frame_size) const; | 86 const gfx::Size& frame_size) const; |
85 | 87 |
86 // LayerImpl overrides. | 88 // LayerImpl overrides. |
87 const char* LayerTypeAsString() const override; | 89 const char* LayerTypeAsString() const override; |
88 | 90 |
89 bool have_render_passes_to_push_; | 91 bool have_render_passes_to_push_; |
90 float inverse_device_scale_factor_; | 92 float inverse_device_scale_factor_; |
91 RenderPassList render_passes_in_draw_order_; | 93 RenderPassList render_passes_in_draw_order_; |
92 | 94 |
93 using RenderPassToIndexMap = base::hash_map<RenderPassId, size_t>; | 95 using RenderPassToIndexMap = |
| 96 std::unordered_map<RenderPassId, size_t, RenderPassIdHash>; |
94 RenderPassToIndexMap render_passes_index_by_id_; | 97 RenderPassToIndexMap render_passes_index_by_id_; |
95 ResourceProvider::ResourceIdSet resources_; | 98 ResourceProvider::ResourceIdSet resources_; |
96 | 99 |
97 int child_id_; | 100 int child_id_; |
98 bool own_child_id_; | 101 bool own_child_id_; |
99 | 102 |
100 DISALLOW_COPY_AND_ASSIGN(DelegatedRendererLayerImpl); | 103 DISALLOW_COPY_AND_ASSIGN(DelegatedRendererLayerImpl); |
101 }; | 104 }; |
102 | 105 |
103 } // namespace cc | 106 } // namespace cc |
104 | 107 |
105 #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_ | 108 #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_ |
OLD | NEW |