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

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

Issue 16304003: Unified OutputSurface::SwapBuffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to 205473 Created 7 years, 6 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/output/renderer.h ('k') | cc/output/software_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_OUTPUT_SOFTWARE_RENDERER_H_ 5 #ifndef CC_OUTPUT_SOFTWARE_RENDERER_H_
6 #define CC_OUTPUT_SOFTWARE_RENDERER_H_ 6 #define CC_OUTPUT_SOFTWARE_RENDERER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.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/compositor_frame.h"
(...skipping 15 matching lines...) Expand all
26 26
27 class CC_EXPORT SoftwareRenderer : public DirectRenderer { 27 class CC_EXPORT SoftwareRenderer : public DirectRenderer {
28 public: 28 public:
29 static scoped_ptr<SoftwareRenderer> Create( 29 static scoped_ptr<SoftwareRenderer> Create(
30 RendererClient* client, 30 RendererClient* client,
31 OutputSurface* output_surface, 31 OutputSurface* output_surface,
32 ResourceProvider* resource_provider); 32 ResourceProvider* resource_provider);
33 33
34 virtual ~SoftwareRenderer(); 34 virtual ~SoftwareRenderer();
35 virtual const RendererCapabilities& Capabilities() const OVERRIDE; 35 virtual const RendererCapabilities& Capabilities() const OVERRIDE;
36 virtual void ViewportChanged() OVERRIDE;
37 virtual void Finish() OVERRIDE; 36 virtual void Finish() OVERRIDE;
38 virtual void SwapBuffers(const ui::LatencyInfo& latency_info) OVERRIDE; 37 virtual void SwapBuffers() OVERRIDE;
39 virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) OVERRIDE; 38 virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) OVERRIDE;
40 virtual void SetVisible(bool visible) OVERRIDE; 39 virtual void SetVisible(bool visible) OVERRIDE;
41 virtual void SendManagedMemoryStats( 40 virtual void SendManagedMemoryStats(
42 size_t bytes_visible, 41 size_t bytes_visible,
43 size_t bytes_visible_and_nearby, 42 size_t bytes_visible_and_nearby,
44 size_t bytes_allocated) OVERRIDE {} 43 size_t bytes_allocated) OVERRIDE {}
45 virtual void ReceiveCompositorFrameAck( 44 virtual void ReceiveSwapBuffersAck(
46 const CompositorFrameAck& ack) OVERRIDE; 45 const CompositorFrameAck& ack) OVERRIDE;
47 46
48 protected: 47 protected:
49 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE; 48 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE;
50 virtual bool BindFramebufferToTexture( 49 virtual bool BindFramebufferToTexture(
51 DrawingFrame* frame, 50 DrawingFrame* frame,
52 const ScopedResource* texture, 51 const ScopedResource* texture,
53 gfx::Rect target_rect) OVERRIDE; 52 gfx::Rect target_rect) OVERRIDE;
54 virtual void SetDrawViewport(gfx::Rect window_space_viewport) OVERRIDE; 53 virtual void SetDrawViewport(gfx::Rect window_space_viewport) OVERRIDE;
55 virtual void SetScissorTestRect(gfx::Rect scissor_rect) OVERRIDE; 54 virtual void SetScissorTestRect(gfx::Rect scissor_rect) OVERRIDE;
(...skipping 29 matching lines...) Expand all
85 void DrawTileQuad(const DrawingFrame* frame, 84 void DrawTileQuad(const DrawingFrame* frame,
86 const TileDrawQuad* quad); 85 const TileDrawQuad* quad);
87 void DrawRenderPassQuad(const DrawingFrame* frame, 86 void DrawRenderPassQuad(const DrawingFrame* frame,
88 const RenderPassDrawQuad* quad); 87 const RenderPassDrawQuad* quad);
89 void DrawUnsupportedQuad(const DrawingFrame* frame, 88 void DrawUnsupportedQuad(const DrawingFrame* frame,
90 const DrawQuad* quad); 89 const DrawQuad* quad);
91 90
92 RendererCapabilities capabilities_; 91 RendererCapabilities capabilities_;
93 bool visible_; 92 bool visible_;
94 bool is_scissor_enabled_; 93 bool is_scissor_enabled_;
95 bool is_viewport_changed_;
96 gfx::Rect scissor_rect_; 94 gfx::Rect scissor_rect_;
97 95
98 SoftwareOutputDevice* output_device_; 96 SoftwareOutputDevice* output_device_;
99 SkCanvas* root_canvas_; 97 SkCanvas* root_canvas_;
100 SkCanvas* current_canvas_; 98 SkCanvas* current_canvas_;
101 SkPaint current_paint_; 99 SkPaint current_paint_;
102 scoped_ptr<ResourceProvider::ScopedWriteLockSoftware> 100 scoped_ptr<ResourceProvider::ScopedWriteLockSoftware>
103 current_framebuffer_lock_; 101 current_framebuffer_lock_;
104 CompositorFrame compositor_frame_; 102 scoped_ptr<SoftwareFrameData> current_frame_data_;
105 103
106 DISALLOW_COPY_AND_ASSIGN(SoftwareRenderer); 104 DISALLOW_COPY_AND_ASSIGN(SoftwareRenderer);
107 }; 105 };
108 106
109 } // namespace cc 107 } // namespace cc
110 108
111 #endif // CC_OUTPUT_SOFTWARE_RENDERER_H_ 109 #endif // CC_OUTPUT_SOFTWARE_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/renderer.h ('k') | cc/output/software_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698