| 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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 ideal_source_scale_ = std::max(ideal_source_scale, min_source_scale); | 1176 ideal_source_scale_ = std::max(ideal_source_scale, min_source_scale); |
| 1177 } | 1177 } |
| 1178 | 1178 |
| 1179 void PictureLayerImpl::GetDebugBorderProperties( | 1179 void PictureLayerImpl::GetDebugBorderProperties( |
| 1180 SkColor* color, | 1180 SkColor* color, |
| 1181 float* width) const { | 1181 float* width) const { |
| 1182 *color = DebugColors::TiledContentLayerBorderColor(); | 1182 *color = DebugColors::TiledContentLayerBorderColor(); |
| 1183 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); | 1183 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); |
| 1184 } | 1184 } |
| 1185 | 1185 |
| 1186 void PictureLayerImpl::GetAllTilesAndPrioritiesForTracing( | 1186 void PictureLayerImpl::GetAllPrioritizedTilesForTracing( |
| 1187 std::map<const Tile*, TilePriority>* tile_map) const { | 1187 std::vector<PrioritizedTile>* prioritized_tiles) const { |
| 1188 if (!tilings_) | 1188 if (!tilings_) |
| 1189 return; | 1189 return; |
| 1190 tilings_->GetAllTilesAndPrioritiesForTracing(tile_map); | 1190 tilings_->GetAllPrioritizedTilesForTracing(prioritized_tiles); |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 void PictureLayerImpl::AsValueInto( | 1193 void PictureLayerImpl::AsValueInto( |
| 1194 base::trace_event::TracedValue* state) const { | 1194 base::trace_event::TracedValue* state) const { |
| 1195 LayerImpl::AsValueInto(state); | 1195 LayerImpl::AsValueInto(state); |
| 1196 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); | 1196 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); |
| 1197 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale()); | 1197 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale()); |
| 1198 state->BeginArray("tilings"); | 1198 state->BeginArray("tilings"); |
| 1199 tilings_->AsValueInto(state); | 1199 tilings_->AsValueInto(state); |
| 1200 state->EndArray(); | 1200 state->EndArray(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 | 1243 |
| 1244 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1244 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
| 1245 return !layer_tree_impl()->IsRecycleTree(); | 1245 return !layer_tree_impl()->IsRecycleTree(); |
| 1246 } | 1246 } |
| 1247 | 1247 |
| 1248 bool PictureLayerImpl::HasValidTilePriorities() const { | 1248 bool PictureLayerImpl::HasValidTilePriorities() const { |
| 1249 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); | 1249 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 } // namespace cc | 1252 } // namespace cc |
| OLD | NEW |