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

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: TRACE_EVENT_INSTANT 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
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/texture_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 850
851 void LayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor) 851 void LayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor)
852 { 852 {
853 if (deviceScaleFactor == m_deviceScaleFactor) 853 if (deviceScaleFactor == m_deviceScaleFactor)
854 return; 854 return;
855 m_deviceScaleFactor = deviceScaleFactor; 855 m_deviceScaleFactor = deviceScaleFactor;
856 856
857 setNeedsCommit(); 857 setNeedsCommit();
858 } 858 }
859 859
860 bool LayerTreeHost::blocksPendingCommit() const
861 {
862 if (!m_rootLayer)
863 return false;
864 return m_rootLayer->blocksPendingCommitRecursive();
865 }
866
860 void LayerTreeHost::animateLayers(base::TimeTicks time) 867 void LayerTreeHost::animateLayers(base::TimeTicks time)
861 { 868 {
862 if (!m_settings.acceleratedAnimationEnabled || m_animationRegistrar->active_ animation_controllers().empty()) 869 if (!m_settings.acceleratedAnimationEnabled || m_animationRegistrar->active_ animation_controllers().empty())
863 return; 870 return;
864 871
865 TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers"); 872 TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers");
866 873
867 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); 874 double monotonicTime = (time - base::TimeTicks()).InSecondsF();
868 875
869 AnimationRegistrar::AnimationControllerMap copy = m_animationRegistrar->acti ve_animation_controllers(); 876 AnimationRegistrar::AnimationControllerMap copy = m_animationRegistrar->acti ve_animation_controllers();
(...skipping 13 matching lines...) Expand all
883 else 890 else
884 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); 891 layer->notifyAnimationFinished(wallClockTime.ToDoubleT());
885 } 892 }
886 } 893 }
887 894
888 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 895 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
889 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 896 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
890 } 897 }
891 898
892 } // namespace cc 899 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/texture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698