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

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: Address code review comments 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
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | tests/SpecialImageTest.cpp » ('j') | 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 f1df84e20b04adc3204f96b20e7be2228f2a0232..b37f9589f78223f591491c2a7c89da6e9b57fdda 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);
}
@@ -1504,7 +1504,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);
}
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | tests/SpecialImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698