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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/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 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1902 | 1902 |
1903 scoped_ptr<base::Value> LayerTreeHostImpl::AsValue() const { | 1903 scoped_ptr<base::Value> LayerTreeHostImpl::AsValue() const { |
1904 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1904 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1905 state->Set("activation_state", ActivationStateAsValue().release()); | 1905 state->Set("activation_state", ActivationStateAsValue().release()); |
1906 state->Set("frame_state", FrameStateAsValue().release()); | 1906 state->Set("frame_state", FrameStateAsValue().release()); |
1907 return state.PassAs<base::Value>(); | 1907 return state.PassAs<base::Value>(); |
1908 } | 1908 } |
1909 | 1909 |
1910 scoped_ptr<base::Value> LayerTreeHostImpl::ActivationStateAsValue() const { | 1910 scoped_ptr<base::Value> LayerTreeHostImpl::ActivationStateAsValue() const { |
1911 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1911 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1912 state->SetString("lthi_id", StringPrintf("%p", this)); | 1912 state->SetString("lthi_id", base::StringPrintf("%p", this)); |
1913 state->SetBoolean("visible_resources_ready", | 1913 state->SetBoolean("visible_resources_ready", |
1914 pending_tree_->AreVisibleResourcesReady()); | 1914 pending_tree_->AreVisibleResourcesReady()); |
1915 state->Set("tile_manager", tile_manager_->BasicStateAsValue().release()); | 1915 state->Set("tile_manager", tile_manager_->BasicStateAsValue().release()); |
1916 return state.PassAs<base::Value>(); | 1916 return state.PassAs<base::Value>(); |
1917 } | 1917 } |
1918 | 1918 |
1919 scoped_ptr<base::Value> LayerTreeHostImpl::FrameStateAsValue() const { | 1919 scoped_ptr<base::Value> LayerTreeHostImpl::FrameStateAsValue() const { |
1920 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1920 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1921 state->SetString("lthi_id", StringPrintf("%p", this)); | 1921 state->SetString("lthi_id", base::StringPrintf("%p", this)); |
1922 state->Set("device_viewport_size", | 1922 state->Set("device_viewport_size", |
1923 MathUtil::AsValue(device_viewport_size_).release()); | 1923 MathUtil::AsValue(device_viewport_size_).release()); |
1924 if (tile_manager_) | 1924 if (tile_manager_) |
1925 state->Set("tiles", tile_manager_->AllTilesAsValue().release()); | 1925 state->Set("tiles", tile_manager_->AllTilesAsValue().release()); |
1926 state->Set("active_tree", active_tree_->AsValue().release()); | 1926 state->Set("active_tree", active_tree_->AsValue().release()); |
1927 return state.PassAs<base::Value>(); | 1927 return state.PassAs<base::Value>(); |
1928 } | 1928 } |
1929 | 1929 |
1930 // static | 1930 // static |
1931 LayerImpl* LayerTreeHostImpl::GetNonCompositedContentLayerRecursive( | 1931 LayerImpl* LayerTreeHostImpl::GetNonCompositedContentLayerRecursive( |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1963 tile_manager_->SetRecordRenderingStats(debug_state_.RecordRenderingStats()); | 1963 tile_manager_->SetRecordRenderingStats(debug_state_.RecordRenderingStats()); |
1964 } | 1964 } |
1965 | 1965 |
1966 void LayerTreeHostImpl::SavePaintTime(const base::TimeDelta& total_paint_time, | 1966 void LayerTreeHostImpl::SavePaintTime(const base::TimeDelta& total_paint_time, |
1967 int commit_number) { | 1967 int commit_number) { |
1968 DCHECK(debug_state_.continuous_painting); | 1968 DCHECK(debug_state_.continuous_painting); |
1969 paint_time_counter_->SavePaintTime(total_paint_time, commit_number); | 1969 paint_time_counter_->SavePaintTime(total_paint_time, commit_number); |
1970 } | 1970 } |
1971 | 1971 |
1972 } // namespace cc | 1972 } // namespace cc |
OLD | NEW |