| Index: cc/prioritized_texture_manager.h
|
| diff --git a/cc/prioritized_texture_manager.h b/cc/prioritized_texture_manager.h
|
| index 439fe81e2bb20a9b4336488085b2e0e482571889..2a39777cbac70266f98ef121b43effd53206850a 100644
|
| --- a/cc/prioritized_texture_manager.h
|
| +++ b/cc/prioritized_texture_manager.h
|
| @@ -13,6 +13,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"
|
| @@ -35,9 +36,9 @@ class CCPriorityCalculator;
|
|
|
| class CCPrioritizedTextureManager {
|
| public:
|
| - static scoped_ptr<CCPrioritizedTextureManager> create(size_t maxMemoryLimitBytes, int maxTextureSize, int pool)
|
| + static scoped_ptr<CCPrioritizedTextureManager> create(size_t maxMemoryLimitBytes, int maxTextureSize, int pool, CCProxy* proxy)
|
| {
|
| - return make_scoped_ptr(new CCPrioritizedTextureManager(maxMemoryLimitBytes, maxTextureSize, pool));
|
| + return make_scoped_ptr(new CCPrioritizedTextureManager(maxMemoryLimitBytes, maxTextureSize, pool, proxy));
|
| }
|
| scoped_ptr<CCPrioritizedTexture> createTexture(IntSize size, GLenum format)
|
| {
|
| @@ -100,6 +101,8 @@ public:
|
| // Mark all textures' backings as being in the drawing impl tree.
|
| void updateBackingsInDrawingImplTree();
|
|
|
| + CCProxy* proxy() const { return m_proxy; }
|
| +
|
| private:
|
| friend class CCPrioritizedTextureTest;
|
|
|
| @@ -134,7 +137,7 @@ private:
|
| return a < b;
|
| }
|
|
|
| - CCPrioritizedTextureManager(size_t maxMemoryLimitBytes, int maxTextureSize, int pool);
|
| + CCPrioritizedTextureManager(size_t maxMemoryLimitBytes, int maxTextureSize, int pool, CCProxy* proxy);
|
|
|
| bool evictBackingsToReduceMemory(size_t limitBytes, EvictionPriorityPolicy, CCResourceProvider*);
|
| CCPrioritizedTexture::Backing* createBacking(IntSize, GLenum format, CCResourceProvider*);
|
| @@ -154,6 +157,7 @@ private:
|
| typedef base::hash_set<CCPrioritizedTexture*> TextureSet;
|
| typedef std::vector<CCPrioritizedTexture*> TextureVector;
|
|
|
| + CCProxy* 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
|
|
|