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

Side by Side Diff: cc/thread_proxy.cc

Issue 11633044: We don't want to tick animation controllers for non-active layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding the suggested TODO. 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/test/animation_test_common.cc ('k') | no next file » | 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/thread_proxy.h" 5 #include "cc/thread_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/delay_based_time_source.h" 9 #include "cc/delay_based_time_source.h"
10 #include "cc/draw_quad.h" 10 #include "cc/draw_quad.h"
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 DCHECK(m_layerTreeHostImpl->renderer()); 744 DCHECK(m_layerTreeHostImpl->renderer());
745 if (!m_layerTreeHostImpl->renderer()) 745 if (!m_layerTreeHostImpl->renderer())
746 return result; 746 return result;
747 747
748 // FIXME: compute the frame display time more intelligently 748 // FIXME: compute the frame display time more intelligently
749 base::TimeTicks monotonicTime = base::TimeTicks::Now(); 749 base::TimeTicks monotonicTime = base::TimeTicks::Now();
750 base::Time wallClockTime = base::Time::Now(); 750 base::Time wallClockTime = base::Time::Now();
751 751
752 if (m_inputHandlerOnImplThread.get()) 752 if (m_inputHandlerOnImplThread.get())
753 m_inputHandlerOnImplThread->animate(monotonicTime); 753 m_inputHandlerOnImplThread->animate(monotonicTime);
754
755 // TODO(nduca): make animation happen after tree activation.
754 m_layerTreeHostImpl->animate(monotonicTime, wallClockTime); 756 m_layerTreeHostImpl->animate(monotonicTime, wallClockTime);
755 757
756 // This method is called on a forced draw, regardless of whether we are able to produce a frame, 758 // This method is called on a forced draw, regardless of whether we are able to produce a frame,
757 // as the calling site on main thread is blocked until its request completes , and we signal 759 // as the calling site on main thread is blocked until its request completes , and we signal
758 // completion here. If canDraw() is false, we will indicate success=false to the caller, but we 760 // completion here. If canDraw() is false, we will indicate success=false to the caller, but we
759 // must still signal completion to avoid deadlock. 761 // must still signal completion to avoid deadlock.
760 762
761 // We guard prepareToDraw() with canDraw() because it always returns a valid frame, so can only 763 // We guard prepareToDraw() with canDraw() because it always returns a valid frame, so can only
762 // be used when such a frame is possible. Since drawLayers() depends on the result of 764 // be used when such a frame is possible. Since drawLayers() depends on the result of
763 // prepareToDraw(), it is guarded on canDraw() as well. 765 // prepareToDraw(), it is guarded on canDraw() as well.
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 } 1008 }
1007 1009
1008 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est) 1010 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est)
1009 { 1011 {
1010 DCHECK(isImplThread()); 1012 DCHECK(isImplThread());
1011 request->commitPending = m_schedulerOnImplThread->commitPending(); 1013 request->commitPending = m_schedulerOnImplThread->commitPending();
1012 request->completion.signal(); 1014 request->completion.signal();
1013 } 1015 }
1014 1016
1015 } // namespace cc 1017 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698