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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 267783004: Refactoring the way begin frame sources inside scheduler work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Scheduler now uses frame sources, working on scheduler_unittests. Created 6 years, 7 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
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index a920f5a28ac25e3425de7d50ff0f7ca0df5fffe1..33680470119cc5bdcbf6ff5930d121785a42ad54 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -104,9 +104,6 @@ void SingleThreadProxy::SetVisible(bool visible) {
TRACE_EVENT0("cc", "SingleThreadProxy::SetVisible");
DebugScopedSetImplThread impl(this);
layer_tree_host_impl_->SetVisible(visible);
-
- // Changing visibility could change ShouldComposite().
- UpdateBackgroundAnimateTicking();
}
void SingleThreadProxy::CreateAndInitializeOutputSurface() {
@@ -255,7 +252,6 @@ void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) {
TRACE_EVENT1(
"cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw);
DCHECK(Proxy::IsImplThread());
- UpdateBackgroundAnimateTicking();
}
void SingleThreadProxy::NotifyReadyToActivate() {
@@ -454,12 +450,6 @@ bool SingleThreadProxy::ShouldComposite() const {
layer_tree_host_impl_->CanDraw();
}
-void SingleThreadProxy::UpdateBackgroundAnimateTicking() {
brianderson 2014/05/07 18:09:59 Well this is annoying. SingleThreadProxy is going
mithro-old 2014/05/07 22:02:32 Unsure yet. Do you know if there are unit tests wh
brianderson 2014/05/08 00:55:58 The LayerTreeHost/Impl unit tests should test back
mithro-old 2014/05/09 02:45:58 Guess we will find out shortly.
- DCHECK(Proxy::IsImplThread());
- layer_tree_host_impl_->UpdateBackgroundAnimateTicking(
- !ShouldComposite() && layer_tree_host_impl_->active_tree()->root_layer());
-}
-
bool SingleThreadProxy::DoComposite(
base::TimeTicks frame_begin_time,
const gfx::Rect& device_viewport_damage_rect,
@@ -480,13 +470,11 @@ bool SingleThreadProxy::DoComposite(
// DrawLayers() depends on the result of PrepareToDraw(), it is guarded on
// CanDraw() as well.
if (!ShouldComposite() || (for_readback && !can_do_readback)) {
- UpdateBackgroundAnimateTicking();
return false;
}
layer_tree_host_impl_->Animate(
layer_tree_host_impl_->CurrentFrameTimeTicks());
- UpdateBackgroundAnimateTicking();
if (!layer_tree_host_impl_->IsContextLost()) {
layer_tree_host_impl_->PrepareToDraw(frame, device_viewport_damage_rect);

Powered by Google App Engine
This is Rietveld 408576698