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

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: okay let's call it SetNeedsUpdateLayers Created 7 years, 1 month 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 519
520 void LayerTreeHost::CollectRenderingStats(RenderingStats* stats) const { 520 void LayerTreeHost::CollectRenderingStats(RenderingStats* stats) const {
521 CHECK(debug_state_.RecordRenderingStats()); 521 CHECK(debug_state_.RecordRenderingStats());
522 *stats = rendering_stats_instrumentation_->GetRenderingStats(); 522 *stats = rendering_stats_instrumentation_->GetRenderingStats();
523 } 523 }
524 524
525 const RendererCapabilities& LayerTreeHost::GetRendererCapabilities() const { 525 const RendererCapabilities& LayerTreeHost::GetRendererCapabilities() const {
526 return proxy_->GetRendererCapabilities(); 526 return proxy_->GetRendererCapabilities();
527 } 527 }
528 528
529 void LayerTreeHost::SetNeedsAnimate() {
530 DCHECK(proxy_->HasImplThread());
531 proxy_->SetNeedsAnimate();
532 }
533
534 void LayerTreeHost::SetNeedsUpdateLayers() { proxy_->SetNeedsUpdateLayers(); } 529 void LayerTreeHost::SetNeedsUpdateLayers() { proxy_->SetNeedsUpdateLayers(); }
535 530
536 void LayerTreeHost::SetNeedsCommit() { 531 void LayerTreeHost::SetNeedsCommit() {
537 if (!prepaint_callback_.IsCancelled()) { 532 if (!prepaint_callback_.IsCancelled()) {
538 TRACE_EVENT_INSTANT0("cc", 533 TRACE_EVENT_INSTANT0("cc",
539 "LayerTreeHost::SetNeedsCommit::cancel prepaint", 534 "LayerTreeHost::SetNeedsCommit::cancel prepaint",
540 TRACE_EVENT_SCOPE_THREAD); 535 TRACE_EVENT_SCOPE_THREAD);
541 prepaint_callback_.Cancel(); 536 prepaint_callback_.Cancel();
542 } 537 }
543 proxy_->SetNeedsCommit(); 538 proxy_->SetNeedsCommit();
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 1259
1265 bool LayerTreeHost::ScheduleMicroBenchmark( 1260 bool LayerTreeHost::ScheduleMicroBenchmark(
1266 const std::string& benchmark_name, 1261 const std::string& benchmark_name,
1267 scoped_ptr<base::Value> value, 1262 scoped_ptr<base::Value> value,
1268 const MicroBenchmark::DoneCallback& callback) { 1263 const MicroBenchmark::DoneCallback& callback) {
1269 return micro_benchmark_controller_.ScheduleRun( 1264 return micro_benchmark_controller_.ScheduleRun(
1270 benchmark_name, value.Pass(), callback); 1265 benchmark_name, value.Pass(), callback);
1271 } 1266 }
1272 1267
1273 } // namespace cc 1268 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698