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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 page_scale_delta = sync_tree->page_scale_delta(); | 341 page_scale_delta = sync_tree->page_scale_delta(); |
342 sent_page_scale_delta = sync_tree->sent_page_scale_delta(); | 342 sent_page_scale_delta = sync_tree->sent_page_scale_delta(); |
343 sync_tree->set_sent_page_scale_delta(1.f); | 343 sync_tree->set_sent_page_scale_delta(1.f); |
344 } | 344 } |
345 | 345 |
346 sync_tree->SetPageScaleFactorAndLimits(page_scale_factor_, | 346 sync_tree->SetPageScaleFactorAndLimits(page_scale_factor_, |
347 min_page_scale_factor_, | 347 min_page_scale_factor_, |
348 max_page_scale_factor_); | 348 max_page_scale_factor_); |
349 sync_tree->SetPageScaleDelta(page_scale_delta / sent_page_scale_delta); | 349 sync_tree->SetPageScaleDelta(page_scale_delta / sent_page_scale_delta); |
350 | 350 |
| 351 sync_tree->SetUseGpuRasterization(UseGpuRasterization()); |
| 352 |
351 sync_tree->PassSwapPromises(&swap_promise_list_); | 353 sync_tree->PassSwapPromises(&swap_promise_list_); |
352 | 354 |
353 host_impl->SetViewportSize(device_viewport_size_); | 355 host_impl->SetViewportSize(device_viewport_size_); |
354 host_impl->SetOverdrawBottomHeight(overdraw_bottom_height_); | 356 host_impl->SetOverdrawBottomHeight(overdraw_bottom_height_); |
355 host_impl->SetDeviceScaleFactor(device_scale_factor_); | 357 host_impl->SetDeviceScaleFactor(device_scale_factor_); |
356 host_impl->SetDebugState(debug_state_); | 358 host_impl->SetDebugState(debug_state_); |
357 if (pending_page_scale_animation_) { | 359 if (pending_page_scale_animation_) { |
358 host_impl->StartPageScaleAnimation( | 360 host_impl->StartPageScaleAnimation( |
359 pending_page_scale_animation_->target_offset, | 361 pending_page_scale_animation_->target_offset, |
360 pending_page_scale_animation_->use_anchor, | 362 pending_page_scale_animation_->use_anchor, |
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 swap_promise_list_.push_back(swap_promise.Pass()); | 1264 swap_promise_list_.push_back(swap_promise.Pass()); |
1263 } | 1265 } |
1264 | 1266 |
1265 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1267 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
1266 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1268 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
1267 swap_promise_list_[i]->DidNotSwap(reason); | 1269 swap_promise_list_[i]->DidNotSwap(reason); |
1268 swap_promise_list_.clear(); | 1270 swap_promise_list_.clear(); |
1269 } | 1271 } |
1270 | 1272 |
1271 } // namespace cc | 1273 } // namespace cc |
OLD | NEW |