| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); | 1173 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 void PictureLayerImpl::GetAllTilesForTracing( | 1176 void PictureLayerImpl::GetAllTilesForTracing( |
| 1177 std::set<const Tile*>* tiles) const { | 1177 std::set<const Tile*>* tiles) const { |
| 1178 if (!tilings_) | 1178 if (!tilings_) |
| 1179 return; | 1179 return; |
| 1180 tilings_->GetAllTilesForTracing(tiles); | 1180 tilings_->GetAllTilesForTracing(tiles); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 void PictureLayerImpl::AsValueInto(base::debug::TracedValue* state) const { | 1183 void PictureLayerImpl::AsValueInto( |
| 1184 base::trace_event::TracedValue* state) const { |
| 1184 LayerImpl::AsValueInto(state); | 1185 LayerImpl::AsValueInto(state); |
| 1185 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); | 1186 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); |
| 1186 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale()); | 1187 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale()); |
| 1187 state->BeginArray("tilings"); | 1188 state->BeginArray("tilings"); |
| 1188 tilings_->AsValueInto(state); | 1189 tilings_->AsValueInto(state); |
| 1189 state->EndArray(); | 1190 state->EndArray(); |
| 1190 | 1191 |
| 1191 MathUtil::AddToTracedValue("tile_priority_rect", | 1192 MathUtil::AddToTracedValue("tile_priority_rect", |
| 1192 viewport_rect_for_tile_priority_in_content_space_, | 1193 viewport_rect_for_tile_priority_in_content_space_, |
| 1193 state); | 1194 state); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1232 | 1233 |
| 1233 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1234 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
| 1234 return !layer_tree_impl()->IsRecycleTree(); | 1235 return !layer_tree_impl()->IsRecycleTree(); |
| 1235 } | 1236 } |
| 1236 | 1237 |
| 1237 bool PictureLayerImpl::HasValidTilePriorities() const { | 1238 bool PictureLayerImpl::HasValidTilePriorities() const { |
| 1238 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); | 1239 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); |
| 1239 } | 1240 } |
| 1240 | 1241 |
| 1241 } // namespace cc | 1242 } // namespace cc |
| OLD | NEW |