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

Unified Diff: tests/ImageFilterTest.cpp

Issue 230653005: Implement intra-frame cacheing in image filters. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Set minChildren to 2 by default; comment it. Created 6 years, 8 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
« src/core/SkImageFilter.cpp ('K') | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 4c8ddc6657ff0d23f47bdd8cb04eabeef0664daf..d2a5843a6bf7c82b522223c2f30ba96cf43108af 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -191,7 +191,8 @@ DEF_TEST(ImageFilter, reporter) {
SkDeviceImageFilterProxy proxy(&device);
SkIPoint loc = SkIPoint::Make(0, 0);
// An empty input should early return and return false
- SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeEmpty());
+ SkAutoTUnref<SkImageFilter::Cache> cache(SkImageFilter::Cache::Create(2));
+ SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeEmpty(), cache.get());
REPORTER_ASSERT(reporter,
!bicubic->filterImage(&proxy, bitmap, ctx, &result, &loc));
}
@@ -247,8 +248,10 @@ static void test_crop_rects(SkBaseDevice* device, skiatest::Reporter* reporter)
SkIPoint offset;
SkString str;
str.printf("filter %d", static_cast<int>(i));
- SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeLargest());
- REPORTER_ASSERT_MESSAGE(reporter, filter->filterImage(&proxy, bitmap, ctx, &result, &offset), str.c_str());
+ SkAutoTUnref<SkImageFilter::Cache> cache(SkImageFilter::Cache::Create(2));
+ SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeLargest(), cache.get());
+ REPORTER_ASSERT_MESSAGE(reporter, filter->filterImage(&proxy, bitmap, ctx,
+ &result, &offset), str.c_str());
REPORTER_ASSERT_MESSAGE(reporter, offset.fX == 20 && offset.fY == 30, str.c_str());
}
« src/core/SkImageFilter.cpp ('K') | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698