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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 1139823008: Re-enable ForceReclaimResources w/ ui impl side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make expectations more constrained Created 5 years, 7 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 | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 if (CommitEarlyOutHandledCommit(reason)) { 290 if (CommitEarlyOutHandledCommit(reason)) {
291 active_tree_->ApplySentScrollAndScaleDeltasFromAbortedCommit(); 291 active_tree_->ApplySentScrollAndScaleDeltasFromAbortedCommit();
292 active_tree_->ResetContentsTexturesPurged(); 292 active_tree_->ResetContentsTexturesPurged();
293 } 293 }
294 } 294 }
295 295
296 void LayerTreeHostImpl::BeginCommit() { 296 void LayerTreeHostImpl::BeginCommit() {
297 TRACE_EVENT0("cc", "LayerTreeHostImpl::BeginCommit"); 297 TRACE_EVENT0("cc", "LayerTreeHostImpl::BeginCommit");
298 298
299 // Ensure all textures are returned so partial texture updates can happen 299 // Ensure all textures are returned so partial texture updates can happen
300 // during the commit. Impl-side-painting doesn't upload during commits, so 300 // during the commit.
301 // is unaffected. 301 // TODO(ericrk): We should not need to ForceReclaimResources when using
302 if (!settings_.impl_side_painting && output_surface_) 302 // Impl-side-painting as it doesn't upload during commits. However,
303 // Display::Draw currently relies on resource being reclaimed to block drawing
304 // between BeginCommit / Swap. See crbug.com/489515.
305 if (output_surface_)
303 output_surface_->ForceReclaimResources(); 306 output_surface_->ForceReclaimResources();
304 307
305 if (settings_.impl_side_painting && !proxy_->CommitToActiveTree()) 308 if (settings_.impl_side_painting && !proxy_->CommitToActiveTree())
306 CreatePendingTree(); 309 CreatePendingTree();
307 } 310 }
308 311
309 void LayerTreeHostImpl::CommitComplete() { 312 void LayerTreeHostImpl::CommitComplete() {
310 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete"); 313 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete");
311 314
312 // LayerTreeHost may have changed the GPU rasterization flags state, which 315 // LayerTreeHost may have changed the GPU rasterization flags state, which
(...skipping 3121 matching lines...) Expand 10 before | Expand all | Expand 10 after
3434 new_target.SetToMin(layer_impl->MaxScrollOffset()); 3437 new_target.SetToMin(layer_impl->MaxScrollOffset());
3435 3438
3436 curve->UpdateTarget( 3439 curve->UpdateTarget(
3437 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) 3440 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time)
3438 .InSecondsF(), 3441 .InSecondsF(),
3439 new_target); 3442 new_target);
3440 3443
3441 return true; 3444 return true;
3442 } 3445 }
3443 } // namespace cc 3446 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698