Index: tests/SpecialImageTest.cpp |
diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp |
index 7ab7cfc4ce17ef228d933cc0ffa7bc8b48316c2d..f5174478ef27e672adbb439918b9cb63c33d8f83 100644 |
--- a/tests/SpecialImageTest.cpp |
+++ b/tests/SpecialImageTest.cpp |
@@ -75,8 +75,13 @@ |
// Test getROPixels - this should always succeed regardless of backing store |
SkBitmap bitmap; |
REPORTER_ASSERT(reporter, img->getROPixels(&bitmap)); |
- REPORTER_ASSERT(reporter, size == bitmap.width()); |
- REPORTER_ASSERT(reporter, size == bitmap.height()); |
+ if (context) { |
+ REPORTER_ASSERT(reporter, kSmallerSize == bitmap.width()); |
+ REPORTER_ASSERT(reporter, kSmallerSize == bitmap.height()); |
+ } else { |
+ REPORTER_ASSERT(reporter, size == bitmap.width()); |
+ REPORTER_ASSERT(reporter, size == bitmap.height()); |
+ } |
//-------------- |
// Test that draw restricts itself to the subset |
@@ -163,12 +168,12 @@ |
{ |
sk_sp<SkSpecialImage> subSImg1(SkSpecialImage::MakeFromImage(subset, fullImage)); |
- test_image(subSImg1, reporter, nullptr, false, kPad, kSmallerSize); |
+ test_image(subSImg1, reporter, nullptr, false, kPad, kFullSize); |
} |
{ |
sk_sp<SkSpecialImage> subSImg2(fullSImage->makeSubset(subset)); |
- test_image(subSImg2, reporter, nullptr, false, kPad, kSmallerSize); |
+ test_image(subSImg2, reporter, nullptr, false, 0, kSmallerSize); |
} |
} |
@@ -295,12 +300,12 @@ |
subset, |
kNeedNewImageUniqueID_SpecialImage, |
texture)); |
- test_image(subSImg1, reporter, context, true, kPad, kSmallerSize); |
+ test_image(subSImg1, reporter, context, true, kPad, kFullSize); |
} |
{ |
sk_sp<SkSpecialImage> subSImg2(fullSImg->makeSubset(subset)); |
- test_image(subSImg2, reporter, context, true, kPad, kSmallerSize); |
+ test_image(subSImg2, reporter, context, true, kPad, kFullSize); |
} |
} |