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

Side by Side Diff: cc/layer_tree_host.cc

Issue 11363254: Set contents texture manager's limit to something reasonable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/prioritized_resource_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layer_tree_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "cc/font_atlas.h" 10 #include "cc/font_atlas.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 m_client->didRecreateOutputSurface(false); 168 m_client->didRecreateOutputSurface(false);
169 return; 169 return;
170 } 170 }
171 171
172 // Update m_settings based on capabilities that we got back from the rendere r. 172 // Update m_settings based on capabilities that we got back from the rendere r.
173 m_settings.acceleratePainting = m_proxy->rendererCapabilities().usingAcceler atedPainting; 173 m_settings.acceleratePainting = m_proxy->rendererCapabilities().usingAcceler atedPainting;
174 174
175 // Update m_settings based on partial update capability. 175 // Update m_settings based on partial update capability.
176 m_settings.maxPartialTextureUpdates = min(m_settings.maxPartialTextureUpdate s, m_proxy->maxPartialTextureUpdates()); 176 m_settings.maxPartialTextureUpdates = min(m_settings.maxPartialTextureUpdate s, m_proxy->maxPartialTextureUpdates());
177 177
178 m_contentsTextureManager = PrioritizedResourceManager::create(0, m_proxy->re ndererCapabilities().maxTextureSize, Renderer::ContentPool, m_proxy.get()); 178 m_contentsTextureManager = PrioritizedResourceManager::create(Renderer::Cont entPool, m_proxy.get());
179 m_surfaceMemoryPlaceholder = m_contentsTextureManager->createTexture(gfx::Si ze(), GL_RGBA); 179 m_surfaceMemoryPlaceholder = m_contentsTextureManager->createTexture(gfx::Si ze(), GL_RGBA);
180 180
181 m_rendererInitialized = true; 181 m_rendererInitialized = true;
182 182
183 m_settings.defaultTileSize = gfx::Size(min(m_settings.defaultTileSize.width( ), m_proxy->rendererCapabilities().maxTextureSize), 183 m_settings.defaultTileSize = gfx::Size(min(m_settings.defaultTileSize.width( ), m_proxy->rendererCapabilities().maxTextureSize),
184 min(m_settings.defaultTileSize.height (), m_proxy->rendererCapabilities().maxTextureSize)); 184 min(m_settings.defaultTileSize.height (), m_proxy->rendererCapabilities().maxTextureSize));
185 m_settings.maxUntiledLayerSize = gfx::Size(min(m_settings.maxUntiledLayerSiz e.width(), m_proxy->rendererCapabilities().maxTextureSize), 185 m_settings.maxUntiledLayerSize = gfx::Size(min(m_settings.maxUntiledLayerSiz e.width(), m_proxy->rendererCapabilities().maxTextureSize),
186 min(m_settings.maxUntiledLayerSiz e.height(), m_proxy->rendererCapabilities().maxTextureSize)); 186 min(m_settings.maxUntiledLayerSiz e.height(), m_proxy->rendererCapabilities().maxTextureSize));
187 } 187 }
188 188
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 else 852 else
853 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); 853 layer->notifyAnimationFinished(wallClockTime.ToDoubleT());
854 } 854 }
855 } 855 }
856 856
857 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 857 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
858 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 858 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
859 } 859 }
860 860
861 } // namespace cc 861 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/prioritized_resource_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698