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

Unified Diff: tests/ImageFilterTest.cpp

Issue 1861643003: Upgrade SkSpecialImage to have getTextureRef & getROPixels entry points (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Really fix no-GPU build Created 4 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
Index: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index b0b7349aeaeab7d2333d2197d2018c4a9ad06a81..4301aeb5c1dc3856e71bef49620452675f69612b 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -580,10 +580,10 @@ static void test_negative_blur_sigma(SkImageFilter::Proxy* proxy,
SkBitmap positiveResultBM1, positiveResultBM2;
SkBitmap negativeResultBM1, negativeResultBM2;
- TestingSpecialImageAccess::GetROPixels(positiveResult1.get(), &positiveResultBM1);
- TestingSpecialImageAccess::GetROPixels(positiveResult2.get(), &positiveResultBM2);
- TestingSpecialImageAccess::GetROPixels(negativeResult1.get(), &negativeResultBM1);
- TestingSpecialImageAccess::GetROPixels(negativeResult2.get(), &negativeResultBM2);
+ REPORTER_ASSERT(reporter, positiveResult1->getROPixels(&positiveResultBM1));
+ REPORTER_ASSERT(reporter, positiveResult2->getROPixels(&positiveResultBM2));
+ REPORTER_ASSERT(reporter, negativeResult1->getROPixels(&negativeResultBM1));
+ REPORTER_ASSERT(reporter, negativeResult2->getROPixels(&negativeResultBM2));
SkAutoLockPixels lockP1(positiveResultBM1);
SkAutoLockPixels lockP2(positiveResultBM2);
@@ -683,7 +683,7 @@ static void test_zero_blur_sigma(SkImageFilter::Proxy* proxy,
SkBitmap resultBM;
- TestingSpecialImageAccess::GetROPixels(result.get(), &resultBM);
+ REPORTER_ASSERT(reporter, result->getROPixels(&resultBM));
SkAutoLockPixels lock(resultBM);
for (int y = 0; y < resultBM.height(); y++) {
@@ -725,7 +725,7 @@ static void test_fail_affects_transparent_black(SkImageFilter::Proxy* proxy,
REPORTER_ASSERT(reporter, nullptr != result.get());
if (result.get()) {
SkBitmap resultBM;
- TestingSpecialImageAccess::GetROPixels(result.get(), &resultBM);
+ REPORTER_ASSERT(reporter, result->getROPixels(&resultBM));
SkAutoLockPixels lock(resultBM);
REPORTER_ASSERT(reporter, *resultBM.getAddr32(0, 0) == SK_ColorGREEN);
}
@@ -1499,7 +1499,7 @@ static void test_composed_imagefilter_bounds(SkImageFilter::Proxy* proxy,
REPORTER_ASSERT(reporter, result->subset().size() == SkISize::Make(100, 100));
SkBitmap resultBM;
- TestingSpecialImageAccess::GetROPixels(result.get(), &resultBM);
+ REPORTER_ASSERT(reporter, result->getROPixels(&resultBM));
SkAutoLockPixels lock(resultBM);
REPORTER_ASSERT(reporter, resultBM.getColor(50, 50) == SK_ColorGREEN);
}

Powered by Google App Engine
This is Rietveld 408576698