Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2014 Google Inc. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 #ifndef SkMaskCache_DEFINED | |
| 9 #define SkMaskCache_DEFINED | |
| 10 | |
| 11 #include "SkCachedData.h" | |
| 12 #include "SkMask.h" | |
| 13 #include "SkRect.h" | |
| 14 #include "SkResourceCache.h" | |
| 15 #include "SkRRect.h" | |
| 16 | |
| 17 class SkMaskCache { | |
| 18 public: | |
| 19 /** | |
| 20 * On success, return a ref to the SkCachedData that holds the pixels, and h ave mask | |
| 21 * already point to that memory. | |
| 22 * | |
| 23 * On failure, return NULL. | |
| 24 */ | |
| 25 static SkCachedData* FindAndRef(SkScalar sigma, const SkRRect& rrect, | |
| 26 SkMask* mask, SkResourceCache* localCache = NULL); | |
| 27 static SkCachedData* FindAndRef(SkScalar sigma, const SkRect rects[], | |
| 28 int32_t count, SkMask* mask, | |
|
reed1
2014/10/22 13:36:20
nit: skia just uses "int" for counts.
| |
| 29 SkResourceCache* localCache = NULL); | |
| 30 | |
| 31 /** | |
| 32 * Add a mask and its pixel-data to the cache. | |
| 33 */ | |
| 34 static void Add(SkScalar sigma, const SkRRect& rrect, | |
| 35 const SkMask& mask, SkCachedData* data, | |
| 36 SkResourceCache* localCache = NULL); | |
| 37 static void Add(SkScalar sigma, const SkRect rects[], int32_t count, | |
| 38 const SkMask& mask, SkCachedData* data, | |
| 39 SkResourceCache* localCache = NULL); | |
| 40 }; | |
| 41 | |
| 42 #endif | |
| OLD | NEW |