Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: tests/MaskCacheTest.cpp

Issue 669993003: use SkMaskCache inside SkBlurMaskFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MaskCacheTest.cpp
diff --git a/tests/MaskCacheTest.cpp b/tests/MaskCacheTest.cpp
index 0b83c62c00eb362f87f695b4cf3c61aec32c8ac4..f4e316c6c9712aeaa76d101c9ceef0b17f012c27 100644
--- a/tests/MaskCacheTest.cpp
+++ b/tests/MaskCacheTest.cpp
@@ -39,7 +39,7 @@ DEF_TEST(RRectMaskCache, reporter) {
SkBlurQuality quality = kLow_SkBlurQuality;
SkMask mask;
- SkCachedData* data = SkMaskCache::FindAndRef(sigma, rrect, style, quality, &mask, &cache);
+ SkCachedData* data = SkMaskCache::FindAndRef(sigma, style, quality, rrect, &mask, &cache);
REPORTER_ASSERT(reporter, NULL == data);
size_t size = 256;
@@ -48,14 +48,14 @@ DEF_TEST(RRectMaskCache, reporter) {
mask.fBounds.setXYWH(0, 0, 100, 100);
mask.fRowBytes = 100;
mask.fFormat = SkMask::kBW_Format;
- SkMaskCache::Add(sigma, rrect, style, quality, mask, data, &cache);
+ SkMaskCache::Add(sigma, style, quality, rrect, mask, data, &cache);
check_data(reporter, data, 2, kInCache, kLocked);
data->unref();
check_data(reporter, data, 1, kInCache, kUnlocked);
sk_bzero(&mask, sizeof(mask));
- data = SkMaskCache::FindAndRef(sigma, rrect, style, quality, &mask, &cache);
+ data = SkMaskCache::FindAndRef(sigma, style, quality, rrect, &mask, &cache);
REPORTER_ASSERT(reporter, data);
REPORTER_ASSERT(reporter, data->size() == size);
REPORTER_ASSERT(reporter, mask.fBounds.top() == 0 && mask.fBounds.bottom() == 100);
@@ -74,9 +74,10 @@ DEF_TEST(RectsMaskCache, reporter) {
SkRect rect = SkRect::MakeWH(100, 100);
SkRect rects[2] = {rect};
SkBlurStyle style = kNormal_SkBlurStyle;
+ SkBlurQuality quality = kLow_SkBlurQuality;
SkMask mask;
- SkCachedData* data = SkMaskCache::FindAndRef(sigma, rects, 1, style, &mask, &cache);
+ SkCachedData* data = SkMaskCache::FindAndRef(sigma, style, quality, rects, 1, &mask, &cache);
REPORTER_ASSERT(reporter, NULL == data);
size_t size = 256;
@@ -85,14 +86,14 @@ DEF_TEST(RectsMaskCache, reporter) {
mask.fBounds.setXYWH(0, 0, 100, 100);
mask.fRowBytes = 100;
mask.fFormat = SkMask::kBW_Format;
- SkMaskCache::Add(sigma, rects, 1, style, mask, data, &cache);
+ SkMaskCache::Add(sigma, style, quality, rects, 1, mask, data, &cache);
check_data(reporter, data, 2, kInCache, kLocked);
data->unref();
check_data(reporter, data, 1, kInCache, kUnlocked);
sk_bzero(&mask, sizeof(mask));
- data = SkMaskCache::FindAndRef(sigma, rects, 1, style, &mask, &cache);
+ data = SkMaskCache::FindAndRef(sigma, style, quality, rects, 1, &mask, &cache);
REPORTER_ASSERT(reporter, data);
REPORTER_ASSERT(reporter, data->size() == size);
REPORTER_ASSERT(reporter, mask.fBounds.top() == 0 && mask.fBounds.bottom() == 100);
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698