| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 , m_cumulativeNumLayersDrawn(0) | 156 , m_cumulativeNumLayersDrawn(0) |
| 157 , m_cumulativeNumMissingTiles(0) | 157 , m_cumulativeNumMissingTiles(0) |
| 158 , m_lastSentMemoryVisibleBytes(0) | 158 , m_lastSentMemoryVisibleBytes(0) |
| 159 , m_lastSentMemoryVisibleAndNearbyBytes(0) | 159 , m_lastSentMemoryVisibleAndNearbyBytes(0) |
| 160 , m_lastSentMemoryUseBytes(0) | 160 , m_lastSentMemoryUseBytes(0) |
| 161 , m_animationRegistrar(AnimationRegistrar::create()) | 161 , m_animationRegistrar(AnimationRegistrar::create()) |
| 162 { | 162 { |
| 163 DCHECK(m_proxy->isImplThread()); | 163 DCHECK(m_proxy->isImplThread()); |
| 164 didVisibilityChange(this, m_visible); | 164 didVisibilityChange(this, m_visible); |
| 165 | 165 |
| 166 if (settings.calculateTopControlsPosition) | 166 if (settings.calculateTopControlsPosition) { |
| 167 m_topControlsManager = TopControlsManager::Create(this, settings.topCont
rolsHeight); | 167 m_topControlsManager = TopControlsManager::Create(this, |
| 168 settings.topControlsHe
ight, |
| 169 settings.topControlsSh
owThreshold, |
| 170 settings.topControlsHi
deThreshold); |
| 171 } |
| 168 | 172 |
| 169 // LTHI always has an active tree. | 173 // LTHI always has an active tree. |
| 170 m_activeTree = LayerTreeImpl::create(this); | 174 m_activeTree = LayerTreeImpl::create(this); |
| 171 } | 175 } |
| 172 | 176 |
| 173 LayerTreeHostImpl::~LayerTreeHostImpl() | 177 LayerTreeHostImpl::~LayerTreeHostImpl() |
| 174 { | 178 { |
| 175 DCHECK(m_proxy->isImplThread()); | 179 DCHECK(m_proxy->isImplThread()); |
| 176 TRACE_EVENT0("cc", "LayerTreeHostImpl::~LayerTreeHostImpl()"); | 180 TRACE_EVENT0("cc", "LayerTreeHostImpl::~LayerTreeHostImpl()"); |
| 177 | 181 |
| (...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1713 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer()); | 1717 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer()); |
| 1714 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>(); | 1718 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>(); |
| 1715 } | 1719 } |
| 1716 | 1720 |
| 1717 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime) | 1721 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime) |
| 1718 { | 1722 { |
| 1719 m_paintTimeCounter->SavePaintTime(totalPaintTime); | 1723 m_paintTimeCounter->SavePaintTime(totalPaintTime); |
| 1720 } | 1724 } |
| 1721 | 1725 |
| 1722 } // namespace cc | 1726 } // namespace cc |
| OLD | NEW |