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

Side by Side Diff: cc/renderer.h

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Apply code review comments 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
« no previous file with comments | « cc/render_surface_unittest.cc ('k') | cc/resource_provider.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 CC_RENDERER_H_ 5 #ifndef CC_RENDERER_H_
6 #define CC_RENDERER_H_ 6 #define CC_RENDERER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "cc/cc_export.h" 9 #include "cc/cc_export.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 CC_EXPORT RendererClient { 18 class CC_EXPORT RendererClient {
19 public: 19 public:
20 virtual const gfx::Size& 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 virtual bool hasImplThread() const = 0;
27 protected: 28 protected:
28 virtual ~RendererClient() { } 29 virtual ~RendererClient() { }
29 }; 30 };
30 31
31 class CC_EXPORT Renderer { 32 class CC_EXPORT Renderer {
32 public: 33 public:
33 // This enum defines the various resource pools for the ResourceProvider 34 // This enum defines the various resource pools for the ResourceProvider
34 // where textures get allocated. 35 // where textures get allocated.
35 enum ResourcePool { 36 enum ResourcePool {
36 ImplPool = 1, // This pool is for textures that get allocated on the impl thread (e.g. RenderSurfaces). 37 ImplPool = 1, // This pool is for textures that get allocated on the impl thread (e.g. RenderSurfaces).
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 77 }
77 78
78 RendererClient* m_client; 79 RendererClient* m_client;
79 80
80 DISALLOW_COPY_AND_ASSIGN(Renderer); 81 DISALLOW_COPY_AND_ASSIGN(Renderer);
81 }; 82 };
82 83
83 } 84 }
84 85
85 #endif // CC_RENDERER_H_ 86 #endif // CC_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/render_surface_unittest.cc ('k') | cc/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698