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

Side by Side Diff: cc/renderer.h

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ScaleAsVector Created 8 years, 1 month 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/render_surface_impl.cc ('k') | cc/scoped_texture.h » ('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 CCRenderer_h 5 #ifndef CCRenderer_h
6 #define CCRenderer_h 6 #define CCRenderer_h
7 7
8 #include "FloatQuad.h" 8 #include "FloatQuad.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "cc/layer_tree_host.h" 10 #include "cc/layer_tree_host.h"
11 #include "cc/managed_memory_policy.h" 11 #include "cc/managed_memory_policy.h"
12 #include "cc/render_pass.h" 12 #include "cc/render_pass.h"
13 13
14 namespace cc { 14 namespace cc {
15 15
16 class ScopedTexture; 16 class ScopedTexture;
17 17
18 class RendererClient { 18 class RendererClient {
19 public: 19 public:
20 virtual const IntSize& deviceViewportSize() const = 0; 20 virtual const gfx::Size& deviceViewportSize() const = 0;
21 virtual const LayerTreeSettings& settings() const = 0; 21 virtual const LayerTreeSettings& settings() const = 0;
22 virtual void didLoseContext() = 0; 22 virtual void didLoseContext() = 0;
23 virtual void onSwapBuffersComplete() = 0; 23 virtual void onSwapBuffersComplete() = 0;
24 virtual void setFullRootLayerDamage() = 0; 24 virtual void setFullRootLayerDamage() = 0;
25 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; 25 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0;
26 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; 26 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0;
27 protected: 27 protected:
28 virtual ~RendererClient() { } 28 virtual ~RendererClient() { }
29 }; 29 };
30 30
(...skipping 23 matching lines...) Expand all
54 54
55 virtual void drawFrame(const RenderPassList&, const RenderPassIdHashMap&) = 0; 55 virtual void drawFrame(const RenderPassList&, const RenderPassIdHashMap&) = 0;
56 56
57 // waits for rendering to finish 57 // waits for rendering to finish
58 virtual void finish() = 0; 58 virtual void finish() = 0;
59 59
60 virtual void doNoOp() { } 60 virtual void doNoOp() { }
61 // puts backbuffer onscreen 61 // puts backbuffer onscreen
62 virtual bool swapBuffers() = 0; 62 virtual bool swapBuffers() = 0;
63 63
64 virtual void getFramebufferPixels(void *pixels, const IntRect&) = 0; 64 virtual void getFramebufferPixels(void *pixels, const gfx::Rect&) = 0;
65 65
66 virtual bool isContextLost(); 66 virtual bool isContextLost();
67 67
68 virtual void setVisible(bool) = 0; 68 virtual void setVisible(bool) = 0;
69 69
70 virtual void sendManagedMemoryStats(size_t bytesVisible, size_t bytesVisible AndNearby, size_t bytesAllocated) = 0; 70 virtual void sendManagedMemoryStats(size_t bytesVisible, size_t bytesVisible AndNearby, size_t bytesAllocated) = 0;
71 71
72 protected: 72 protected:
73 explicit Renderer(RendererClient* client) 73 explicit Renderer(RendererClient* client)
74 : m_client(client) 74 : m_client(client)
75 { 75 {
76 } 76 }
77 77
78 RendererClient* m_client; 78 RendererClient* m_client;
79 79
80 DISALLOW_COPY_AND_ASSIGN(Renderer); 80 DISALLOW_COPY_AND_ASSIGN(Renderer);
81 }; 81 };
82 82
83 } 83 }
84 84
85 #endif // CCRenderer_h 85 #endif // CCRenderer_h
OLDNEW
« no previous file with comments | « cc/render_surface_impl.cc ('k') | cc/scoped_texture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698