| 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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 ideal_source_scale_ = std::max(ideal_source_scale, min_source_scale); | 1165 ideal_source_scale_ = std::max(ideal_source_scale, min_source_scale); |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 void PictureLayerImpl::GetDebugBorderProperties( | 1168 void PictureLayerImpl::GetDebugBorderProperties( |
| 1169 SkColor* color, | 1169 SkColor* color, |
| 1170 float* width) const { | 1170 float* width) const { |
| 1171 *color = DebugColors::TiledContentLayerBorderColor(); | 1171 *color = DebugColors::TiledContentLayerBorderColor(); |
| 1172 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); | 1172 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); |
| 1173 } | 1173 } |
| 1174 | 1174 |
| 1175 void PictureLayerImpl::GetAllTilesForTracing( | 1175 void PictureLayerImpl::GetAllTilesAndPrioritiesForTracing( |
| 1176 std::set<const Tile*>* tiles) const { | 1176 std::map<const Tile*, TilePriority>* tile_map) const { |
| 1177 if (!tilings_) | 1177 if (!tilings_) |
| 1178 return; | 1178 return; |
| 1179 tilings_->GetAllTilesForTracing(tiles); | 1179 tilings_->GetAllTilesAndPrioritiesForTracing(tile_map); |
| 1180 } | 1180 } |
| 1181 | 1181 |
| 1182 void PictureLayerImpl::AsValueInto( | 1182 void PictureLayerImpl::AsValueInto( |
| 1183 base::trace_event::TracedValue* state) const { | 1183 base::trace_event::TracedValue* state) const { |
| 1184 LayerImpl::AsValueInto(state); | 1184 LayerImpl::AsValueInto(state); |
| 1185 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); | 1185 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); |
| 1186 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale()); | 1186 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale()); |
| 1187 state->BeginArray("tilings"); | 1187 state->BeginArray("tilings"); |
| 1188 tilings_->AsValueInto(state); | 1188 tilings_->AsValueInto(state); |
| 1189 state->EndArray(); | 1189 state->EndArray(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1232 | 1232 |
| 1233 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1233 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
| 1234 return !layer_tree_impl()->IsRecycleTree(); | 1234 return !layer_tree_impl()->IsRecycleTree(); |
| 1235 } | 1235 } |
| 1236 | 1236 |
| 1237 bool PictureLayerImpl::HasValidTilePriorities() const { | 1237 bool PictureLayerImpl::HasValidTilePriorities() const { |
| 1238 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); | 1238 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 } // namespace cc | 1241 } // namespace cc |
| OLD | NEW |