| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkYUVPlanesCache_DEFINED | 8 #ifndef SkYUVPlanesCache_DEFINED |
| 9 #define SkYUVPlanesCache_DEFINED | 9 #define SkYUVPlanesCache_DEFINED |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 */ | 28 */ |
| 29 struct Info { | 29 struct Info { |
| 30 SkISize fSize[3]; | 30 SkISize fSize[3]; |
| 31 size_t fSizeInMemory[3]; | 31 size_t fSizeInMemory[3]; |
| 32 size_t fRowBytes[3]; | 32 size_t fRowBytes[3]; |
| 33 SkYUVColorSpace fColorSpace; | 33 SkYUVColorSpace fColorSpace; |
| 34 }; | 34 }; |
| 35 /** | 35 /** |
| 36 * On success, return a ref to the SkCachedData that holds the pixels. | 36 * On success, return a ref to the SkCachedData that holds the pixels. |
| 37 * | 37 * |
| 38 * On failure, return NULL. | 38 * On failure, return nullptr. |
| 39 */ | 39 */ |
| 40 static SkCachedData* FindAndRef(uint32_t genID, Info* info, | 40 static SkCachedData* FindAndRef(uint32_t genID, Info* info, |
| 41 SkResourceCache* localCache = NULL); | 41 SkResourceCache* localCache = nullptr); |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * Add a pixelRef ID and its YUV planes data to the cache. | 44 * Add a pixelRef ID and its YUV planes data to the cache. |
| 45 */ | 45 */ |
| 46 static void Add(uint32_t genID, SkCachedData* data, Info* info, | 46 static void Add(uint32_t genID, SkCachedData* data, Info* info, |
| 47 SkResourceCache* localCache = NULL); | 47 SkResourceCache* localCache = nullptr); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 #endif | 50 #endif |
| OLD | NEW |