diff options
author | robertphillips <robertphillips@google.com> | 2016-04-08 12:10:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-08 12:10:42 -0700 |
commit | 646125114b42b24e5ada3c9f8fac53a85f9ad2a0 (patch) | |
tree | c5d599427e99f89313131114b977f33232c3df48 /tests/ImageFilterTest.cpp | |
parent | 89c2a0b8c12879f94f746a5d9fe723a48434647f (diff) |
Upgrade SkSpecialImage to have getTextureRef & getROPixels entry points
This more closely aligns the SkSpecialImage API with the SkImage API. In doing so it allows the image filters to handle SkImages that can sneak through while remaining encoded (e.g., if an input filter just returns a wrapped version of the source SkImage)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1861643003
Review URL: https://codereview.chromium.org/1861643003
Diffstat (limited to 'tests/ImageFilterTest.cpp')
-rw-r--r-- | tests/ImageFilterTest.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp index f1df84e20b..b37f9589f7 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); } |