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

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

Issue 240163005: Deliver IPC messages together with SwapCompositorFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable browsertest for android for realz this time Created 6 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 | Annotate | Revision Log
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_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 contents_textures_purged_(false), 87 contents_textures_purged_(false),
88 requires_high_res_to_draw_(false), 88 requires_high_res_to_draw_(false),
89 viewport_size_invalid_(false), 89 viewport_size_invalid_(false),
90 needs_update_draw_properties_(true), 90 needs_update_draw_properties_(true),
91 needs_full_tree_sync_(true), 91 needs_full_tree_sync_(true),
92 next_activation_forces_redraw_(false), 92 next_activation_forces_redraw_(false),
93 render_surface_layer_list_id_(0) { 93 render_surface_layer_list_id_(0) {
94 } 94 }
95 95
96 LayerTreeImpl::~LayerTreeImpl() { 96 LayerTreeImpl::~LayerTreeImpl() {
97 BreakSwapPromises(SwapPromise::SWAP_FAILS);
98
97 // Need to explicitly clear the tree prior to destroying this so that 99 // Need to explicitly clear the tree prior to destroying this so that
98 // the LayerTreeImpl pointer is still valid in the LayerImpl dtor. 100 // the LayerTreeImpl pointer is still valid in the LayerImpl dtor.
99 DCHECK(!root_layer_); 101 DCHECK(!root_layer_);
100 DCHECK(layers_with_copy_output_request_.empty()); 102 DCHECK(layers_with_copy_output_request_.empty());
101 } 103 }
102 104
103 void LayerTreeImpl::Shutdown() { root_layer_.reset(); } 105 void LayerTreeImpl::Shutdown() { root_layer_.reset(); }
104 106
105 void LayerTreeImpl::ReleaseResources() { 107 void LayerTreeImpl::ReleaseResources() {
106 if (root_layer_) 108 if (root_layer_)
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 if (layer == OuterViewportScrollLayer()) 925 if (layer == OuterViewportScrollLayer())
924 return outer_viewport_offset; 926 return outer_viewport_offset;
925 927
926 inner_viewport_offset = delegate_offset - outer_viewport_offset; 928 inner_viewport_offset = delegate_offset - outer_viewport_offset;
927 929
928 return inner_viewport_offset; 930 return inner_viewport_offset;
929 } 931 }
930 932
931 void LayerTreeImpl::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) { 933 void LayerTreeImpl::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) {
932 DCHECK(swap_promise); 934 DCHECK(swap_promise);
933 if (swap_promise_list_.size() > kMaxQueuedSwapPromiseNumber)
934 BreakSwapPromises(SwapPromise::SWAP_PROMISE_LIST_OVERFLOW);
935 swap_promise_list_.push_back(swap_promise.Pass()); 935 swap_promise_list_.push_back(swap_promise.Pass());
936 } 936 }
937 937
938 void LayerTreeImpl::PassSwapPromises( 938 void LayerTreeImpl::PassSwapPromises(
939 ScopedPtrVector<SwapPromise>* new_swap_promise) { 939 ScopedPtrVector<SwapPromise>* new_swap_promise) {
940 swap_promise_list_.insert_and_take(swap_promise_list_.end(), 940 swap_promise_list_.insert_and_take(swap_promise_list_.end(),
941 *new_swap_promise); 941 *new_swap_promise);
942 new_swap_promise->clear(); 942 new_swap_promise->clear();
943 } 943 }
944 944
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 1375
1376 void LayerTreeImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 1376 void LayerTreeImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
1377 layer_tree_host_impl_->UnregisterPictureLayerImpl(layer); 1377 layer_tree_host_impl_->UnregisterPictureLayerImpl(layer);
1378 } 1378 }
1379 1379
1380 void LayerTreeImpl::InputScrollAnimationFinished() { 1380 void LayerTreeImpl::InputScrollAnimationFinished() {
1381 layer_tree_host_impl_->ScrollEnd(); 1381 layer_tree_host_impl_->ScrollEnd();
1382 } 1382 }
1383 1383
1384 } // namespace cc 1384 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698