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 "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
9 #include "cc/layer_impl.h" | 10 #include "cc/layer_impl.h" |
10 #include "cc/scoped_ptr_vector.h" | 11 #include "cc/scoped_ptr_vector.h" |
11 | 12 |
12 namespace cc { | 13 namespace cc { |
13 | 14 |
14 class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl { | 15 class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl { |
15 public: | 16 public: |
16 static scoped_ptr<DelegatedRendererLayerImpl> Create( | 17 static scoped_ptr<DelegatedRendererLayerImpl> Create( |
17 LayerTreeImpl* tree_impl, int id) { | 18 LayerTreeImpl* tree_impl, int id) { |
18 return make_scoped_ptr(new DelegatedRendererLayerImpl(tree_impl, id)); | 19 return make_scoped_ptr(new DelegatedRendererLayerImpl(tree_impl, id)); |
19 } | 20 } |
20 virtual ~DelegatedRendererLayerImpl(); | 21 virtual ~DelegatedRendererLayerImpl(); |
21 | 22 |
22 // LayerImpl overrides. | 23 // LayerImpl overrides. |
| 24 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl*) OVERRIDE; |
23 virtual bool hasDelegatedContent() const OVERRIDE; | 25 virtual bool hasDelegatedContent() const OVERRIDE; |
24 virtual bool hasContributingDelegatedRenderPasses() const OVERRIDE; | 26 virtual bool hasContributingDelegatedRenderPasses() const OVERRIDE; |
25 virtual RenderPass::Id firstContributingRenderPassId() const OVERRIDE; | 27 virtual RenderPass::Id firstContributingRenderPassId() const OVERRIDE; |
26 virtual RenderPass::Id nextContributingRenderPassId( | 28 virtual RenderPass::Id nextContributingRenderPassId( |
27 RenderPass::Id previous) const OVERRIDE; | 29 RenderPass::Id previous) const OVERRIDE; |
28 virtual void didLoseOutputSurface() OVERRIDE; | 30 virtual void didLoseOutputSurface() OVERRIDE; |
29 virtual void appendQuads( | 31 virtual void appendQuads( |
30 QuadSink& quad_sink, AppendQuadsData& append_quads_data) OVERRIDE; | 32 QuadSink& quad_sink, AppendQuadsData& append_quads_data) OVERRIDE; |
31 | 33 |
32 // This gives ownership of the RenderPasses to the layer. | 34 // This gives ownership of the RenderPasses to the layer. |
(...skipping 24 matching lines...) Expand all Loading... |
57 virtual const char* layerTypeAsString() const OVERRIDE; | 59 virtual const char* layerTypeAsString() const OVERRIDE; |
58 | 60 |
59 ScopedPtrVector<RenderPass> render_passes_in_draw_order_; | 61 ScopedPtrVector<RenderPass> render_passes_in_draw_order_; |
60 base::hash_map<RenderPass::Id, int> render_passes_index_by_id_; | 62 base::hash_map<RenderPass::Id, int> render_passes_index_by_id_; |
61 gfx::Size display_size_; | 63 gfx::Size display_size_; |
62 }; | 64 }; |
63 | 65 |
64 } | 66 } |
65 | 67 |
66 #endif // CC_DELEGATED_RENDERER_LAYER_IMPL_H_ | 68 #endif // CC_DELEGATED_RENDERER_LAYER_IMPL_H_ |
OLD | NEW |