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

Side by Side Diff: blimp/client/support/compositor/blimp_layer_tree_settings.cc

Issue 2321883002: cc: Remove SetMemoryPolicy from OutputSurface and Display. (Closed)
Patch Set: nits Created 4 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 unified diff | Download patch
« no previous file with comments | « android_webview/browser/surfaces_instance.h ('k') | cc/output/output_surface.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/client/support/compositor/blimp_layer_tree_settings.h" 5 #include "blimp/client/support/compositor/blimp_layer_tree_settings.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 settings->scrollbar_fade_resize_delay_ms = 500; 94 settings->scrollbar_fade_resize_delay_ms = 500;
95 settings->scrollbar_fade_duration_ms = 300; 95 settings->scrollbar_fade_duration_ms = 300;
96 96
97 // When pinching in, only show the pinch-viewport overlay scrollbars if the 97 // When pinching in, only show the pinch-viewport overlay scrollbars if the
98 // page scale is at least some threshold away from the minimum. i.e. don't 98 // page scale is at least some threshold away from the minimum. i.e. don't
99 // show the pinch scrollbars when at minimum scale. 99 // show the pinch scrollbars when at minimum scale.
100 // TODO(dtrainor): Update this since https://crrev.com/1267603004 landed. 100 // TODO(dtrainor): Update this since https://crrev.com/1267603004 landed.
101 // settings->scrollbar_show_scale_threshold = 1.05f; 101 // settings->scrollbar_show_scale_threshold = 1.05f;
102 #endif 102 #endif
103 103
104 // Set the GpuMemoryPolicy. 104 // Set the gpu memory policy.
105 cc::ManagedMemoryPolicy memory_policy = settings->memory_policy_; 105 cc::ManagedMemoryPolicy& memory_policy = settings->gpu_memory_policy;
106 memory_policy.bytes_limit_when_visible = 0; 106 memory_policy.bytes_limit_when_visible = 0;
107 107
108 #if defined(OS_ANDROID) 108 #if defined(OS_ANDROID)
109 // We can't query available GPU memory from the system on Android. 109 // We can't query available GPU memory from the system on Android.
110 // Physical memory is also mis-reported sometimes (eg. Nexus 10 reports 110 // Physical memory is also mis-reported sometimes (eg. Nexus 10 reports
111 // 1262MB when it actually has 2GB, while Razr M has 1GB but only reports 111 // 1262MB when it actually has 2GB, while Razr M has 1GB but only reports
112 // 128MB java heap size). First we estimate physical memory using both. 112 // 128MB java heap size). First we estimate physical memory using both.
113 size_t dalvik_mb = base::SysInfo::DalvikHeapSizeMB(); 113 size_t dalvik_mb = base::SysInfo::DalvikHeapSizeMB();
114 size_t physical_mb = base::SysInfo::AmountOfPhysicalMemoryMB(); 114 size_t physical_mb = base::SysInfo::AmountOfPhysicalMemoryMB();
115 size_t physical_memory_mb = 0; 115 size_t physical_memory_mb = 0;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 #endif 212 #endif
213 settings->default_tile_size.SetSize(default_tile_size, default_tile_size); 213 settings->default_tile_size.SetSize(default_tile_size, default_tile_size);
214 214
215 settings->renderer_settings.buffer_to_texture_target_map = 215 settings->renderer_settings.buffer_to_texture_target_map =
216 BlimpGpuMemoryBufferManager::GetDefaultBufferToTextureTargetMap(); 216 BlimpGpuMemoryBufferManager::GetDefaultBufferToTextureTargetMap();
217 settings->use_output_surface_begin_frame_source = true; 217 settings->use_output_surface_begin_frame_source = true;
218 } 218 }
219 219
220 } // namespace client 220 } // namespace client
221 } // namespace blimp 221 } // namespace blimp
OLDNEW
« no previous file with comments | « android_webview/browser/surfaces_instance.h ('k') | cc/output/output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698