| OLD | NEW |
| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 } | 503 } |
| 504 | 504 |
| 505 void LayerTreeHost::SetNeedsAnimate() { | 505 void LayerTreeHost::SetNeedsAnimate() { |
| 506 DCHECK(proxy_->HasImplThread()); | 506 DCHECK(proxy_->HasImplThread()); |
| 507 proxy_->SetNeedsAnimate(); | 507 proxy_->SetNeedsAnimate(); |
| 508 } | 508 } |
| 509 | 509 |
| 510 void LayerTreeHost::SetNeedsCommit() { | 510 void LayerTreeHost::SetNeedsCommit() { |
| 511 if (!prepaint_callback_.IsCancelled()) { | 511 if (!prepaint_callback_.IsCancelled()) { |
| 512 TRACE_EVENT_INSTANT0("cc", | 512 TRACE_EVENT_INSTANT0("cc", |
| 513 "LayerTreeHost::SetNeedsCommit::cancel prepaint"); | 513 "LayerTreeHost::SetNeedsCommit::cancel prepaint", |
| 514 TRACE_EVENT_SCOPE_THREAD); |
| 514 prepaint_callback_.Cancel(); | 515 prepaint_callback_.Cancel(); |
| 515 } | 516 } |
| 516 proxy_->SetNeedsCommit(); | 517 proxy_->SetNeedsCommit(); |
| 517 } | 518 } |
| 518 | 519 |
| 519 void LayerTreeHost::SetNeedsFullTreeSync() { | 520 void LayerTreeHost::SetNeedsFullTreeSync() { |
| 520 needs_full_tree_sync_ = true; | 521 needs_full_tree_sync_ = true; |
| 521 SetNeedsCommit(); | 522 SetNeedsCommit(); |
| 522 } | 523 } |
| 523 | 524 |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 SetAnimationEventsRecursive(events, | 1048 SetAnimationEventsRecursive(events, |
| 1048 layer->children()[child_index].get(), | 1049 layer->children()[child_index].get(), |
| 1049 wall_clock_time); | 1050 wall_clock_time); |
| 1050 } | 1051 } |
| 1051 | 1052 |
| 1052 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 1053 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
| 1053 return proxy_->CapturePicture(); | 1054 return proxy_->CapturePicture(); |
| 1054 } | 1055 } |
| 1055 | 1056 |
| 1056 } // namespace cc | 1057 } // namespace cc |
| OLD | NEW |