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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 23463042: LayerTreeHost should not modify the LayerTreeSettings object. Instead it should use a temporary va… (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Fix the patch to pass tests Created 7 years, 2 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.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index e3a1b32924839b697d18d135ad0b816ef3711d81..13c0984c1ea07a0885de4b924aa2fc20fca8b46a 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -130,6 +130,7 @@ LayerTreeHost::LayerTreeHost(LayerTreeHostClient* client,
background_color_(SK_ColorWHITE),
has_transparent_background_(false),
partial_texture_update_requests_(0),
+ max_partial_texture_updates_(settings_.max_partial_texture_updates),
danakj 2013/10/03 17:42:26 Can we initialize this to 0?
in_paint_layer_contents_(false),
total_frames_used_for_lcd_text_metrics_(0),
tree_id_(s_next_tree_id++) {
@@ -205,7 +206,7 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) {
if (success) {
output_surface_lost_ = false;
- // Update settings_ based on partial update capability.
+ // Update max_partial_texture_updates_ based on partial update capability.
size_t max_partial_texture_updates = 0;
if (proxy_->GetRendererCapabilities().allow_partial_texture_updates &&
!settings_.impl_side_painting) {
@@ -213,7 +214,7 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) {
settings_.max_partial_texture_updates,
proxy_->MaxPartialTextureUpdates());
}
- settings_.max_partial_texture_updates = max_partial_texture_updates;
+ max_partial_texture_updates_ = max_partial_texture_updates;
if (!contents_texture_manager_ &&
(!settings_.impl_side_painting || !settings_.solid_color_scrollbars)) {
@@ -1119,7 +1120,7 @@ void LayerTreeHost::RateLimit() {
}
bool LayerTreeHost::RequestPartialTextureUpdate() {
- if (partial_texture_update_requests_ >= settings_.max_partial_texture_updates)
+ if (partial_texture_update_requests_ >= MaxPartialTextureUpdates())
return false;
partial_texture_update_requests_++;

Powered by Google App Engine
This is Rietveld 408576698