OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_OUTPUT_DELEGATING_RENDERER_H_ |
| 6 #define CC_OUTPUT_DELEGATING_RENDERER_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/output/compositor_frame.h" |
| 10 #include "cc/output/renderer.h" |
| 11 |
| 12 namespace cc { |
| 13 |
| 14 class OutputSurface; |
| 15 class ResourceProvider; |
| 16 |
| 17 class DelegatingRenderer : public Renderer { |
| 18 public: |
| 19 static scoped_ptr<DelegatingRenderer> Create( |
| 20 RendererClient* client, |
| 21 const RendererSettings* settings, |
| 22 OutputSurface* output_surface, |
| 23 ResourceProvider* resource_provider); |
| 24 ~DelegatingRenderer() override; |
| 25 |
| 26 const RendererCapabilitiesImpl& Capabilities() const override; |
| 27 |
| 28 void DrawFrame(RenderPassList* render_passes_in_draw_order, |
| 29 float device_scale_factor, |
| 30 const gfx::Rect& device_viewport_rect, |
| 31 const gfx::Rect& device_clip_rect, |
| 32 bool disable_picture_quad_image_filtering) override; |
| 33 |
| 34 void Finish() override {} |
| 35 |
| 36 void SwapBuffers(const CompositorFrameMetadata& metadata) override; |
| 37 void ReceiveSwapBuffersAck(const CompositorFrameAck&) override; |
| 38 |
| 39 private: |
| 40 DelegatingRenderer(RendererClient* client, |
| 41 const RendererSettings* settings, |
| 42 OutputSurface* output_surface, |
| 43 ResourceProvider* resource_provider); |
| 44 |
| 45 void DidChangeVisibility() override; |
| 46 |
| 47 OutputSurface* output_surface_; |
| 48 ResourceProvider* resource_provider_; |
| 49 RendererCapabilitiesImpl capabilities_; |
| 50 scoped_ptr<DelegatedFrameData> delegated_frame_data_; |
| 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); |
| 53 }; |
| 54 |
| 55 } // namespace cc |
| 56 |
| 57 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_ |
OLD | NEW |