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_OUTPUT_DELEGATING_RENDERER_H_ | 5 #ifndef CC_OUTPUT_DELEGATING_RENDERER_H_ |
6 #define CC_OUTPUT_DELEGATING_RENDERER_H_ | 6 #define CC_OUTPUT_DELEGATING_RENDERER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
11 #include "cc/output/compositor_frame.h" | 12 #include "cc/output/compositor_frame.h" |
12 #include "cc/output/renderer.h" | 13 #include "cc/output/renderer.h" |
13 | 14 |
14 namespace cc { | 15 namespace cc { |
15 | 16 |
16 class OutputSurface; | 17 class OutputSurface; |
17 class ResourceProvider; | 18 class ResourceProvider; |
18 | 19 |
19 class CC_EXPORT DelegatingRenderer : public Renderer { | 20 class CC_EXPORT DelegatingRenderer : public Renderer { |
20 public: | 21 public: |
21 static scoped_ptr<DelegatingRenderer> Create( | 22 static std::unique_ptr<DelegatingRenderer> Create( |
22 RendererClient* client, | 23 RendererClient* client, |
23 const RendererSettings* settings, | 24 const RendererSettings* settings, |
24 OutputSurface* output_surface, | 25 OutputSurface* output_surface, |
25 ResourceProvider* resource_provider); | 26 ResourceProvider* resource_provider); |
26 ~DelegatingRenderer() override; | 27 ~DelegatingRenderer() override; |
27 | 28 |
28 const RendererCapabilitiesImpl& Capabilities() const override; | 29 const RendererCapabilitiesImpl& Capabilities() const override; |
29 | 30 |
30 void DrawFrame(RenderPassList* render_passes_in_draw_order, | 31 void DrawFrame(RenderPassList* render_passes_in_draw_order, |
31 float device_scale_factor, | 32 float device_scale_factor, |
(...skipping 10 matching lines...) Expand all Loading... |
42 DelegatingRenderer(RendererClient* client, | 43 DelegatingRenderer(RendererClient* client, |
43 const RendererSettings* settings, | 44 const RendererSettings* settings, |
44 OutputSurface* output_surface, | 45 OutputSurface* output_surface, |
45 ResourceProvider* resource_provider); | 46 ResourceProvider* resource_provider); |
46 | 47 |
47 void DidChangeVisibility() override; | 48 void DidChangeVisibility() override; |
48 | 49 |
49 OutputSurface* output_surface_; | 50 OutputSurface* output_surface_; |
50 ResourceProvider* resource_provider_; | 51 ResourceProvider* resource_provider_; |
51 RendererCapabilitiesImpl capabilities_; | 52 RendererCapabilitiesImpl capabilities_; |
52 scoped_ptr<DelegatedFrameData> delegated_frame_data_; | 53 std::unique_ptr<DelegatedFrameData> delegated_frame_data_; |
53 | 54 |
54 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); | 55 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); |
55 }; | 56 }; |
56 | 57 |
57 } // namespace cc | 58 } // namespace cc |
58 | 59 |
59 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_ | 60 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_ |
OLD | NEW |