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

Unified Diff: tests/SurfaceTest.cpp

Issue 536003002: Hide fields in SkImageInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix qt Created 6 years, 3 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 | « tests/SerializationTest.cpp ('k') | tools/LazyDecodeBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SurfaceTest.cpp
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index d31718694712db5cfa341df88a373639efaa146e..eca929e0cc5b8199a408c3db95956b5cc8b26591 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -90,7 +90,7 @@ static SkImage* createImage(ImageType imageType, GrContext* context,
const SkPMColor pmcolor = SkPreMultiplyColor(color);
const SkImageInfo info = SkImageInfo::MakeN32Premul(10, 10);
const size_t rowBytes = info.minRowBytes();
- const size_t size = rowBytes * info.fHeight;
+ const size_t size = rowBytes * info.height();
void* addr = sk_malloc_throw(size);
sk_memset32((SkPMColor*)addr, pmcolor, SkToInt(size >> 2));
@@ -142,11 +142,11 @@ static void test_imagepeek(skiatest::Reporter* reporter) {
bool success = (NULL != addr);
REPORTER_ASSERT(reporter, gRec[i].fPeekShouldSucceed == success);
if (success) {
- REPORTER_ASSERT(reporter, 10 == info.fWidth);
- REPORTER_ASSERT(reporter, 10 == info.fHeight);
- REPORTER_ASSERT(reporter, kN32_SkColorType == info.fColorType);
- REPORTER_ASSERT(reporter, kPremul_SkAlphaType == info.fAlphaType ||
- kOpaque_SkAlphaType == info.fAlphaType);
+ REPORTER_ASSERT(reporter, 10 == info.width());
+ REPORTER_ASSERT(reporter, 10 == info.height());
+ REPORTER_ASSERT(reporter, kN32_SkColorType == info.colorType());
+ REPORTER_ASSERT(reporter, kPremul_SkAlphaType == info.alphaType() ||
+ kOpaque_SkAlphaType == info.alphaType());
REPORTER_ASSERT(reporter, info.minRowBytes() <= rowBytes);
REPORTER_ASSERT(reporter, pmcolor == *(const SkPMColor*)addr);
}
« no previous file with comments | « tests/SerializationTest.cpp ('k') | tools/LazyDecodeBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698