| 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/layers/tiled_layer_impl.h" | 5 #include "cc/layers/tiled_layer_impl.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
| 9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
| 10 #include "cc/debug/debug_colors.h" | 10 #include "cc/debug/debug_colors.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 return resource_id; | 71 return resource_id; |
| 72 } | 72 } |
| 73 | 73 |
| 74 void TiledLayerImpl::DumpLayerProperties(std::string* str, int indent) const { | 74 void TiledLayerImpl::DumpLayerProperties(std::string* str, int indent) const { |
| 75 str->append(IndentString(indent)); | 75 str->append(IndentString(indent)); |
| 76 base::StringAppendF(str, "skipsDraw: %d\n", (!tiler_ || skips_draw_)); | 76 base::StringAppendF(str, "skipsDraw: %d\n", (!tiler_ || skips_draw_)); |
| 77 LayerImpl::DumpLayerProperties(str, indent); | 77 LayerImpl::DumpLayerProperties(str, indent); |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool TiledLayerImpl::HasTileAt(int i, int j) const { | 80 bool TiledLayerImpl::HasTileAt(int i, int j) const { |
| 81 return !!tiler_->TileAt(i, j); | 81 return tiler_->TileAt(i, j); |
| 82 } | 82 } |
| 83 | 83 |
| 84 bool TiledLayerImpl::HasResourceIdForTileAt(int i, int j) const { | 84 bool TiledLayerImpl::HasResourceIdForTileAt(int i, int j) const { |
| 85 return HasTileAt(i, j) && TileAt(i, j)->resource_id(); | 85 return HasTileAt(i, j) && TileAt(i, j)->resource_id(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 DrawableTile* TiledLayerImpl::TileAt(int i, int j) const { | 88 DrawableTile* TiledLayerImpl::TileAt(int i, int j) const { |
| 89 return static_cast<DrawableTile*>(tiler_->TileAt(i, j)); | 89 return static_cast<DrawableTile*>(tiler_->TileAt(i, j)); |
| 90 } | 90 } |
| 91 | 91 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 CHECK(tiler_); | 298 CHECK(tiler_); |
| 299 tiler_->reset(); | 299 tiler_->reset(); |
| 300 s_safe_to_delete_drawable_tile = false; | 300 s_safe_to_delete_drawable_tile = false; |
| 301 } | 301 } |
| 302 | 302 |
| 303 const char* TiledLayerImpl::LayerTypeAsString() const { | 303 const char* TiledLayerImpl::LayerTypeAsString() const { |
| 304 return "ContentLayer"; | 304 return "ContentLayer"; |
| 305 } | 305 } |
| 306 | 306 |
| 307 } // namespace cc | 307 } // namespace cc |
| OLD | NEW |