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