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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1235203003: WIP cc: remove unused and legacy GetMappedMemoryLimit code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « cc/test/test_web_graphics_context_3d.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 89d2ef5b173b512dc7eaf3699d2900cca159c3e2..8c29fd3d733f46f19d874a4adb53082134811d2c 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -129,29 +129,6 @@ void DidVisibilityChange(LayerTreeHostImpl* id, bool visible) {
TRACE_EVENT_ASYNC_END0("cc", "LayerTreeHostImpl::SetVisible", id);
}
-size_t GetMaxTransferBufferUsageBytes(
- const ContextProvider::Capabilities& context_capabilities,
- double refresh_rate) {
- // We want to make sure the default transfer buffer size is equal to the
- // amount of data that can be uploaded by the compositor to avoid stalling
- // the pipeline.
- // For reference Chromebook Pixel can upload 1MB in about 0.5ms.
- const size_t kMaxBytesUploadedPerMs = 1024 * 1024 * 2;
-
- // We need to upload at least enough work to keep the GPU process busy until
- // the next time it can handle a request to start more uploads from the
- // compositor. We assume that it will pick up any sent upload requests within
- // the time of a vsync, since the browser will want to swap a frame within
- // that time interval, and then uploads should have a chance to be processed.
- size_t ms_per_frame = std::floor(1000.0 / refresh_rate);
- size_t max_transfer_buffer_usage_bytes =
- ms_per_frame * kMaxBytesUploadedPerMs;
-
- // The context may request a lower limit based on the device capabilities.
- return std::min(context_capabilities.max_transfer_buffer_usage_bytes,
- max_transfer_buffer_usage_bytes);
-}
-
size_t GetMaxStagingResourceCount() {
// Upper bound for number of staging resource to allow.
return 32;
« no previous file with comments | « cc/test/test_web_graphics_context_3d.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698