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

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

Issue 1052103002: Revert of cc: Make scheduling be driven by vsync for android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « cc/trees/layer_tree_host_impl.h ('k') | 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 10
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 resource_pool_->ReduceResourceUsage(); 1428 resource_pool_->ReduceResourceUsage();
1429 } 1429 }
1430 // If we're not visible, we likely released resources, so we want to 1430 // If we're not visible, we likely released resources, so we want to
1431 // aggressively flush here to make sure those DeleteTextures make it to the 1431 // aggressively flush here to make sure those DeleteTextures make it to the
1432 // GPU process to free up the memory. 1432 // GPU process to free up the memory.
1433 if (output_surface_->context_provider() && !visible_) { 1433 if (output_surface_->context_provider() && !visible_) {
1434 output_surface_->context_provider()->ContextGL()->ShallowFlushCHROMIUM(); 1434 output_surface_->context_provider()->ContextGL()->ShallowFlushCHROMIUM();
1435 } 1435 }
1436 } 1436 }
1437 1437
1438 void LayerTreeHostImpl::OnDraw() {
1439 client_->OnDrawForOutputSurface();
1440 }
1441
1442 void LayerTreeHostImpl::OnCanDrawStateChangedForTree() { 1438 void LayerTreeHostImpl::OnCanDrawStateChangedForTree() {
1443 client_->OnCanDrawStateChanged(CanDraw()); 1439 client_->OnCanDrawStateChanged(CanDraw());
1444 } 1440 }
1445 1441
1446 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { 1442 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const {
1447 CompositorFrameMetadata metadata; 1443 CompositorFrameMetadata metadata;
1448 metadata.device_scale_factor = device_scale_factor_; 1444 metadata.device_scale_factor = device_scale_factor_;
1449 metadata.page_scale_factor = active_tree_->current_page_scale_factor(); 1445 metadata.page_scale_factor = active_tree_->current_page_scale_factor();
1450 metadata.scrollable_viewport_size = active_tree_->ScrollableViewportSize(); 1446 metadata.scrollable_viewport_size = active_tree_->ScrollableViewportSize();
1451 metadata.root_layer_size = active_tree_->ScrollableSize(); 1447 metadata.root_layer_size = active_tree_->ScrollableSize();
(...skipping 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after
3420 new_target.SetToMin(layer_impl->MaxScrollOffset()); 3416 new_target.SetToMin(layer_impl->MaxScrollOffset());
3421 3417
3422 curve->UpdateTarget( 3418 curve->UpdateTarget(
3423 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) 3419 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time)
3424 .InSecondsF(), 3420 .InSecondsF(),
3425 new_target); 3421 new_target);
3426 3422
3427 return true; 3423 return true;
3428 } 3424 }
3429 } // namespace cc 3425 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698