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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 11532009: LTHI's bg animation timer should set the fake thread to impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only need to set fake thread id in single threaded mode 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 | « no previous file | 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/layer_tree_host_impl.h" 5 #include "cc/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return make_scoped_ptr(new LayerTreeHostImplTimeSourceAdapter(layerTreeH ostImpl, timeSource)); 64 return make_scoped_ptr(new LayerTreeHostImplTimeSourceAdapter(layerTreeH ostImpl, timeSource));
65 } 65 }
66 virtual ~LayerTreeHostImplTimeSourceAdapter() 66 virtual ~LayerTreeHostImplTimeSourceAdapter()
67 { 67 {
68 m_timeSource->setClient(0); 68 m_timeSource->setClient(0);
69 m_timeSource->setActive(false); 69 m_timeSource->setActive(false);
70 } 70 }
71 71
72 virtual void onTimerTick() OVERRIDE 72 virtual void onTimerTick() OVERRIDE
73 { 73 {
74 scoped_ptr<DebugScopedSetImplThread> setImplThread;
enne (OOO) 2013/01/10 17:42:27 I think this is the only conditional DebugScopedSe
75 if (!m_layerTreeHostImpl->proxy()->hasImplThread())
76 setImplThread.reset(new DebugScopedSetImplThread(m_layerTreeHostImpl ->proxy()));
74 m_layerTreeHostImpl->animate(base::TimeTicks::Now(), base::Time::Now()); 77 m_layerTreeHostImpl->animate(base::TimeTicks::Now(), base::Time::Now());
75 } 78 }
76 79
77 void setActive(bool active) 80 void setActive(bool active)
78 { 81 {
79 if (active != m_timeSource->active()) 82 if (active != m_timeSource->active())
80 m_timeSource->setActive(active); 83 m_timeSource->setActive(active);
81 } 84 }
82 85
83 private: 86 private:
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 } 1634 }
1632 1635
1633 skia::RefPtr<SkPicture> LayerTreeHostImpl::capturePicture() 1636 skia::RefPtr<SkPicture> LayerTreeHostImpl::capturePicture()
1634 { 1637 {
1635 LayerTreeImpl* tree = pendingTree() ? pendingTree() : activeTree(); 1638 LayerTreeImpl* tree = pendingTree() ? pendingTree() : activeTree();
1636 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer()); 1639 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer());
1637 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>(); 1640 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>();
1638 } 1641 }
1639 1642
1640 } // namespace cc 1643 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698