Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: cc/trees/thread_proxy.cc

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More danakj review Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 *has_initialized_output_surface = 1445 *has_initialized_output_surface =
1446 impl().scheduler->HasInitializedOutputSurface(); 1446 impl().scheduler->HasInitializedOutputSurface();
1447 completion->Signal(); 1447 completion->Signal();
1448 } 1448 }
1449 1449
1450 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { 1450 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) {
1451 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); 1451 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread");
1452 DCHECK(IsImplThread()); 1452 DCHECK(IsImplThread());
1453 impl().layer_tree_host_impl = 1453 impl().layer_tree_host_impl =
1454 layer_tree_host()->CreateLayerTreeHostImpl(this); 1454 layer_tree_host()->CreateLayerTreeHostImpl(this);
1455 const LayerTreeSettings& settings = layer_tree_host()->settings(); 1455 SchedulerSettings scheduler_settings(layer_tree_host()->settings());
1456 SchedulerSettings scheduler_settings;
1457 scheduler_settings.deadline_scheduling_enabled =
1458 settings.deadline_scheduling_enabled;
1459 scheduler_settings.impl_side_painting = settings.impl_side_painting;
1460 scheduler_settings.timeout_and_draw_when_animation_checkerboards =
1461 settings.timeout_and_draw_when_animation_checkerboards;
1462 scheduler_settings.maximum_number_of_failed_draws_before_draw_is_forced_ =
1463 settings.maximum_number_of_failed_draws_before_draw_is_forced_;
1464 scheduler_settings.using_synchronous_renderer_compositor =
1465 settings.using_synchronous_renderer_compositor;
1466 scheduler_settings.throttle_frame_production =
1467 settings.throttle_frame_production;
1468 impl().scheduler = 1456 impl().scheduler =
1469 Scheduler::Create(this, scheduler_settings, impl().layer_tree_host_id); 1457 Scheduler::Create(this, scheduler_settings, impl().layer_tree_host_id);
1470 impl().scheduler->SetVisible(impl().layer_tree_host_impl->visible()); 1458 impl().scheduler->SetVisible(impl().layer_tree_host_impl->visible());
1471 1459
1472 impl_thread_weak_ptr_ = impl().weak_factory.GetWeakPtr(); 1460 impl_thread_weak_ptr_ = impl().weak_factory.GetWeakPtr();
1473 completion->Signal(); 1461 completion->Signal();
1474 } 1462 }
1475 1463
1476 void ThreadProxy::InitializeOutputSurfaceOnImplThread( 1464 void ThreadProxy::InitializeOutputSurfaceOnImplThread(
1477 CompletionEvent* completion, 1465 CompletionEvent* completion,
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 1702
1715 impl().timing_history.DidActivatePendingTree(); 1703 impl().timing_history.DidActivatePendingTree();
1716 } 1704 }
1717 1705
1718 void ThreadProxy::DidManageTiles() { 1706 void ThreadProxy::DidManageTiles() {
1719 DCHECK(IsImplThread()); 1707 DCHECK(IsImplThread());
1720 impl().scheduler->DidManageTiles(); 1708 impl().scheduler->DidManageTiles();
1721 } 1709 }
1722 1710
1723 } // namespace cc 1711 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698