diff options
Diffstat (limited to 'cc')
-rw-r--r-- | cc/layer_tree_host.cc | 2 | ||||
-rw-r--r-- | cc/prioritized_resource_manager.cc | 4 | ||||
-rw-r--r-- | cc/prioritized_resource_manager.h | 6 | ||||
-rw-r--r-- | cc/prioritized_resource_unittest.cc | 4 | ||||
-rw-r--r-- | cc/resource_update_controller_unittest.cc | 2 | ||||
-rw-r--r-- | cc/tiled_layer_unittest.cc | 2 |
6 files changed, 11 insertions, 9 deletions
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc index 2bafa67..5aca174 100644 --- a/cc/layer_tree_host.cc +++ b/cc/layer_tree_host.cc @@ -178,7 +178,7 @@ void LayerTreeHost::initializeRenderer() // Update m_settings based on partial update capability. m_settings.maxPartialTextureUpdates = min(m_settings.maxPartialTextureUpdates, m_proxy->maxPartialTextureUpdates()); - m_contentsTextureManager = PrioritizedResourceManager::create(0, m_proxy->rendererCapabilities().maxTextureSize, Renderer::ContentPool, m_proxy.get()); + m_contentsTextureManager = PrioritizedResourceManager::create(Renderer::ContentPool, m_proxy.get()); m_surfaceMemoryPlaceholder = m_contentsTextureManager->createTexture(gfx::Size(), GL_RGBA); m_rendererInitialized = true; diff --git a/cc/prioritized_resource_manager.cc b/cc/prioritized_resource_manager.cc index ba32324..9153440 100644 --- a/cc/prioritized_resource_manager.cc +++ b/cc/prioritized_resource_manager.cc @@ -15,9 +15,9 @@ using namespace std; namespace cc { -PrioritizedResourceManager::PrioritizedResourceManager(size_t maxMemoryLimitBytes, int, int pool, const Proxy* proxy) +PrioritizedResourceManager::PrioritizedResourceManager(int pool, const Proxy* proxy) : m_proxy(proxy) - , m_maxMemoryLimitBytes(maxMemoryLimitBytes) + , m_maxMemoryLimitBytes(defaultMemoryAllocationLimit()) , m_externalPriorityCutoff(PriorityCalculator::allowEverythingCutoff()) , m_memoryUseBytes(0) , m_memoryAboveCutoffBytes(0) diff --git a/cc/prioritized_resource_manager.h b/cc/prioritized_resource_manager.h index 7f98c16..1765593 100644 --- a/cc/prioritized_resource_manager.h +++ b/cc/prioritized_resource_manager.h @@ -37,9 +37,9 @@ class Proxy; class CC_EXPORT PrioritizedResourceManager { public: - static scoped_ptr<PrioritizedResourceManager> create(size_t maxMemoryLimitBytes, int maxTextureSize, int pool, const Proxy* proxy) + static scoped_ptr<PrioritizedResourceManager> create(int pool, const Proxy* proxy) { - return make_scoped_ptr(new PrioritizedResourceManager(maxMemoryLimitBytes, maxTextureSize, pool, proxy)); + return make_scoped_ptr(new PrioritizedResourceManager(pool, proxy)); } scoped_ptr<PrioritizedResource> createTexture(gfx::Size size, GLenum format) { @@ -146,7 +146,7 @@ private: return a < b; } - PrioritizedResourceManager(size_t maxMemoryLimitBytes, int maxTextureSize, int pool, const Proxy* proxy); + PrioritizedResourceManager(int pool, const Proxy* proxy); bool evictBackingsToReduceMemory(size_t limitBytes, int priorityCutoff, EvictionPolicy, ResourceProvider*); PrioritizedResource::Backing* createBacking(gfx::Size, GLenum format, ResourceProvider*); diff --git a/cc/prioritized_resource_unittest.cc b/cc/prioritized_resource_unittest.cc index a561f76..f418122 100644 --- a/cc/prioritized_resource_unittest.cc +++ b/cc/prioritized_resource_unittest.cc @@ -41,7 +41,9 @@ public: scoped_ptr<PrioritizedResourceManager> createManager(size_t maxTextures) { - return PrioritizedResourceManager::create(texturesMemorySize(maxTextures), 1024, 0, &m_proxy); + scoped_ptr<PrioritizedResourceManager> manager = PrioritizedResourceManager::create(0, &m_proxy); + manager->setMaxMemoryLimitBytes(texturesMemorySize(maxTextures)); + return manager.Pass(); } bool validateTexture(scoped_ptr<PrioritizedResource>& texture, bool requestLate) diff --git a/cc/resource_update_controller_unittest.cc b/cc/resource_update_controller_unittest.cc index 23248a0..fad3f26 100644 --- a/cc/resource_update_controller_unittest.cc +++ b/cc/resource_update_controller_unittest.cc @@ -65,7 +65,7 @@ public: ResourceUpdateControllerTest() : m_proxy(scoped_ptr<Thread>(NULL)) , m_queue(make_scoped_ptr(new ResourceUpdateQueue)) - , m_resourceManager(PrioritizedResourceManager::create(60*1024*1024, 1024, Renderer::ContentPool, &m_proxy)) + , m_resourceManager(PrioritizedResourceManager::create(Renderer::ContentPool, &m_proxy)) , m_fullUploadCountExpected(0) , m_partialCountExpected(0) , m_totalUploadCountExpected(0) diff --git a/cc/tiled_layer_unittest.cc b/cc/tiled_layer_unittest.cc index ab0707a..c1c81ca 100644 --- a/cc/tiled_layer_unittest.cc +++ b/cc/tiled_layer_unittest.cc @@ -59,7 +59,7 @@ public: { m_layerTreeHost = LayerTreeHost::create(&m_fakeLayerImplTreeHostClient, m_settings, scoped_ptr<Thread>(NULL)); m_proxy = m_layerTreeHost->proxy(); - m_resourceManager = PrioritizedResourceManager::create(60*1024*1024, 1024, Renderer::ContentPool, m_proxy); + m_resourceManager = PrioritizedResourceManager::create(Renderer::ContentPool, m_proxy); m_layerTreeHost->initializeRendererIfNeeded(); DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBlocked(m_proxy); m_resourceProvider = ResourceProvider::create(m_context.get()); |