| 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/layer_tree_host.h" | 5 #include "cc/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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 proxy_->SetVisible(visible); | 517 proxy_->SetVisible(visible); |
| 518 } | 518 } |
| 519 | 519 |
| 520 void LayerTreeHost::StartPageScaleAnimation(gfx::Vector2d target_offset, | 520 void LayerTreeHost::StartPageScaleAnimation(gfx::Vector2d target_offset, |
| 521 bool use_anchor, | 521 bool use_anchor, |
| 522 float scale, | 522 float scale, |
| 523 base::TimeDelta duration) { | 523 base::TimeDelta duration) { |
| 524 proxy_->StartPageScaleAnimation(target_offset, use_anchor, scale, duration); | 524 proxy_->StartPageScaleAnimation(target_offset, use_anchor, scale, duration); |
| 525 } | 525 } |
| 526 | 526 |
| 527 void LayerTreeHost::Composite() { | 527 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) { |
| 528 if (!proxy_->HasImplThread()) | 528 if (!proxy_->HasImplThread()) |
| 529 static_cast<SingleThreadProxy*>(proxy_.get())->CompositeImmediately(); | 529 static_cast<SingleThreadProxy*>(proxy_.get())->CompositeImmediately( |
| 530 frame_begin_time); |
| 530 else | 531 else |
| 531 SetNeedsCommit(); | 532 SetNeedsCommit(); |
| 532 } | 533 } |
| 533 | 534 |
| 534 void LayerTreeHost::ScheduleComposite() { | 535 void LayerTreeHost::ScheduleComposite() { |
| 535 client_->scheduleComposite(); | 536 client_->scheduleComposite(); |
| 536 } | 537 } |
| 537 | 538 |
| 538 bool LayerTreeHost::InitializeRendererIfNeeded() { | 539 bool LayerTreeHost::InitializeRendererIfNeeded() { |
| 539 if (!renderer_initialized_) { | 540 if (!renderer_initialized_) { |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 SetAnimationEventsRecursive(events, | 940 SetAnimationEventsRecursive(events, |
| 940 layer->children()[child_index].get(), | 941 layer->children()[child_index].get(), |
| 941 wall_clock_time); | 942 wall_clock_time); |
| 942 } | 943 } |
| 943 | 944 |
| 944 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 945 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
| 945 return proxy_->CapturePicture(); | 946 return proxy_->CapturePicture(); |
| 946 } | 947 } |
| 947 | 948 |
| 948 } // namespace cc | 949 } // namespace cc |
| OLD | NEW |