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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
504 } | 504 } |
505 // Setting property trees must happen before pushing the page scale. | 505 // Setting property trees must happen before pushing the page scale. |
506 sync_tree->SetPropertyTrees(&property_trees_); | 506 sync_tree->SetPropertyTrees(&property_trees_); |
507 | 507 |
508 sync_tree->PushPageScaleFromMainThread( | 508 sync_tree->PushPageScaleFromMainThread( |
509 page_scale_factor_, min_page_scale_factor_, max_page_scale_factor_); | 509 page_scale_factor_, min_page_scale_factor_, max_page_scale_factor_); |
510 sync_tree->elastic_overscroll()->PushFromMainThread(elastic_overscroll_); | 510 sync_tree->elastic_overscroll()->PushFromMainThread(elastic_overscroll_); |
511 if (sync_tree->IsActiveTree()) | 511 if (sync_tree->IsActiveTree()) |
512 sync_tree->elastic_overscroll()->PushPendingToActive(); | 512 sync_tree->elastic_overscroll()->PushPendingToActive(); |
513 | 513 |
514 sync_tree->PassSwapPromises(std::move(swap_promise_list_)); | 514 { |
brianderson
2016/08/15 17:05:55
Thanks for catching this!
It would be more straig
svartmetal
2016/08/15 19:04:33
Fixed. It's OK to use std::vector::clear since it
| |
515 std::vector<std::unique_ptr<SwapPromise>> to_pass; | |
516 swap_promise_list_.swap(to_pass); | |
517 sync_tree->PassSwapPromises(std::move(to_pass)); | |
518 } | |
515 | 519 |
516 sync_tree->set_top_controls_shrink_blink_size( | 520 sync_tree->set_top_controls_shrink_blink_size( |
517 top_controls_shrink_blink_size_); | 521 top_controls_shrink_blink_size_); |
518 sync_tree->set_top_controls_height(top_controls_height_); | 522 sync_tree->set_top_controls_height(top_controls_height_); |
519 sync_tree->PushTopControlsFromMainThread(top_controls_shown_ratio_); | 523 sync_tree->PushTopControlsFromMainThread(top_controls_shown_ratio_); |
520 | 524 |
521 host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_); | 525 host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_); |
522 host_impl->SetContentIsSuitableForGpuRasterization( | 526 host_impl->SetContentIsSuitableForGpuRasterization( |
523 content_is_suitable_for_gpu_rasterization_); | 527 content_is_suitable_for_gpu_rasterization_); |
524 RecordGpuRasterizationHistogram(); | 528 RecordGpuRasterizationHistogram(); |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1671 | 1675 |
1672 surface_client_id_ = proto.surface_client_id(); | 1676 surface_client_id_ = proto.surface_client_id(); |
1673 next_surface_sequence_ = proto.next_surface_sequence(); | 1677 next_surface_sequence_ = proto.next_surface_sequence(); |
1674 } | 1678 } |
1675 | 1679 |
1676 AnimationHost* LayerTreeHost::animation_host() const { | 1680 AnimationHost* LayerTreeHost::animation_host() const { |
1677 return layer_tree_.animation_host(); | 1681 return layer_tree_.animation_host(); |
1678 } | 1682 } |
1679 | 1683 |
1680 } // namespace cc | 1684 } // namespace cc |
OLD | NEW |