OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 SkBitmapCache_DEFINED | 8 #ifndef SkBitmapCache_DEFINED |
9 #define SkBitmapCache_DEFINED | 9 #define SkBitmapCache_DEFINED |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 * Search based on the bitmap's genID and subset. If found, returns true an
d | 43 * Search based on the bitmap's genID and subset. If found, returns true an
d |
44 * result will be set to the matching bitmap with its pixels already locked
. | 44 * result will be set to the matching bitmap with its pixels already locked
. |
45 */ | 45 */ |
46 static bool Find(uint32_t genID, const SkIRect& subset, SkBitmap* result, | 46 static bool Find(uint32_t genID, const SkIRect& subset, SkBitmap* result, |
47 SkResourceCache* localCache = NULL); | 47 SkResourceCache* localCache = NULL); |
48 | 48 |
49 /** | 49 /** |
50 * The width and the height of the provided subset must be the same as the r
esult bitmap ones. | 50 * The width and the height of the provided subset must be the same as the r
esult bitmap ones. |
51 * result must be marked isImmutable() | 51 * result must be marked isImmutable() |
52 */ | 52 */ |
53 static bool Add(uint32_t genID, const SkIRect& subset, const SkBitmap& resul
t, | 53 static bool Add(SkPixelRef*, const SkIRect& subset, const SkBitmap& result, |
54 SkResourceCache* localCache = NULL); | 54 SkResourceCache* localCache = NULL); |
55 }; | 55 }; |
56 | 56 |
57 class SkMipMapCache { | 57 class SkMipMapCache { |
58 public: | 58 public: |
59 static const SkMipMap* FindAndRef(const SkBitmap& src, SkResourceCache* loca
lCache = NULL); | 59 static const SkMipMap* FindAndRef(const SkBitmap& src, SkResourceCache* loca
lCache = NULL); |
60 static const SkMipMap* AddAndRef(const SkBitmap& src, SkResourceCache* local
Cache = NULL); | 60 static const SkMipMap* AddAndRef(const SkBitmap& src, SkResourceCache* local
Cache = NULL); |
61 }; | 61 }; |
62 | 62 |
63 #endif | 63 #endif |
OLD | NEW |