| Index: cc/prioritized_texture_manager.h
|
| diff --git a/cc/prioritized_texture_manager.h b/cc/prioritized_texture_manager.h
|
| index e358fcbb535b71ddb393fcef033e27e81dbc0ca5..68dd1e1332b5b740b055c124c2c1c8cf9b826500 100644
|
| --- a/cc/prioritized_texture_manager.h
|
| +++ b/cc/prioritized_texture_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_texture.h"
|
| #include "cc/priority_calculator.h"
|
| #include "cc/texture.h"
|
| @@ -32,12 +33,13 @@ struct hash<cc::PrioritizedTexture*> {
|
| namespace cc {
|
|
|
| class PriorityCalculator;
|
| +class Proxy;
|
|
|
| class CC_EXPORT 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)
|
| {
|
| @@ -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 PrioritizedTextureTest;
|
|
|
| @@ -142,7 +146,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*);
|
| @@ -168,6 +172,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
|
|
|