Fix crash when using remote DevTools on CrOS WebUI - check for response_headers
[chromium-blink-merge.git] / cc / output / delegating_renderer.h
blob2649bcbf30315ec454c105fb9197b76c24dc4134
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.
5 #ifndef CC_OUTPUT_DELEGATING_RENDERER_H_
6 #define CC_OUTPUT_DELEGATING_RENDERER_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h"
10 #include "cc/output/compositor_frame.h"
11 #include "cc/output/renderer.h"
13 namespace cc {
15 class OutputSurface;
16 class ResourceProvider;
18 class CC_EXPORT DelegatingRenderer : public Renderer {
19 public:
20 static scoped_ptr<DelegatingRenderer> Create(
21 RendererClient* client,
22 const LayerTreeSettings* settings,
23 OutputSurface* output_surface,
24 ResourceProvider* resource_provider);
25 virtual ~DelegatingRenderer();
27 virtual const RendererCapabilitiesImpl& Capabilities() const OVERRIDE;
29 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order,
30 float device_scale_factor,
31 const gfx::Rect& device_viewport_rect,
32 const gfx::Rect& device_clip_rect,
33 bool disable_picture_quad_image_filtering) OVERRIDE;
35 virtual void Finish() OVERRIDE {}
37 virtual void SwapBuffers(const CompositorFrameMetadata& metadata) OVERRIDE;
38 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck&) OVERRIDE;
40 virtual bool IsContextLost() OVERRIDE;
42 virtual void SendManagedMemoryStats(size_t bytes_visible,
43 size_t bytes_visible_and_nearby,
44 size_t bytes_allocated) OVERRIDE;
46 private:
47 DelegatingRenderer(RendererClient* client,
48 const LayerTreeSettings* settings,
49 OutputSurface* output_surface,
50 ResourceProvider* resource_provider);
52 virtual void DidChangeVisibility() OVERRIDE;
54 OutputSurface* output_surface_;
55 ResourceProvider* resource_provider_;
56 RendererCapabilitiesImpl capabilities_;
57 scoped_ptr<DelegatedFrameData> delegated_frame_data_;
59 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer);
62 } // namespace cc
64 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_