Index: src/core/SkMaskCache.cpp |
diff --git a/src/core/SkMaskCache.cpp b/src/core/SkMaskCache.cpp |
index 207ea0e77d330ebc0da8fb5f321a8af8a905b00d..b4b8b4faf359e18957c6a3b2998ee0c8bb39bb36 100644 |
--- a/src/core/SkMaskCache.cpp |
+++ b/src/core/SkMaskCache.cpp |
@@ -17,28 +17,6 @@ |
namespace { |
static unsigned gRRectBlurKeyNamespaceLabel; |
- |
-static bool copy_cacheddata_to_mask(SkCachedData* data, SkMask* mask) { |
- const size_t size = data->size(); |
- SkASSERT(mask->computeTotalImageSize() <= size); |
- |
- mask->fImage = SkMask::AllocImage(size); |
- if (mask->fImage) { |
- memcpy(mask->fImage, data->data(), size); |
- return true; |
- } |
- return false; |
-} |
- |
-static SkCachedData* copy_mask_to_cacheddata(const SkMask& mask) { |
- const size_t size = mask.computeTotalImageSize(); |
- SkCachedData* data = SkResourceCache::NewCachedData(size); |
- if (data) { |
- memcpy(data->writable_data(), mask.fImage, size); |
- return data; |
- } |
- return NULL; |
-} |
struct RRectBlurKey : public SkResourceCache::Key { |
public: |
@@ -110,20 +88,6 @@ |
SkResourceCache* localCache) { |
RRectBlurKey key(sigma, rrect, style, quality); |
return CHECK_LOCAL(localCache, add, Add, SkNEW_ARGS(RRectBlurRec, (key, mask, data))); |
-} |
- |
-bool SkMaskCache::FindAndCopy(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, |
- const SkRRect& rrect, SkMask* mask) { |
- SkAutoTUnref<SkCachedData> data(SkMaskCache::FindAndRef(sigma, style, quality, rrect, mask)); |
- return data.get() && copy_cacheddata_to_mask(data, mask); |
-} |
- |
-void SkMaskCache::AddAndCopy(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, |
- const SkRRect& rrect, const SkMask& mask) { |
- SkAutoTUnref<SkCachedData> data(copy_mask_to_cacheddata(mask)); |
- if (data.get()) { |
- SkMaskCache::Add(sigma, style, quality, rrect, mask, data); |
- } |
} |
////////////////////////////////////////////////////////////////////////////////////////// |
@@ -217,17 +181,3 @@ |
RectsBlurKey key(sigma, style, quality, rects, count); |
return CHECK_LOCAL(localCache, add, Add, SkNEW_ARGS(RectsBlurRec, (key, mask, data))); |
} |
- |
-bool SkMaskCache::FindAndCopy(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, |
- const SkRect rects[], int count, SkMask* mask) { |
- SkAutoTUnref<SkCachedData> data(SkMaskCache::FindAndRef(sigma, style, quality, rects, count, mask)); |
- return data.get() && copy_cacheddata_to_mask(data, mask); |
-} |
- |
-void SkMaskCache::AddAndCopy(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, |
- const SkRect rects[], int count, const SkMask& mask) { |
- SkAutoTUnref<SkCachedData> data(copy_mask_to_cacheddata(mask)); |
- if (data.get()) { |
- SkMaskCache::Add(sigma, style, quality, rects, count, mask, data); |
- } |
-} |