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

Unified Diff: tests/MipMapTest.cpp

Issue 1686563002: Relocate anisotropic mipmap logic to SkMipMap::extractLevel() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 11021e6ebf960ef674c6a9b4f35bfde0275d30e9..32fa34f8fb7d226df8a8d08177f3544723fd44e5 100644
--- a/tests/MipMapTest.cpp
+++ b/tests/MipMapTest.cpp
@@ -27,8 +27,10 @@ DEF_TEST(MipMap, reporter) {
make_bitmap(&bm, rand);
SkAutoTUnref<SkMipMap> mm(SkMipMap::Build(bm, nullptr));
- REPORTER_ASSERT(reporter, !mm->extractLevel(SK_Scalar1, nullptr));
- REPORTER_ASSERT(reporter, !mm->extractLevel(SK_Scalar1 * 2, nullptr));
+ REPORTER_ASSERT(reporter, !mm->extractLevel(SkSize::Make(SK_Scalar1, SK_Scalar1),
+ nullptr));
+ REPORTER_ASSERT(reporter, !mm->extractLevel(SkSize::Make(SK_Scalar1 * 2, SK_Scalar1 * 2),
+ nullptr));
SkMipMap::Level prevLevel;
sk_bzero(&prevLevel, sizeof(prevLevel));
@@ -38,7 +40,7 @@ DEF_TEST(MipMap, reporter) {
scale = scale * 2 / 3;
SkMipMap::Level level;
- if (mm->extractLevel(scale, &level)) {
+ if (mm->extractLevel(SkSize::Make(scale, scale), &level)) {
REPORTER_ASSERT(reporter, level.fPixmap.addr());
REPORTER_ASSERT(reporter, level.fPixmap.width() > 0);
REPORTER_ASSERT(reporter, level.fPixmap.height() > 0);
« 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