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 <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 | 595 |
596 void LayerTreeHost::SetVisible(bool visible) { | 596 void LayerTreeHost::SetVisible(bool visible) { |
597 if (visible_ == visible) | 597 if (visible_ == visible) |
598 return; | 598 return; |
599 visible_ = visible; | 599 visible_ = visible; |
600 if (!visible) | 600 if (!visible) |
601 ReduceMemoryUsage(); | 601 ReduceMemoryUsage(); |
602 proxy_->SetVisible(visible); | 602 proxy_->SetVisible(visible); |
603 } | 603 } |
604 | 604 |
605 void LayerTreeHost::SetLatencyInfo(const LatencyInfo& latency_info) { | 605 void LayerTreeHost::SetLatencyInfo(const ui::LatencyInfo& latency_info) { |
606 latency_info_.MergeWith(latency_info); | 606 latency_info_.MergeWith(latency_info); |
607 } | 607 } |
608 | 608 |
609 void LayerTreeHost::StartPageScaleAnimation(gfx::Vector2d target_offset, | 609 void LayerTreeHost::StartPageScaleAnimation(gfx::Vector2d target_offset, |
610 bool use_anchor, | 610 bool use_anchor, |
611 float scale, | 611 float scale, |
612 base::TimeDelta duration) { | 612 base::TimeDelta duration) { |
613 pending_page_scale_animation_.reset(new PendingPageScaleAnimation); | 613 pending_page_scale_animation_.reset(new PendingPageScaleAnimation); |
614 pending_page_scale_animation_->target_offset = target_offset; | 614 pending_page_scale_animation_->target_offset = target_offset; |
615 pending_page_scale_animation_->use_anchor = use_anchor; | 615 pending_page_scale_animation_->use_anchor = use_anchor; |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 bool start_ready_animations = true; | 1076 bool start_ready_animations = true; |
1077 (*iter).second->UpdateState(start_ready_animations, NULL); | 1077 (*iter).second->UpdateState(start_ready_animations, NULL); |
1078 } | 1078 } |
1079 } | 1079 } |
1080 | 1080 |
1081 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 1081 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
1082 return proxy_->CapturePicture(); | 1082 return proxy_->CapturePicture(); |
1083 } | 1083 } |
1084 | 1084 |
1085 } // namespace cc | 1085 } // namespace cc |
OLD | NEW |