| 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> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
| 12 #include "cc/output/compositor_frame.h" | 12 #include "cc/output/compositor_frame.h" |
| 13 #include "cc/output/renderer.h" | 13 #include "cc/output/renderer.h" |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 | 16 |
| 17 class OutputSurface; | 17 class OutputSurface; |
| 18 class ResourceProvider; | 18 class ResourceProvider; |
| 19 | 19 |
| 20 class CC_EXPORT DelegatingRenderer : public Renderer { | 20 class CC_EXPORT DelegatingRenderer : public Renderer { |
| 21 public: | 21 public: |
| 22 DelegatingRenderer(RendererClient* client, | 22 DelegatingRenderer(const RendererSettings* settings, |
| 23 const RendererSettings* settings, | |
| 24 OutputSurface* output_surface, | 23 OutputSurface* output_surface, |
| 25 ResourceProvider* resource_provider); | 24 ResourceProvider* resource_provider); |
| 26 ~DelegatingRenderer() override; | 25 ~DelegatingRenderer() override; |
| 27 | 26 |
| 28 const RendererCapabilitiesImpl& Capabilities() const override; | 27 const RendererCapabilitiesImpl& Capabilities() const override; |
| 29 | 28 |
| 30 void DrawFrame(RenderPassList* render_passes_in_draw_order, | 29 void DrawFrame(RenderPassList* render_passes_in_draw_order, |
| 31 float device_scale_factor, | 30 float device_scale_factor, |
| 32 const gfx::ColorSpace& device_color_space, | 31 const gfx::ColorSpace& device_color_space, |
| 33 const gfx::Rect& device_viewport_rect, | 32 const gfx::Rect& device_viewport_rect, |
| 34 const gfx::Rect& device_clip_rect) override; | 33 const gfx::Rect& device_clip_rect) override; |
| 35 | 34 |
| 36 void SwapBuffers(CompositorFrameMetadata metadata) override; | 35 void SwapBuffers(CompositorFrameMetadata metadata) override; |
| 37 void ReclaimResources(const ReturnedResourceArray&) override; | 36 void ReclaimResources(const ReturnedResourceArray&) override; |
| 38 | 37 |
| 39 private: | 38 private: |
| 40 void DidChangeVisibility() override {} | |
| 41 | |
| 42 OutputSurface* output_surface_; | 39 OutputSurface* output_surface_; |
| 43 ResourceProvider* resource_provider_; | 40 ResourceProvider* resource_provider_; |
| 44 RendererCapabilitiesImpl capabilities_; | 41 RendererCapabilitiesImpl capabilities_; |
| 45 std::unique_ptr<DelegatedFrameData> delegated_frame_data_; | 42 std::unique_ptr<DelegatedFrameData> delegated_frame_data_; |
| 46 | 43 |
| 47 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); | 44 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); |
| 48 }; | 45 }; |
| 49 | 46 |
| 50 } // namespace cc | 47 } // namespace cc |
| 51 | 48 |
| 52 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_ | 49 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_ |
| OLD | NEW |