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

Unified Diff: cc/prioritized_texture_manager.h

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 165444 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
Index: cc/prioritized_texture_manager.h
diff --git a/cc/prioritized_texture_manager.h b/cc/prioritized_texture_manager.h
index 92d739f25a9f7e32e7d245e09a2de9876fbcb682..b0127dbaeff88ef93ef48e54000cbc4a92642768 100644
--- a/cc/prioritized_texture_manager.h
+++ b/cc/prioritized_texture_manager.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
+#include "cc/proxy.h"
#include "cc/prioritized_texture.h"
#include "cc/priority_calculator.h"
#include "cc/texture.h"
@@ -31,12 +32,13 @@ struct hash<cc::PrioritizedTexture*> {
namespace cc {
class PriorityCalculator;
+class Proxy;
class PrioritizedTextureManager {
public:
- static scoped_ptr<PrioritizedTextureManager> create(size_t maxMemoryLimitBytes, int maxTextureSize, int pool)
+ static scoped_ptr<PrioritizedTextureManager> create(size_t maxMemoryLimitBytes, int maxTextureSize, int pool, const Proxy* proxy)
{
- return make_scoped_ptr(new PrioritizedTextureManager(maxMemoryLimitBytes, maxTextureSize, pool));
+ return make_scoped_ptr(new PrioritizedTextureManager(maxMemoryLimitBytes, maxTextureSize, pool, proxy));
}
scoped_ptr<PrioritizedTexture> createTexture(gfx::Size size, GLenum format)
{
@@ -107,6 +109,8 @@ public:
// Mark all textures' backings as being in the drawing impl tree.
void updateBackingsInDrawingImplTree();
+ const Proxy* proxyForDebug() const;
+
private:
friend class PrioritizedTextureTest;
@@ -141,7 +145,7 @@ private:
return a < b;
}
- PrioritizedTextureManager(size_t maxMemoryLimitBytes, int maxTextureSize, int pool);
+ PrioritizedTextureManager(size_t maxMemoryLimitBytes, int maxTextureSize, int pool, const Proxy* proxy);
bool evictBackingsToReduceMemory(size_t limitBytes, int priorityCutoff, EvictionPolicy, ResourceProvider*);
PrioritizedTexture::Backing* createBacking(gfx::Size, GLenum format, ResourceProvider*);
@@ -167,6 +171,8 @@ private:
typedef base::hash_set<PrioritizedTexture*> TextureSet;
typedef std::vector<PrioritizedTexture*> 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

Powered by Google App Engine
This is Rietveld 408576698