| 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_DELEGATED_RENDERER_LAYER_IMPL_H_ | 5 #ifndef CC_DELEGATED_RENDERER_LAYER_IMPL_H_ |
| 6 #define CC_DELEGATED_RENDERER_LAYER_IMPL_H_ | 6 #define CC_DELEGATED_RENDERER_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
| 10 #include "cc/layer_impl.h" | 10 #include "cc/layer_impl.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 void ClearRenderPasses(); | 36 void ClearRenderPasses(); |
| 37 | 37 |
| 38 // Set the size at which the frame should be displayed, with the origin at the | 38 // Set the size at which the frame should be displayed, with the origin at the |
| 39 // layer's origin. This must always contain at least the layer's bounds. A | 39 // layer's origin. This must always contain at least the layer's bounds. A |
| 40 // value of (0, 0) implies that the frame should be displayed to fit exactly | 40 // value of (0, 0) implies that the frame should be displayed to fit exactly |
| 41 // in the layer's bounds. | 41 // in the layer's bounds. |
| 42 void set_display_size(gfx::Size size) { display_size_ = size; } | 42 void set_display_size(gfx::Size size) { display_size_ = size; } |
| 43 | 43 |
| 44 void AppendContributingRenderPasses(RenderPassSink* render_pass_sink); | 44 void AppendContributingRenderPasses(RenderPassSink* render_pass_sink); |
| 45 | 45 |
| 46 // Creates an ID with the resource provider for the child renderer |
| 47 // that will be sending quads to the layer. |
| 48 void CreateChildIdIfNeeded(); |
| 49 int child_id() const { return child_id_; } |
| 50 |
| 46 private: | 51 private: |
| 47 DelegatedRendererLayerImpl(LayerTreeImpl* tree_impl, int id); | 52 DelegatedRendererLayerImpl(LayerTreeImpl* tree_impl, int id); |
| 48 | 53 |
| 54 void ClearChildId(); |
| 55 |
| 49 RenderPass::Id ConvertDelegatedRenderPassId( | 56 RenderPass::Id ConvertDelegatedRenderPassId( |
| 50 RenderPass::Id delegated_render_pass_id) const; | 57 RenderPass::Id delegated_render_pass_id) const; |
| 51 | 58 |
| 52 void AppendRenderPassQuads( | 59 void AppendRenderPassQuads( |
| 53 QuadSink* quad_sink, | 60 QuadSink* quad_sink, |
| 54 AppendQuadsData* append_quads_data, | 61 AppendQuadsData* append_quads_data, |
| 55 const RenderPass* delegated_render_pass, | 62 const RenderPass* delegated_render_pass, |
| 56 gfx::Size frame_size) const; | 63 gfx::Size frame_size) const; |
| 57 | 64 |
| 58 // LayerImpl overrides. | 65 // LayerImpl overrides. |
| 59 virtual const char* layerTypeAsString() const OVERRIDE; | 66 virtual const char* layerTypeAsString() const OVERRIDE; |
| 60 | 67 |
| 61 ScopedPtrVector<RenderPass> render_passes_in_draw_order_; | 68 ScopedPtrVector<RenderPass> render_passes_in_draw_order_; |
| 62 base::hash_map<RenderPass::Id, int> render_passes_index_by_id_; | 69 base::hash_map<RenderPass::Id, int> render_passes_index_by_id_; |
| 63 gfx::Size display_size_; | 70 gfx::Size display_size_; |
| 71 int child_id_; |
| 64 }; | 72 }; |
| 65 | 73 |
| 66 } | 74 } |
| 67 | 75 |
| 68 #endif // CC_DELEGATED_RENDERER_LAYER_IMPL_H_ | 76 #endif // CC_DELEGATED_RENDERER_LAYER_IMPL_H_ |
| OLD | NEW |