OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrTextureStripAtlas.h" | 9 #include "GrTextureStripAtlas.h" |
10 #include "SkPixelRef.h" | 10 #include "SkPixelRef.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 GrTextureStripAtlas::GetCache() { | 27 GrTextureStripAtlas::GetCache() { |
28 | 28 |
29 if (NULL == gAtlasCache) { | 29 if (NULL == gAtlasCache) { |
30 gAtlasCache = SkNEW((GrTHashTable<AtlasEntry, AtlasHashKey, 8>)); | 30 gAtlasCache = SkNEW((GrTHashTable<AtlasEntry, AtlasHashKey, 8>)); |
31 } | 31 } |
32 | 32 |
33 return gAtlasCache; | 33 return gAtlasCache; |
34 } | 34 } |
35 | 35 |
36 // Remove the specified atlas from the cache | 36 // Remove the specified atlas from the cache |
37 void GrTextureStripAtlas::CleanUp(const GrContext* context, void* info) { | 37 void GrTextureStripAtlas::CleanUp(const GrContext*, void* info) { |
38 GrAssert(NULL != info); | 38 GrAssert(NULL != info); |
39 | 39 |
40 AtlasEntry* entry = static_cast<AtlasEntry*>(info); | 40 AtlasEntry* entry = static_cast<AtlasEntry*>(info); |
41 | 41 |
42 // remove the cache entry | 42 // remove the cache entry |
43 GetCache()->remove(entry->fKey, entry); | 43 GetCache()->remove(entry->fKey, entry); |
44 | 44 |
45 // remove the actual entry | 45 // remove the actual entry |
46 SkDELETE(entry); | 46 SkDELETE(entry); |
47 | 47 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 | 337 |
338 // If we have locked rows, we should have a locked texture, otherwise | 338 // If we have locked rows, we should have a locked texture, otherwise |
339 // it should be unlocked | 339 // it should be unlocked |
340 if (fLockedRows == 0) { | 340 if (fLockedRows == 0) { |
341 GrAssert(NULL == fTexture); | 341 GrAssert(NULL == fTexture); |
342 } else { | 342 } else { |
343 GrAssert(NULL != fTexture); | 343 GrAssert(NULL != fTexture); |
344 } | 344 } |
345 } | 345 } |
346 #endif | 346 #endif |
OLD | NEW |