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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1324413003: Move gpu memory calculations to Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove more memory alloc codes. Created 5 years, 3 months 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/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index fa3ba0e599df1d93f2bbd0fdf3c7ce6f33c2a9cd..e167d64909f8e640eac259cc9896d133699e6e39 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -129,16 +129,6 @@ void DidVisibilityChange(LayerTreeHostImpl* id, bool visible) {
TRACE_EVENT_ASYNC_END0("cc", "LayerTreeHostImpl::SetVisible", id);
}
-size_t GetDefaultMemoryAllocationLimit() {
- // TODO(ccameron): (http://crbug.com/137094) This 64MB default is a straggler
- // from the old texture manager and is just to give us a default memory
- // allocation before we get a callback from the GPU memory manager. We
- // should probaby either:
- // - wait for the callback before rendering anything instead
- // - push this into the GPU memory manager somehow.
- return 64 * 1024 * 1024;
-}
-
} // namespace
LayerTreeHostImpl::FrameData::FrameData()
@@ -188,10 +178,7 @@ LayerTreeHostImpl::LayerTreeHostImpl(
root_layer_scroll_offset_delegate_(NULL),
settings_(settings),
visible_(true),
- cached_managed_memory_policy_(
- GetDefaultMemoryAllocationLimit(),
- gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING,
- ManagedMemoryPolicy::kDefaultNumResourcesLimit),
+ cached_managed_memory_policy_(settings.memory_policy_),
is_synchronous_single_threaded_(!proxy->HasImplThread() &&
!settings.single_thread_proxy_scheduler),
// Must be initialized after is_synchronous_single_threaded_ and proxy_.

Powered by Google App Engine
This is Rietveld 408576698