| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 void AppendContributingRenderPasses(RenderPassSink* render_pass_sink); | 42 void AppendContributingRenderPasses(RenderPassSink* render_pass_sink); |
| 43 | 43 |
| 44 // Creates an ID with the resource provider for the child renderer | 44 // Creates an ID with the resource provider for the child renderer |
| 45 // that will be sending quads to the layer. Registers the callback to | 45 // that will be sending quads to the layer. Registers the callback to |
| 46 // inform when resources are no longer in use. | 46 // inform when resources are no longer in use. |
| 47 void CreateChildIdIfNeeded(const ReturnCallback& return_callback); | 47 void CreateChildIdIfNeeded(const ReturnCallback& return_callback); |
| 48 | 48 |
| 49 void SetFrameData(const DelegatedFrameData* frame_data, | 49 void SetFrameData(const DelegatedFrameData* frame_data, |
| 50 const gfx::RectF& damage_in_frame); | 50 const gfx::RectF& damage_in_frame); |
| 51 | 51 |
| 52 float inverse_device_scale_factor() const { |
| 53 return inverse_device_scale_factor_; |
| 54 } |
| 55 |
| 52 protected: | 56 protected: |
| 53 DelegatedRendererLayerImpl(LayerTreeImpl* tree_impl, int id); | 57 DelegatedRendererLayerImpl(LayerTreeImpl* tree_impl, int id); |
| 54 | 58 |
| 55 int ChildIdForTesting() const { return child_id_; } | 59 int ChildIdForTesting() const { return child_id_; } |
| 56 const RenderPassList& RenderPassesInDrawOrderForTesting() const { | 60 const RenderPassList& RenderPassesInDrawOrderForTesting() const { |
| 57 return render_passes_in_draw_order_; | 61 return render_passes_in_draw_order_; |
| 58 } | 62 } |
| 59 const ResourceProvider::ResourceIdArray& ResourcesForTesting() const { | 63 const ResourceProvider::ResourceIdArray& ResourcesForTesting() const { |
| 60 return resources_; | 64 return resources_; |
| 61 } | 65 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 97 |
| 94 int child_id_; | 98 int child_id_; |
| 95 bool own_child_id_; | 99 bool own_child_id_; |
| 96 | 100 |
| 97 DISALLOW_COPY_AND_ASSIGN(DelegatedRendererLayerImpl); | 101 DISALLOW_COPY_AND_ASSIGN(DelegatedRendererLayerImpl); |
| 98 }; | 102 }; |
| 99 | 103 |
| 100 } // namespace cc | 104 } // namespace cc |
| 101 | 105 |
| 102 #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_ | 106 #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_ |
| OLD | NEW |