OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |