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

Unified Diff: tests/MipMapTest.cpp

Issue 1598803002: use pixmaps in mipmap api (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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/core/SkMipMap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MipMapTest.cpp
diff --git a/tests/MipMapTest.cpp b/tests/MipMapTest.cpp
index 5e5e894870f813b2869723025abee595b9a84828..11021e6ebf960ef674c6a9b4f35bfde0275d30e9 100644
--- a/tests/MipMapTest.cpp
+++ b/tests/MipMapTest.cpp
@@ -39,14 +39,14 @@ DEF_TEST(MipMap, reporter) {
SkMipMap::Level level;
if (mm->extractLevel(scale, &level)) {
- REPORTER_ASSERT(reporter, level.fPixels);
- REPORTER_ASSERT(reporter, level.fWidth > 0);
- REPORTER_ASSERT(reporter, level.fHeight > 0);
- REPORTER_ASSERT(reporter, level.fRowBytes >= level.fWidth * 4);
-
- if (prevLevel.fPixels) {
- REPORTER_ASSERT(reporter, level.fWidth <= prevLevel.fWidth);
- REPORTER_ASSERT(reporter, level.fHeight <= prevLevel.fHeight);
+ REPORTER_ASSERT(reporter, level.fPixmap.addr());
+ REPORTER_ASSERT(reporter, level.fPixmap.width() > 0);
+ REPORTER_ASSERT(reporter, level.fPixmap.height() > 0);
+ REPORTER_ASSERT(reporter, (int)level.fPixmap.rowBytes() >= level.fPixmap.width() * 4);
+
+ if (prevLevel.fPixmap.addr()) {
+ REPORTER_ASSERT(reporter, level.fPixmap.width() <= prevLevel.fPixmap.width());
+ REPORTER_ASSERT(reporter, level.fPixmap.height() <= prevLevel.fPixmap.height());
}
prevLevel = level;
}
« no previous file with comments | « src/core/SkMipMap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698