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_DELEGATING_RENDERER_H_ | 5 #ifndef CC_DELEGATING_RENDERER_H_ |
6 #define CC_DELEGATING_RENDERER_H_ | 6 #define CC_DELEGATING_RENDERER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
10 #include "cc/renderer.h" | 10 #include "cc/renderer.h" |
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 | 14 |
15 class ResourceProvider; | 15 class ResourceProvider; |
16 | 16 |
17 class CC_EXPORT DelegatingRenderer : | 17 class CC_EXPORT DelegatingRenderer : |
18 public Renderer, | 18 public Renderer, |
19 public NON_EXPORTED_BASE( | 19 public NON_EXPORTED_BASE( |
20 WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback) | 20 WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback) |
21 { | 21 { |
22 public: | 22 public: |
23 static scoped_ptr<DelegatingRenderer> Create( | 23 static scoped_ptr<DelegatingRenderer> Create( |
24 RendererClient* client, ResourceProvider* resource_provider); | 24 RendererClient* client, ResourceProvider* resource_provider); |
25 virtual ~DelegatingRenderer(); | 25 virtual ~DelegatingRenderer(); |
26 | 26 |
27 virtual const RendererCapabilities& capabilities() const OVERRIDE; | 27 virtual const RendererCapabilities& capabilities() const OVERRIDE; |
28 | 28 |
29 virtual void drawFrame(RenderPassList& render_passes_in_draw_order, | 29 virtual void drawFrame(RenderPassList& render_passes_in_draw_order) OVERRIDE; |
30 RenderPassIdHashMap& render_passes_by_id) OVERRIDE; | |
31 | 30 |
32 virtual void finish() OVERRIDE {} | 31 virtual void finish() OVERRIDE {} |
33 | 32 |
34 virtual bool swapBuffers() OVERRIDE; | 33 virtual bool swapBuffers() OVERRIDE; |
35 | 34 |
36 virtual void getFramebufferPixels(void *pixels, | 35 virtual void getFramebufferPixels(void *pixels, |
37 const gfx::Rect& rect) OVERRIDE; | 36 const gfx::Rect& rect) OVERRIDE; |
38 | 37 |
39 virtual void receiveCompositorFrameAck(const CompositorFrameAck&) OVERRIDE; | 38 virtual void receiveCompositorFrameAck(const CompositorFrameAck&) OVERRIDE; |
40 | 39 |
(...skipping 16 matching lines...) Expand all Loading... |
57 ResourceProvider* resource_provider_; | 56 ResourceProvider* resource_provider_; |
58 RendererCapabilities capabilities_; | 57 RendererCapabilities capabilities_; |
59 bool visible_; | 58 bool visible_; |
60 | 59 |
61 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); | 60 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); |
62 }; | 61 }; |
63 | 62 |
64 } // namespace cc | 63 } // namespace cc |
65 | 64 |
66 #endif // CC_DELEGATING_RENDERER_H_ | 65 #endif // CC_DELEGATING_RENDERER_H_ |
OLD | NEW |