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 "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 const RenderPassList& RenderPassesInDrawOrderForTesting() const { | 59 const RenderPassList& RenderPassesInDrawOrderForTesting() const { |
60 return render_passes_in_draw_order_; | 60 return render_passes_in_draw_order_; |
61 } | 61 } |
62 const ResourceProvider::ResourceIdArray& ResourcesForTesting() const { | 62 const ResourceProvider::ResourceIdArray& ResourcesForTesting() const { |
63 return resources_; | 63 return resources_; |
64 } | 64 } |
65 | 65 |
66 private: | 66 private: |
67 void ClearChildId(); | 67 void ClearChildId(); |
68 | 68 |
69 void AppendRainbowDebugBorder(RenderPass* render_pass, | 69 void AppendRainbowDebugBorder(RenderPass* render_pass); |
70 AppendQuadsData* append_quads_data); | |
71 | 70 |
72 void SetRenderPasses(RenderPassList* render_passes_in_draw_order); | 71 void SetRenderPasses(RenderPassList* render_passes_in_draw_order); |
73 void ClearRenderPasses(); | 72 void ClearRenderPasses(); |
74 | 73 |
75 // Returns |true| if the delegated_render_pass_id is part of the current | 74 // Returns |true| if the delegated_render_pass_id is part of the current |
76 // frame and can be converted. | 75 // frame and can be converted. |
77 bool ConvertDelegatedRenderPassId(RenderPassId delegated_render_pass_id, | 76 bool ConvertDelegatedRenderPassId(RenderPassId delegated_render_pass_id, |
78 RenderPassId* output_render_pass_id) const; | 77 RenderPassId* output_render_pass_id) const; |
79 | 78 |
80 void AppendRenderPassQuads(RenderPass* render_pass, | 79 void AppendRenderPassQuads(RenderPass* render_pass, |
81 const Occlusion& occlusion_in_content_space, | 80 const Occlusion& occlusion_in_content_space, |
82 AppendQuadsData* append_quads_data, | |
83 const RenderPass* delegated_render_pass, | 81 const RenderPass* delegated_render_pass, |
84 const gfx::Size& frame_size) const; | 82 const gfx::Size& frame_size) const; |
85 | 83 |
86 // LayerImpl overrides. | 84 // LayerImpl overrides. |
87 const char* LayerTypeAsString() const override; | 85 const char* LayerTypeAsString() const override; |
88 | 86 |
89 bool have_render_passes_to_push_; | 87 bool have_render_passes_to_push_; |
90 float inverse_device_scale_factor_; | 88 float inverse_device_scale_factor_; |
91 RenderPassList render_passes_in_draw_order_; | 89 RenderPassList render_passes_in_draw_order_; |
92 base::hash_map<RenderPassId, int> render_passes_index_by_id_; | 90 base::hash_map<RenderPassId, int> render_passes_index_by_id_; |
93 ResourceProvider::ResourceIdArray resources_; | 91 ResourceProvider::ResourceIdArray resources_; |
94 | 92 |
95 int child_id_; | 93 int child_id_; |
96 bool own_child_id_; | 94 bool own_child_id_; |
97 | 95 |
98 DISALLOW_COPY_AND_ASSIGN(DelegatedRendererLayerImpl); | 96 DISALLOW_COPY_AND_ASSIGN(DelegatedRendererLayerImpl); |
99 }; | 97 }; |
100 | 98 |
101 } // namespace cc | 99 } // namespace cc |
102 | 100 |
103 #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_ | 101 #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_ |
OLD | NEW |