aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-03-25 12:55:52 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-25 12:55:52 -0700
commit9cf31f40fb5df6b6b914e087394c40b8303e5e32 (patch)
tree482dda75bde1107885d6142e4aab0631c70e70b3
parent397536cabe12a9936659870dd220c869789424ba (diff)
SkMipMap::Build supports 1xN and Nx1 inputs, so remove the special case from the test harness. Update a no-longer-correct comment.
-rw-r--r--tests/MipMapTest.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/MipMapTest.cpp b/tests/MipMapTest.cpp
index 4d4574698e..467fd34998 100644
--- a/tests/MipMapTest.cpp
+++ b/tests/MipMapTest.cpp
@@ -20,10 +20,8 @@ DEF_TEST(MipMap, reporter) {
SkRandom rand;
for (int i = 0; i < 500; ++i) {
- // for now, Build needs a min size of 2, otherwise it will return nullptr.
- // should fix that to support 1 X N, where N > 1 to return non-null.
- int width = 2 + rand.nextU() % 1000;
- int height = 2 + rand.nextU() % 1000;
+ int width = 1 + rand.nextU() % 1000;
+ int height = 1 + rand.nextU() % 1000;
make_bitmap(&bm, width, height);
SkAutoTUnref<SkMipMap> mm(SkMipMap::Build(bm, nullptr));
@@ -118,7 +116,7 @@ DEF_TEST(MipMap_ComputeLevelCount, reporter) {
{-100, -100, 0},
// Test mipmaps with 0, 1, 2 as dimensions
- // (SkMipMap::Build requires a min size of 2)
+ // (SkMipMap::Build requires a min size of 1)
//
// 0
{0, 100, 0},