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

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

Issue 240163005: Deliver IPC messages together with SwapCompositorFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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_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 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 SetManagedMemoryPolicy(policy, zero_budget_); 1266 SetManagedMemoryPolicy(policy, zero_budget_);
1267 } 1267 }
1268 1268
1269 void LayerTreeHostImpl::SetTreeActivationCallback( 1269 void LayerTreeHostImpl::SetTreeActivationCallback(
1270 const base::Closure& callback) { 1270 const base::Closure& callback) {
1271 DCHECK(proxy_->IsImplThread()); 1271 DCHECK(proxy_->IsImplThread());
1272 DCHECK(settings_.impl_side_painting || callback.is_null()); 1272 DCHECK(settings_.impl_side_painting || callback.is_null());
1273 tree_activation_callback_ = callback; 1273 tree_activation_callback_ = callback;
1274 } 1274 }
1275 1275
1276 int LayerTreeHostImpl::GetSourceFrameNumber() {
1277 return active_tree_->source_frame_number();
1278 }
1279
1276 void LayerTreeHostImpl::SetManagedMemoryPolicy( 1280 void LayerTreeHostImpl::SetManagedMemoryPolicy(
1277 const ManagedMemoryPolicy& policy, bool zero_budget) { 1281 const ManagedMemoryPolicy& policy, bool zero_budget) {
1278 if (cached_managed_memory_policy_ == policy && zero_budget_ == zero_budget) 1282 if (cached_managed_memory_policy_ == policy && zero_budget_ == zero_budget)
1279 return; 1283 return;
1280 1284
1281 ManagedMemoryPolicy old_policy = ActualManagedMemoryPolicy(); 1285 ManagedMemoryPolicy old_policy = ActualManagedMemoryPolicy();
1282 1286
1283 cached_managed_memory_policy_ = policy; 1287 cached_managed_memory_policy_ = policy;
1284 zero_budget_ = zero_budget; 1288 zero_budget_ = zero_budget;
1285 ManagedMemoryPolicy actual_policy = ActualManagedMemoryPolicy(); 1289 ManagedMemoryPolicy actual_policy = ActualManagedMemoryPolicy();
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 swap_promise_monitor_.erase(monitor); 3135 swap_promise_monitor_.erase(monitor);
3132 } 3136 }
3133 3137
3134 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 3138 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
3135 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 3139 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3136 for (; it != swap_promise_monitor_.end(); it++) 3140 for (; it != swap_promise_monitor_.end(); it++)
3137 (*it)->OnSetNeedsRedrawOnImpl(); 3141 (*it)->OnSetNeedsRedrawOnImpl();
3138 } 3142 }
3139 3143
3140 } // namespace cc 3144 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698