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

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

Issue 1233003004: NotifyAllTileTasksCompleted for synchronous renderer compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
Patch Set: Created 5 years, 5 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_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 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 void LayerTreeHostImpl::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { 1342 void LayerTreeHostImpl::SetMemoryPolicy(const ManagedMemoryPolicy& policy) {
1343 SetManagedMemoryPolicy(policy); 1343 SetManagedMemoryPolicy(policy);
1344 1344
1345 // This is short term solution to synchronously drop tile resources when 1345 // This is short term solution to synchronously drop tile resources when
1346 // using synchronous compositing to avoid memory usage regression. 1346 // using synchronous compositing to avoid memory usage regression.
1347 // TODO(boliu): crbug.com/499004 to track removing this. 1347 // TODO(boliu): crbug.com/499004 to track removing this.
1348 if (!policy.bytes_limit_when_visible && resource_pool_ && 1348 if (!policy.bytes_limit_when_visible && resource_pool_ &&
1349 settings_.using_synchronous_renderer_compositor) { 1349 settings_.using_synchronous_renderer_compositor) {
1350 ReleaseTreeResources(); 1350 ReleaseTreeResources();
1351 CleanUpTileManager(); 1351 CleanUpTileManager();
1352
1353 // Force a call to NotifyAllTileTasks completed - otherwise this logic may
1354 // be skipped if no work was enqueued at the time the tile manager was
1355 // destroyed.
1356 NotifyAllTileTasksCompleted();
1357
1352 CreateTileManagerResources(); 1358 CreateTileManagerResources();
1353 RecreateTreeResources(); 1359 RecreateTreeResources();
1354 } 1360 }
1355 } 1361 }
1356 1362
1357 void LayerTreeHostImpl::SetTreeActivationCallback( 1363 void LayerTreeHostImpl::SetTreeActivationCallback(
1358 const base::Closure& callback) { 1364 const base::Closure& callback) {
1359 DCHECK(proxy_->IsImplThread()); 1365 DCHECK(proxy_->IsImplThread());
1360 tree_activation_callback_ = callback; 1366 tree_activation_callback_ = callback;
1361 } 1367 }
(...skipping 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after
3607 if (active_tree()) { 3613 if (active_tree()) {
3608 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); 3614 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id);
3609 if (layer) 3615 if (layer)
3610 return layer->ScrollOffsetForAnimation(); 3616 return layer->ScrollOffsetForAnimation();
3611 } 3617 }
3612 3618
3613 return gfx::ScrollOffset(); 3619 return gfx::ScrollOffset();
3614 } 3620 }
3615 3621
3616 } // namespace cc 3622 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698