| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 SkColor color; | 223 SkColor color; |
| 224 float width; | 224 float width; |
| 225 if (*iter && iter->draw_info().IsReadyToDraw()) { | 225 if (*iter && iter->draw_info().IsReadyToDraw()) { |
| 226 TileDrawInfo::Mode mode = iter->draw_info().mode(); | 226 TileDrawInfo::Mode mode = iter->draw_info().mode(); |
| 227 if (mode == TileDrawInfo::SOLID_COLOR_MODE) { | 227 if (mode == TileDrawInfo::SOLID_COLOR_MODE) { |
| 228 color = DebugColors::SolidColorTileBorderColor(); | 228 color = DebugColors::SolidColorTileBorderColor(); |
| 229 width = DebugColors::SolidColorTileBorderWidth(layer_tree_impl()); | 229 width = DebugColors::SolidColorTileBorderWidth(layer_tree_impl()); |
| 230 } else if (mode == TileDrawInfo::OOM_MODE) { | 230 } else if (mode == TileDrawInfo::OOM_MODE) { |
| 231 color = DebugColors::OOMTileBorderColor(); | 231 color = DebugColors::OOMTileBorderColor(); |
| 232 width = DebugColors::OOMTileBorderWidth(layer_tree_impl()); | 232 width = DebugColors::OOMTileBorderWidth(layer_tree_impl()); |
| 233 } else if (iter->draw_info().has_compressed_resource()) { |
| 234 color = DebugColors::CompressedTileBorderColor(); |
| 235 width = DebugColors::CompressedTileBorderWidth(layer_tree_impl()); |
| 233 } else if (iter.resolution() == HIGH_RESOLUTION) { | 236 } else if (iter.resolution() == HIGH_RESOLUTION) { |
| 234 color = DebugColors::HighResTileBorderColor(); | 237 color = DebugColors::HighResTileBorderColor(); |
| 235 width = DebugColors::HighResTileBorderWidth(layer_tree_impl()); | 238 width = DebugColors::HighResTileBorderWidth(layer_tree_impl()); |
| 236 } else if (iter.resolution() == LOW_RESOLUTION) { | 239 } else if (iter.resolution() == LOW_RESOLUTION) { |
| 237 color = DebugColors::LowResTileBorderColor(); | 240 color = DebugColors::LowResTileBorderColor(); |
| 238 width = DebugColors::LowResTileBorderWidth(layer_tree_impl()); | 241 width = DebugColors::LowResTileBorderWidth(layer_tree_impl()); |
| 239 } else if (iter->contents_scale() > max_contents_scale) { | 242 } else if (iter->contents_scale() > max_contents_scale) { |
| 240 color = DebugColors::ExtraHighResTileBorderColor(); | 243 color = DebugColors::ExtraHighResTileBorderColor(); |
| 241 width = DebugColors::ExtraHighResTileBorderWidth(layer_tree_impl()); | 244 width = DebugColors::ExtraHighResTileBorderWidth(layer_tree_impl()); |
| 242 } else { | 245 } else { |
| (...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 | 1259 |
| 1257 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1260 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
| 1258 return !layer_tree_impl()->IsRecycleTree(); | 1261 return !layer_tree_impl()->IsRecycleTree(); |
| 1259 } | 1262 } |
| 1260 | 1263 |
| 1261 bool PictureLayerImpl::HasValidTilePriorities() const { | 1264 bool PictureLayerImpl::HasValidTilePriorities() const { |
| 1262 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); | 1265 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); |
| 1263 } | 1266 } |
| 1264 | 1267 |
| 1265 } // namespace cc | 1268 } // namespace cc |
| OLD | NEW |