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

Side by Side Diff: cc/output/delegating_renderer.h

Issue 14960006: cc: Don't do CompositeAndReadback when using DelegatingRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « no previous file | cc/output/delegating_renderer.cc » ('j') | cc/trees/thread_proxy.cc » ('J')
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_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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/output/compositor_frame.h"
10 #include "cc/output/renderer.h" 11 #include "cc/output/renderer.h"
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
12 13
13 namespace cc { 14 namespace cc {
14 15
15 class OutputSurface; 16 class OutputSurface;
16 class ResourceProvider; 17 class ResourceProvider;
17 18
18 class CC_EXPORT DelegatingRenderer : public Renderer { 19 class CC_EXPORT DelegatingRenderer : public Renderer {
19 public: 20 public:
20 static scoped_ptr<DelegatingRenderer> Create( 21 static scoped_ptr<DelegatingRenderer> Create(
21 RendererClient* client, 22 RendererClient* client,
22 OutputSurface* output_surface, 23 OutputSurface* output_surface,
23 ResourceProvider* resource_provider); 24 ResourceProvider* resource_provider);
24 virtual ~DelegatingRenderer(); 25 virtual ~DelegatingRenderer();
25 26
26 virtual const RendererCapabilities& Capabilities() const OVERRIDE; 27 virtual const RendererCapabilities& Capabilities() const OVERRIDE;
27 28
29 virtual bool CanReadPixels() const OVERRIDE;
30
28 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order) OVERRIDE; 31 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order) OVERRIDE;
29 32
30 virtual void Finish() OVERRIDE {} 33 virtual void Finish() OVERRIDE {}
31 34
32 virtual void SwapBuffers(const LatencyInfo& latency_info) OVERRIDE; 35 virtual void SwapBuffers(const LatencyInfo& latency_info) OVERRIDE;
33 36
34 virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) OVERRIDE; 37 virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) OVERRIDE;
35 38
36 virtual void ReceiveCompositorFrameAck(const CompositorFrameAck&) OVERRIDE; 39 virtual void ReceiveCompositorFrameAck(const CompositorFrameAck&) OVERRIDE;
37 40
38 virtual bool IsContextLost() OVERRIDE; 41 virtual bool IsContextLost() OVERRIDE;
39 42
40 virtual void SetVisible(bool visible) OVERRIDE; 43 virtual void SetVisible(bool visible) OVERRIDE;
41 44
42 virtual void SendManagedMemoryStats(size_t bytes_visible, 45 virtual void SendManagedMemoryStats(size_t bytes_visible,
43 size_t bytes_visible_and_nearby, 46 size_t bytes_visible_and_nearby,
44 size_t bytes_allocated) OVERRIDE {} 47 size_t bytes_allocated) OVERRIDE {}
45 48
46 private: 49 private:
47 DelegatingRenderer(RendererClient* client, 50 DelegatingRenderer(RendererClient* client,
48 OutputSurface* output_surface, 51 OutputSurface* output_surface,
49 ResourceProvider* resource_provider); 52 ResourceProvider* resource_provider);
50 bool Initialize(); 53 bool Initialize();
51 54
52 OutputSurface* output_surface_; 55 OutputSurface* output_surface_;
53 ResourceProvider* resource_provider_; 56 ResourceProvider* resource_provider_;
54 RendererCapabilities capabilities_; 57 RendererCapabilities capabilities_;
58 CompositorFrame frame_for_swap_buffers_;
55 bool visible_; 59 bool visible_;
56 RenderPassList render_passes_for_swap_buffers_;
57 60
58 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); 61 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer);
59 }; 62 };
60 63
61 } // namespace cc 64 } // namespace cc
62 65
63 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_ 66 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/delegating_renderer.cc » ('j') | cc/trees/thread_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698