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

Unified Diff: cc/prioritized_resource_manager.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/prioritized_resource.cc ('k') | cc/prioritized_resource_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/prioritized_resource_manager.h
diff --git a/cc/prioritized_resource_manager.h b/cc/prioritized_resource_manager.h
index 929f72fba87ed437f3b2f36cedd1596905a884c0..13676ae86784c6836aa1b983bff6a649fa959863 100644
--- a/cc/prioritized_resource_manager.h
+++ b/cc/prioritized_resource_manager.h
@@ -12,6 +12,7 @@
#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
#include "cc/cc_export.h"
+#include "cc/proxy.h"
#include "cc/prioritized_resource.h"
#include "cc/priority_calculator.h"
#include "cc/texture.h"
@@ -32,12 +33,13 @@ struct hash<cc::PrioritizedResource*> {
namespace cc {
class PriorityCalculator;
+class Proxy;
class CC_EXPORT PrioritizedResourceManager {
public:
- static scoped_ptr<PrioritizedResourceManager> create(size_t maxMemoryLimitBytes, int maxTextureSize, int pool)
+ static scoped_ptr<PrioritizedResourceManager> create(size_t maxMemoryLimitBytes, int maxTextureSize, int pool, const Proxy* proxy)
{
- return make_scoped_ptr(new PrioritizedResourceManager(maxMemoryLimitBytes, maxTextureSize, pool));
+ return make_scoped_ptr(new PrioritizedResourceManager(maxMemoryLimitBytes, maxTextureSize, pool, proxy));
}
scoped_ptr<PrioritizedResource> createTexture(gfx::Size size, GLenum format)
{
@@ -108,6 +110,8 @@ public:
// Mark all textures' backings as being in the drawing impl tree.
void updateBackingsInDrawingImplTree();
+ const Proxy* proxyForDebug() const;
+
private:
friend class PrioritizedResourceTest;
@@ -142,7 +146,7 @@ private:
return a < b;
}
- PrioritizedResourceManager(size_t maxMemoryLimitBytes, int maxTextureSize, int pool);
+ PrioritizedResourceManager(size_t maxMemoryLimitBytes, int maxTextureSize, int pool, const Proxy* proxy);
bool evictBackingsToReduceMemory(size_t limitBytes, int priorityCutoff, EvictionPolicy, ResourceProvider*);
PrioritizedResource::Backing* createBacking(gfx::Size, GLenum format, ResourceProvider*);
@@ -168,6 +172,8 @@ private:
typedef base::hash_set<PrioritizedResource*> TextureSet;
typedef std::vector<PrioritizedResource*> TextureVector;
+ const Proxy* m_proxy;
+
TextureSet m_textures;
// This list is always sorted in eviction order, with the exception the
// newly-allocated or recycled textures at the very end of the tail that
« no previous file with comments | « cc/prioritized_resource.cc ('k') | cc/prioritized_resource_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698