Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1038)

Side by Side Diff: cc/delegating_renderer.h

Issue 11777025: cc: Implement DelegatingRender::drawFrame() method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for-landing Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/compositor_frame.cc ('k') | cc/delegating_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 OutputSurface;
15 class ResourceProvider; 16 class ResourceProvider;
16 17
17 class CC_EXPORT DelegatingRenderer : 18 class CC_EXPORT DelegatingRenderer :
18 public Renderer, 19 public Renderer,
19 public NON_EXPORTED_BASE( 20 public NON_EXPORTED_BASE(
20 WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback) 21 WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback)
21 { 22 {
22 public: 23 public:
23 static scoped_ptr<DelegatingRenderer> Create( 24 static scoped_ptr<DelegatingRenderer> Create(
24 RendererClient* client, ResourceProvider* resource_provider); 25 RendererClient* client,
26 OutputSurface* output_surface,
27 ResourceProvider* resource_provider);
25 virtual ~DelegatingRenderer(); 28 virtual ~DelegatingRenderer();
26 29
27 virtual const RendererCapabilities& capabilities() const OVERRIDE; 30 virtual const RendererCapabilities& capabilities() const OVERRIDE;
28 31
29 virtual void drawFrame(RenderPassList& render_passes_in_draw_order) OVERRIDE; 32 virtual void drawFrame(RenderPassList& render_passes_in_draw_order) OVERRIDE;
30 33
31 virtual void finish() OVERRIDE {} 34 virtual void finish() OVERRIDE {}
32 35
33 virtual bool swapBuffers() OVERRIDE; 36 virtual bool swapBuffers() OVERRIDE;
34 37
35 virtual void getFramebufferPixels(void *pixels, 38 virtual void getFramebufferPixels(void *pixels,
36 const gfx::Rect& rect) OVERRIDE; 39 const gfx::Rect& rect) OVERRIDE;
37 40
38 virtual void receiveCompositorFrameAck(const CompositorFrameAck&) OVERRIDE; 41 virtual void receiveCompositorFrameAck(const CompositorFrameAck&) OVERRIDE;
39 42
40 virtual bool isContextLost() OVERRIDE; 43 virtual bool isContextLost() OVERRIDE;
41 44
42 virtual void setVisible(bool) OVERRIDE; 45 virtual void setVisible(bool) OVERRIDE;
43 46
44 virtual void sendManagedMemoryStats(size_t bytes_visible, 47 virtual void sendManagedMemoryStats(size_t bytes_visible,
45 size_t bytes_visible_and_nearby, 48 size_t bytes_visible_and_nearby,
46 size_t bytes_allocated) OVERRIDE {} 49 size_t bytes_allocated) OVERRIDE {}
47 50
48 // WebGraphicsContext3D::WebGraphicsContextLostCallback implementation. 51 // WebGraphicsContext3D::WebGraphicsContextLostCallback implementation.
49 virtual void onContextLost() OVERRIDE; 52 virtual void onContextLost() OVERRIDE;
50 53
51 private: 54 private:
52 DelegatingRenderer(RendererClient* client, 55 DelegatingRenderer(RendererClient* client,
56 OutputSurface* output_surface,
53 ResourceProvider* resource_provider); 57 ResourceProvider* resource_provider);
54 bool Initialize(); 58 bool Initialize();
55 59
60 OutputSurface* output_surface_;
56 ResourceProvider* resource_provider_; 61 ResourceProvider* resource_provider_;
57 RendererCapabilities capabilities_; 62 RendererCapabilities capabilities_;
58 bool visible_; 63 bool visible_;
59 64
60 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); 65 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer);
61 }; 66 };
62 67
63 } // namespace cc 68 } // namespace cc
64 69
65 #endif // CC_DELEGATING_RENDERER_H_ 70 #endif // CC_DELEGATING_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/compositor_frame.cc ('k') | cc/delegating_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698