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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 17114008: cc: Remove cc::Thread and cc::ThreadImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-thread: NULLrefptrs Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index e4ca7e4ade1acaefb01ef2afa74df021ac949934..d51724214bbb807c91345ef438b0ddacad95e016 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -14,7 +14,6 @@
#include "cc/animation/scrollbar_animation_controller.h"
#include "cc/animation/timing_function.h"
#include "cc/base/math_util.h"
-#include "cc/base/thread.h"
#include "cc/base/util.h"
#include "cc/debug/debug_rect_history.h"
#include "cc/debug/frame_rate_counter.h"
@@ -767,6 +766,8 @@ void LayerTreeHostImpl::MainThreadHasStoppedFlinging() {
void LayerTreeHostImpl::UpdateBackgroundAnimateTicking(
bool should_background_tick) {
+ DCHECK(proxy_->IsImplThread());
+
bool enabled = should_background_tick &&
!animation_registrar_->active_animation_controllers().empty();
@@ -775,8 +776,10 @@ void LayerTreeHostImpl::UpdateBackgroundAnimateTicking(
if (!time_source_client_adapter_) {
time_source_client_adapter_ = LayerTreeHostImplTimeSourceAdapter::Create(
this,
- DelayBasedTimeSource::Create(LowFrequencyAnimationInterval(),
- proxy_->CurrentThread()->TaskRunner()));
+ DelayBasedTimeSource::Create(
+ LowFrequencyAnimationInterval(),
+ proxy_->HasImplThread() ? proxy_->ImplThreadTaskRunner()
+ : proxy_->MainThreadTaskRunner()));
}
time_source_client_adapter_->SetActive(enabled);
@@ -1518,7 +1521,7 @@ bool LayerTreeHostImpl::DoInitializeRenderer(
settings_.refresh_rate);
output_surface->InitializeBeginFrameEmulation(
- proxy_->ImplThread() ? proxy_->ImplThread()->TaskRunner() : NULL,
+ proxy_->ImplThreadTaskRunner(),
settings_.throttle_frame_production,
display_refresh_interval);
}
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698