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

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

Issue 68893031: Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed cc animation unittest Created 7 years 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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 513
514 void LayerTreeHost::CollectRenderingStats(RenderingStats* stats) const { 514 void LayerTreeHost::CollectRenderingStats(RenderingStats* stats) const {
515 CHECK(debug_state_.RecordRenderingStats()); 515 CHECK(debug_state_.RecordRenderingStats());
516 *stats = rendering_stats_instrumentation_->GetRenderingStats(); 516 *stats = rendering_stats_instrumentation_->GetRenderingStats();
517 } 517 }
518 518
519 const RendererCapabilities& LayerTreeHost::GetRendererCapabilities() const { 519 const RendererCapabilities& LayerTreeHost::GetRendererCapabilities() const {
520 return proxy_->GetRendererCapabilities(); 520 return proxy_->GetRendererCapabilities();
521 } 521 }
522 522
523 void LayerTreeHost::SetNeedsAnimate() {
524 proxy_->SetNeedsAnimate();
525 }
526
527 void LayerTreeHost::SetNeedsUpdateLayers() { proxy_->SetNeedsUpdateLayers(); } 523 void LayerTreeHost::SetNeedsUpdateLayers() { proxy_->SetNeedsUpdateLayers(); }
528 524
529 void LayerTreeHost::SetNeedsCommit() { 525 void LayerTreeHost::SetNeedsCommit() {
530 if (!prepaint_callback_.IsCancelled()) { 526 if (!prepaint_callback_.IsCancelled()) {
531 TRACE_EVENT_INSTANT0("cc", 527 TRACE_EVENT_INSTANT0("cc",
532 "LayerTreeHost::SetNeedsCommit::cancel prepaint", 528 "LayerTreeHost::SetNeedsCommit::cancel prepaint",
533 TRACE_EVENT_SCOPE_THREAD); 529 TRACE_EVENT_SCOPE_THREAD);
534 prepaint_callback_.Cancel(); 530 prepaint_callback_.Cancel();
535 } 531 }
536 proxy_->SetNeedsCommit(); 532 proxy_->SetNeedsCommit();
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 swap_promise_list_.push_back(swap_promise.Pass()); 1251 swap_promise_list_.push_back(swap_promise.Pass());
1256 } 1252 }
1257 1253
1258 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1254 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1259 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1255 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1260 swap_promise_list_[i]->DidNotSwap(reason); 1256 swap_promise_list_[i]->DidNotSwap(reason);
1261 swap_promise_list_.clear(); 1257 swap_promise_list_.clear();
1262 } 1258 }
1263 1259
1264 } // namespace cc 1260 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698