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

Unified Diff: cc/trees/layer_tree_settings.cc

Issue 2321883002: cc: Remove SetMemoryPolicy from OutputSurface and Display. (Closed)
Patch Set: blimp 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_settings.cc
diff --git a/cc/trees/layer_tree_settings.cc b/cc/trees/layer_tree_settings.cc
index 60ac1dc4e5d41c94740f4e18d823b197c617fdb4..dfc62573bf8f6dfde161e8b27eccc1c307c19c1c 100644
--- a/cc/trees/layer_tree_settings.cc
+++ b/cc/trees/layer_tree_settings.cc
@@ -13,9 +13,14 @@ LayerTreeSettings::LayerTreeSettings()
: default_tile_size(gfx::Size(256, 256)),
max_untiled_layer_size(gfx::Size(512, 512)),
minimum_occlusion_tracking_size(gfx::Size(160, 160)),
- memory_policy_(64 * 1024 * 1024,
- gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING,
- ManagedMemoryPolicy::kDefaultNumResourcesLimit) {}
+ gpu_memory_policy(64 * 1024 * 1024,
+ gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING,
+ ManagedMemoryPolicy::kDefaultNumResourcesLimit),
+ // These limits inherited from CompositorOutputSurface without
+ // explanation.
+ software_memory_policy(128 * 1024 * 1024,
+ gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE,
+ ManagedMemoryPolicy::kDefaultNumResourcesLimit) {}
LayerTreeSettings::LayerTreeSettings(const LayerTreeSettings& other) = default;
LayerTreeSettings::~LayerTreeSettings() = default;
@@ -79,7 +84,8 @@ bool LayerTreeSettings::operator==(const LayerTreeSettings& other) const {
wait_for_beginframe_interval == other.wait_for_beginframe_interval &&
max_staging_buffer_usage_in_bytes ==
other.max_staging_buffer_usage_in_bytes &&
- memory_policy_ == other.memory_policy_ &&
+ gpu_memory_policy == other.gpu_memory_policy &&
+ software_memory_policy == other.software_memory_policy &&
LayerTreeDebugState::Equal(initial_debug_state,
other.initial_debug_state) &&
use_cached_picture_raster == other.use_cached_picture_raster;

Powered by Google App Engine
This is Rietveld 408576698