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

Unified Diff: cc/trees/layer_tree_settings.cc

Issue 1835523002: cc: Add LayerTreeSetting to disable cached picture raster. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use LayerTreeSettings for cached picture raster. Created 4 years, 9 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 cb4d42718e5b7d8790a42cd9a9789e6e54de3e59..28f7b98265dad1eb880641d9966884188466f58e 100644
--- a/cc/trees/layer_tree_settings.cc
+++ b/cc/trees/layer_tree_settings.cc
@@ -104,7 +104,8 @@ LayerTreeSettings::LayerTreeSettings()
max_staging_buffer_usage_in_bytes(32 * 1024 * 1024),
memory_policy_(64 * 1024 * 1024,
gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING,
- ManagedMemoryPolicy::kDefaultNumResourcesLimit) {}
+ ManagedMemoryPolicy::kDefaultNumResourcesLimit),
+ use_cached_picture_raster(true) {}
LayerTreeSettings::LayerTreeSettings(const LayerTreeSettings& other) = default;
@@ -171,7 +172,8 @@ bool LayerTreeSettings::operator==(const LayerTreeSettings& other) const {
other.max_staging_buffer_usage_in_bytes &&
memory_policy_ == other.memory_policy_ &&
LayerTreeDebugState::Equal(initial_debug_state,
- other.initial_debug_state);
+ other.initial_debug_state) &&
+ use_cached_picture_raster == other.use_cached_picture_raster;
}
void LayerTreeSettings::ToProtobuf(proto::LayerTreeSettings* proto) const {
@@ -231,6 +233,7 @@ void LayerTreeSettings::ToProtobuf(proto::LayerTreeSettings* proto) const {
max_staging_buffer_usage_in_bytes);
memory_policy_.ToProtobuf(proto->mutable_memory_policy());
initial_debug_state.ToProtobuf(proto->mutable_initial_debug_state());
+ proto->set_use_cached_picture_raster(use_cached_picture_raster);
for (unsigned u : use_image_texture_targets)
proto->add_use_image_texture_targets(u);
@@ -294,6 +297,7 @@ void LayerTreeSettings::FromProtobuf(const proto::LayerTreeSettings& proto) {
max_staging_buffer_usage_in_bytes = proto.max_staging_buffer_usage_in_bytes();
memory_policy_.FromProtobuf(proto.memory_policy());
initial_debug_state.FromProtobuf(proto.initial_debug_state());
+ use_cached_picture_raster = proto.use_cached_picture_raster();
for (int i = 0; i < proto.use_image_texture_targets_size(); ++i)
use_image_texture_targets.push_back(proto.use_image_texture_targets(i));

Powered by Google App Engine
This is Rietveld 408576698