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

Side by Side Diff: cc/layer_tree_host.cc

Issue 11710004: cc: Block the main thread for texture layers during impl-side painting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/layer_tree_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 861
862 void LayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor) 862 void LayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor)
863 { 863 {
864 if (deviceScaleFactor == m_deviceScaleFactor) 864 if (deviceScaleFactor == m_deviceScaleFactor)
865 return; 865 return;
866 m_deviceScaleFactor = deviceScaleFactor; 866 m_deviceScaleFactor = deviceScaleFactor;
867 867
868 setNeedsCommit(); 868 setNeedsCommit();
869 } 869 }
870 870
871 bool LayerTreeHost::blocksPendingCommit() const
872 {
873 if (!m_rootLayer)
874 return false;
875 return m_rootLayer->blocksPendingCommitRecursive();
876 }
877
871 void LayerTreeHost::animateLayers(base::TimeTicks time) 878 void LayerTreeHost::animateLayers(base::TimeTicks time)
872 { 879 {
873 if (!m_settings.acceleratedAnimationEnabled || m_animationRegistrar->active_ animation_controllers().empty()) 880 if (!m_settings.acceleratedAnimationEnabled || m_animationRegistrar->active_ animation_controllers().empty())
874 return; 881 return;
875 882
876 TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers"); 883 TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers");
877 884
878 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); 885 double monotonicTime = (time - base::TimeTicks()).InSecondsF();
879 886
880 AnimationRegistrar::AnimationControllerMap copy = m_animationRegistrar->acti ve_animation_controllers(); 887 AnimationRegistrar::AnimationControllerMap copy = m_animationRegistrar->acti ve_animation_controllers();
(...skipping 13 matching lines...) Expand all
894 else 901 else
895 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); 902 layer->notifyAnimationFinished(wallClockTime.ToDoubleT());
896 } 903 }
897 } 904 }
898 905
899 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 906 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
900 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 907 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
901 } 908 }
902 909
903 } // namespace cc 910 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/texture_layer.cc » ('j') | cc/thread_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698