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

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 case for the method name 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
« no previous file with comments | « cc/trees/layer_tree_host.h ('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.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 34f4d2f65d29a0d4d956cef669870e988b1d6240..7bece089d9541c4410a21e1a54ef41dece3b4a2b 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -205,16 +205,6 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) {
if (success) {
output_surface_lost_ = false;
- // Update settings_ based on partial update capability.
- size_t max_partial_texture_updates = 0;
- if (proxy_->GetRendererCapabilities().allow_partial_texture_updates &&
- !settings_.impl_side_painting) {
- max_partial_texture_updates = std::min(
- settings_.max_partial_texture_updates,
- proxy_->MaxPartialTextureUpdates());
- }
- settings_.max_partial_texture_updates = max_partial_texture_updates;
-
if (!contents_texture_manager_ &&
(!settings_.impl_side_painting || !settings_.solid_color_scrollbars)) {
contents_texture_manager_ =
@@ -1124,8 +1114,19 @@ bool LayerTreeHost::AlwaysUsePartialTextureUpdates() {
return !proxy_->HasImplThread();
}
+size_t LayerTreeHost::MaxPartialTextureUpdates() const {
+ size_t max_partial_texture_updates = 0;
+ if (proxy_->GetRendererCapabilities().allow_partial_texture_updates &&
+ !settings_.impl_side_painting) {
+ max_partial_texture_updates =
+ std::min(settings_.max_partial_texture_updates,
+ proxy_->MaxPartialTextureUpdates());
+ }
+ return max_partial_texture_updates;
+}
+
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_++;
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698