| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "CCTiledLayerImpl.h" | 7 #include "CCTiledLayerImpl.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 { | 66 { |
| 67 } | 67 } |
| 68 | 68 |
| 69 CCTiledLayerImpl::~CCTiledLayerImpl() | 69 CCTiledLayerImpl::~CCTiledLayerImpl() |
| 70 { | 70 { |
| 71 } | 71 } |
| 72 | 72 |
| 73 CCResourceProvider::ResourceId CCTiledLayerImpl::contentsResourceId() const | 73 CCResourceProvider::ResourceId CCTiledLayerImpl::contentsResourceId() const |
| 74 { | 74 { |
| 75 // This function is only valid for single texture layers, e.g. masks. | 75 // This function is only valid for single texture layers, e.g. masks. |
| 76 ASSERT(m_tiler); | 76 DCHECK(m_tiler); |
| 77 ASSERT(m_tiler->numTilesX() == 1); | 77 DCHECK(m_tiler->numTilesX() == 1); |
| 78 ASSERT(m_tiler->numTilesY() == 1); | 78 DCHECK(m_tiler->numTilesY() == 1); |
| 79 | 79 |
| 80 DrawableTile* tile = tileAt(0, 0); | 80 DrawableTile* tile = tileAt(0, 0); |
| 81 CCResourceProvider::ResourceId resourceId = tile ? tile->resourceId() : 0; | 81 CCResourceProvider::ResourceId resourceId = tile ? tile->resourceId() : 0; |
| 82 return resourceId; | 82 return resourceId; |
| 83 } | 83 } |
| 84 | 84 |
| 85 void CCTiledLayerImpl::dumpLayerProperties(std::string* str, int indent) const | 85 void CCTiledLayerImpl::dumpLayerProperties(std::string* str, int indent) const |
| 86 { | 86 { |
| 87 str->append(indentString(indent)); | 87 str->append(indentString(indent)); |
| 88 base::StringAppendF(str, "skipsDraw: %d\n", (!m_tiler || m_skipsDraw)); | 88 base::StringAppendF(str, "skipsDraw: %d\n", (!m_tiler || m_skipsDraw)); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 { | 240 { |
| 241 m_tiler->reset(); | 241 m_tiler->reset(); |
| 242 } | 242 } |
| 243 | 243 |
| 244 const char* CCTiledLayerImpl::layerTypeAsString() const | 244 const char* CCTiledLayerImpl::layerTypeAsString() const |
| 245 { | 245 { |
| 246 return "ContentLayer"; | 246 return "ContentLayer"; |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace cc | 249 } // namespace cc |
| OLD | NEW |