diff options
author | reed <reed@google.com> | 2016-01-16 18:50:35 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-16 18:50:35 -0800 |
commit | 67b09bf6b7422c7a3209781cbb7827224e3ffc17 (patch) | |
tree | abbf8933a1cc4d7ffd52b02d98560133d030c552 /tests | |
parent | 879caf86fd9b906d326f9cffe6933817019078b2 (diff) |
use pixmaps in mipmap api
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1598803002
Review URL: https://codereview.chromium.org/1598803002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/MipMapTest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/MipMapTest.cpp b/tests/MipMapTest.cpp index 5e5e894870..11021e6ebf 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; } |