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/thread_proxy.h" | 5 #include "cc/trees/thread_proxy.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1461 *has_initialized_output_surface = | 1461 *has_initialized_output_surface = |
1462 impl().scheduler->HasInitializedOutputSurface(); | 1462 impl().scheduler->HasInitializedOutputSurface(); |
1463 completion->Signal(); | 1463 completion->Signal(); |
1464 } | 1464 } |
1465 | 1465 |
1466 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { | 1466 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { |
1467 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); | 1467 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); |
1468 DCHECK(IsImplThread()); | 1468 DCHECK(IsImplThread()); |
1469 impl().layer_tree_host_impl = | 1469 impl().layer_tree_host_impl = |
1470 layer_tree_host()->CreateLayerTreeHostImpl(this); | 1470 layer_tree_host()->CreateLayerTreeHostImpl(this); |
1471 const LayerTreeSettings& settings = layer_tree_host()->settings(); | 1471 SchedulerSettings scheduler_settings(layer_tree_host()->settings()); |
1472 SchedulerSettings scheduler_settings; | |
1473 scheduler_settings.impl_side_painting = settings.impl_side_painting; | |
1474 scheduler_settings.timeout_and_draw_when_animation_checkerboards = | |
1475 settings.timeout_and_draw_when_animation_checkerboards; | |
1476 scheduler_settings.maximum_number_of_failed_draws_before_draw_is_forced_ = | |
1477 settings.maximum_number_of_failed_draws_before_draw_is_forced_; | |
1478 scheduler_settings.using_synchronous_renderer_compositor = | |
1479 settings.using_synchronous_renderer_compositor; | |
1480 scheduler_settings.throttle_frame_production = | |
1481 settings.throttle_frame_production; | |
1482 impl().scheduler = | 1472 impl().scheduler = |
1483 Scheduler::Create(this, scheduler_settings, impl().layer_tree_host_id); | 1473 Scheduler::Create(this, scheduler_settings, impl().layer_tree_host_id); |
1484 impl().scheduler->SetVisible(impl().layer_tree_host_impl->visible()); | 1474 impl().scheduler->SetVisible(impl().layer_tree_host_impl->visible()); |
1485 | 1475 |
1486 impl_thread_weak_ptr_ = impl().weak_factory.GetWeakPtr(); | 1476 impl_thread_weak_ptr_ = impl().weak_factory.GetWeakPtr(); |
1487 completion->Signal(); | 1477 completion->Signal(); |
1488 } | 1478 } |
1489 | 1479 |
1490 void ThreadProxy::InitializeOutputSurfaceOnImplThread( | 1480 void ThreadProxy::InitializeOutputSurfaceOnImplThread( |
1491 CompletionEvent* completion, | 1481 CompletionEvent* completion, |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1728 | 1718 |
1729 impl().timing_history.DidActivatePendingTree(); | 1719 impl().timing_history.DidActivatePendingTree(); |
1730 } | 1720 } |
1731 | 1721 |
1732 void ThreadProxy::DidManageTiles() { | 1722 void ThreadProxy::DidManageTiles() { |
1733 DCHECK(IsImplThread()); | 1723 DCHECK(IsImplThread()); |
1734 impl().scheduler->DidManageTiles(); | 1724 impl().scheduler->DidManageTiles(); |
1735 } | 1725 } |
1736 | 1726 |
1737 } // namespace cc | 1727 } // namespace cc |
OLD | NEW |