| 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 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 | 658 |
| 659 void LayerTreeHost::SetViewportSize(const gfx::Size& device_viewport_size) { | 659 void LayerTreeHost::SetViewportSize(const gfx::Size& device_viewport_size) { |
| 660 if (device_viewport_size == device_viewport_size_) | 660 if (device_viewport_size == device_viewport_size_) |
| 661 return; | 661 return; |
| 662 | 662 |
| 663 device_viewport_size_ = device_viewport_size; | 663 device_viewport_size_ = device_viewport_size; |
| 664 | 664 |
| 665 SetNeedsCommit(); | 665 SetNeedsCommit(); |
| 666 } | 666 } |
| 667 | 667 |
| 668 void LayerTreeHost::SetTopControlsShrinkBlinkSize(bool shrink) { | 668 void LayerTreeHost::SetTopControlsHeight(float height, bool shrink) { |
| 669 if (top_controls_shrink_blink_size_ == shrink) | 669 if (top_controls_height_ == height && |
| 670 top_controls_shrink_blink_size_ == shrink) |
| 670 return; | 671 return; |
| 671 | 672 |
| 673 top_controls_height_ = height; |
| 672 top_controls_shrink_blink_size_ = shrink; | 674 top_controls_shrink_blink_size_ = shrink; |
| 673 SetNeedsCommit(); | 675 SetNeedsCommit(); |
| 674 } | 676 } |
| 675 | 677 |
| 676 void LayerTreeHost::SetTopControlsHeight(float height) { | |
| 677 if (top_controls_height_ == height) | |
| 678 return; | |
| 679 | |
| 680 top_controls_height_ = height; | |
| 681 SetNeedsCommit(); | |
| 682 } | |
| 683 | |
| 684 void LayerTreeHost::SetTopControlsShownRatio(float ratio) { | 678 void LayerTreeHost::SetTopControlsShownRatio(float ratio) { |
| 685 if (top_controls_shown_ratio_ == ratio) | 679 if (top_controls_shown_ratio_ == ratio) |
| 686 return; | 680 return; |
| 687 | 681 |
| 688 top_controls_shown_ratio_ = ratio; | 682 top_controls_shown_ratio_ = ratio; |
| 689 SetNeedsCommit(); | 683 SetNeedsCommit(); |
| 690 } | 684 } |
| 691 | 685 |
| 692 void LayerTreeHost::ApplyPageScaleDeltaFromImplSide(float page_scale_delta) { | 686 void LayerTreeHost::ApplyPageScaleDeltaFromImplSide(float page_scale_delta) { |
| 693 DCHECK(CommitRequested()); | 687 DCHECK(CommitRequested()); |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 bool children_need_begin_frames) const { | 1364 bool children_need_begin_frames) const { |
| 1371 proxy_->SetChildrenNeedBeginFrames(children_need_begin_frames); | 1365 proxy_->SetChildrenNeedBeginFrames(children_need_begin_frames); |
| 1372 } | 1366 } |
| 1373 | 1367 |
| 1374 void LayerTreeHost::SendBeginFramesToChildren( | 1368 void LayerTreeHost::SendBeginFramesToChildren( |
| 1375 const BeginFrameArgs& args) const { | 1369 const BeginFrameArgs& args) const { |
| 1376 client_->SendBeginFramesToChildren(args); | 1370 client_->SendBeginFramesToChildren(args); |
| 1377 } | 1371 } |
| 1378 | 1372 |
| 1379 } // namespace cc | 1373 } // namespace cc |
| OLD | NEW |