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 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1729 return state.PassAs<base::Value>(); | 1729 return state.PassAs<base::Value>(); |
1730 } | 1730 } |
1731 | 1731 |
1732 scoped_ptr<base::Value> LayerTreeHostImpl::frameStateAsValue() const | 1732 scoped_ptr<base::Value> LayerTreeHostImpl::frameStateAsValue() const |
1733 { | 1733 { |
1734 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1734 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1735 state->SetString("lthi_id", StringPrintf("%p", this)); | 1735 state->SetString("lthi_id", StringPrintf("%p", this)); |
1736 state->Set("device_viewport_size", MathUtil::asValue(m_deviceViewportSize).r
elease()); | 1736 state->Set("device_viewport_size", MathUtil::asValue(m_deviceViewportSize).r
elease()); |
1737 if (m_tileManager) | 1737 if (m_tileManager) |
1738 state->Set("tiles", m_tileManager->AllTilesAsValue().release()); | 1738 state->Set("tiles", m_tileManager->AllTilesAsValue().release()); |
| 1739 state->Set("active_tree", activeTree()->AsValue().release()); |
1739 return state.PassAs<base::Value>(); | 1740 return state.PassAs<base::Value>(); |
1740 } | 1741 } |
1741 | 1742 |
1742 // static | 1743 // static |
1743 LayerImpl* LayerTreeHostImpl::getNonCompositedContentLayerRecursive(LayerImpl* l
ayer) | 1744 LayerImpl* LayerTreeHostImpl::getNonCompositedContentLayerRecursive(LayerImpl* l
ayer) |
1744 { | 1745 { |
1745 if (!layer) | 1746 if (!layer) |
1746 return NULL; | 1747 return NULL; |
1747 | 1748 |
1748 if (layer->drawsContent()) | 1749 if (layer->drawsContent()) |
(...skipping 23 matching lines...) Expand all Loading... |
1772 if (m_tileManager) | 1773 if (m_tileManager) |
1773 m_tileManager->SetRecordRenderingStats(m_debugState.recordRenderingStats
()); | 1774 m_tileManager->SetRecordRenderingStats(m_debugState.recordRenderingStats
()); |
1774 } | 1775 } |
1775 | 1776 |
1776 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime) | 1777 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime) |
1777 { | 1778 { |
1778 m_paintTimeCounter->SavePaintTime(totalPaintTime); | 1779 m_paintTimeCounter->SavePaintTime(totalPaintTime); |
1779 } | 1780 } |
1780 | 1781 |
1781 } // namespace cc | 1782 } // namespace cc |
OLD | NEW |