Chromium Code Reviews| 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 { |
| 21 public: | 21 public: |
| 22 static std::unique_ptr<DelegatingRenderer> Create( | 22 DelegatingRenderer(OutputSurface* output_surface, |
| 23 RendererClient* client, | 23 ResourceProvider* resource_provider); |
| 24 const RendererSettings* settings, | 24 ~DelegatingRenderer(); |
| 25 OutputSurface* output_surface, | |
| 26 ResourceProvider* resource_provider); | |
| 27 ~DelegatingRenderer() override; | |
| 28 | 25 |
| 29 const RendererCapabilitiesImpl& Capabilities() const override; | 26 const RendererCapabilitiesImpl& Capabilities() const { return capabilities_; } |
| 30 | 27 |
| 31 void DrawFrame(RenderPassList* render_passes_in_draw_order, | 28 void DrawFrame(RenderPassList* render_passes_in_draw_order, |
| 32 float device_scale_factor, | 29 float device_scale_factor, |
| 33 const gfx::ColorSpace& device_color_space, | 30 const gfx::ColorSpace& device_color_space, |
| 34 const gfx::Rect& device_viewport_rect, | 31 const gfx::Rect& device_viewport_rect, |
| 35 const gfx::Rect& device_clip_rect) override; | 32 const gfx::Rect& device_clip_rect); |
| 33 void SwapBuffers(CompositorFrameMetadata metadata); | |
| 36 | 34 |
| 37 void Finish() override {} | 35 // REMOVE THIS. |
|
enne (OOO)
2016/08/08 21:41:18
Are you going to remove this here?
| |
| 36 void Finish() {} | |
| 38 | 37 |
| 39 void SwapBuffers(CompositorFrameMetadata metadata) override; | 38 void ReclaimResources(const ReturnedResourceArray&); |
| 40 void ReclaimResources(const ReturnedResourceArray&) override; | 39 |
| 40 void SetVisible(bool visible); | |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 DelegatingRenderer(RendererClient* client, | 43 OutputSurface* const output_surface_; |
| 44 const RendererSettings* settings, | 44 ResourceProvider* const resource_provider_; |
| 45 OutputSurface* output_surface, | |
| 46 ResourceProvider* resource_provider); | |
| 47 | |
| 48 void DidChangeVisibility() override; | |
| 49 | |
| 50 OutputSurface* output_surface_; | |
| 51 ResourceProvider* resource_provider_; | |
| 52 RendererCapabilitiesImpl capabilities_; | 45 RendererCapabilitiesImpl capabilities_; |
| 46 bool visible_ = true; | |
| 53 std::unique_ptr<DelegatedFrameData> delegated_frame_data_; | 47 std::unique_ptr<DelegatedFrameData> delegated_frame_data_; |
| 54 | 48 |
| 55 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); | 49 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); |
| 56 }; | 50 }; |
| 57 | 51 |
| 58 } // namespace cc | 52 } // namespace cc |
| 59 | 53 |
| 60 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_ | 54 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_ |
| OLD | NEW |