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

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

Issue 1327343003: Force swap buffers when re-creating the buffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-scanout
Patch Set: Created 5 years, 3 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
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 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 // GPU process to free up the memory. 1437 // GPU process to free up the memory.
1438 if (output_surface_->context_provider() && !visible_) { 1438 if (output_surface_->context_provider() && !visible_) {
1439 output_surface_->context_provider()->ContextGL()->ShallowFlushCHROMIUM(); 1439 output_surface_->context_provider()->ContextGL()->ShallowFlushCHROMIUM();
1440 } 1440 }
1441 } 1441 }
1442 1442
1443 void LayerTreeHostImpl::OnDraw() { 1443 void LayerTreeHostImpl::OnDraw() {
1444 client_->OnDrawForOutputSurface(); 1444 client_->OnDrawForOutputSurface();
1445 } 1445 }
1446 1446
1447 void LayerTreeHostImpl::ForceSwap() {
1448 SetNeedsCommit();
1449 }
1450
1447 void LayerTreeHostImpl::OnCanDrawStateChangedForTree() { 1451 void LayerTreeHostImpl::OnCanDrawStateChangedForTree() {
1448 client_->OnCanDrawStateChanged(CanDraw()); 1452 client_->OnCanDrawStateChanged(CanDraw());
1449 } 1453 }
1450 1454
1451 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { 1455 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const {
1452 CompositorFrameMetadata metadata; 1456 CompositorFrameMetadata metadata;
1453 metadata.device_scale_factor = device_scale_factor_; 1457 metadata.device_scale_factor = device_scale_factor_;
1454 metadata.page_scale_factor = active_tree_->current_page_scale_factor(); 1458 metadata.page_scale_factor = active_tree_->current_page_scale_factor();
1455 metadata.scrollable_viewport_size = active_tree_->ScrollableViewportSize(); 1459 metadata.scrollable_viewport_size = active_tree_->ScrollableViewportSize();
1456 metadata.root_layer_size = active_tree_->ScrollableSize(); 1460 metadata.root_layer_size = active_tree_->ScrollableSize();
(...skipping 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after
3612 if (active_tree()) { 3616 if (active_tree()) {
3613 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); 3617 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id);
3614 if (layer) 3618 if (layer)
3615 return layer->ScrollOffsetForAnimation(); 3619 return layer->ScrollOffsetForAnimation();
3616 } 3620 }
3617 3621
3618 return gfx::ScrollOffset(); 3622 return gfx::ScrollOffset();
3619 } 3623 }
3620 3624
3621 } // namespace cc 3625 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698