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

Unified Diff: tests/MipMapTest.cpp

Issue 1831983003: SkMipMap::Build supports 1xN and Nx1 inputs, so remove the special case from the test harness. Updat (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update no-longer-correct comment. Created 4 years, 9 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 | « no previous file | 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 4d4574698eac2bc85b6b2838e36f9d63cb86d5c6..467fd34998f32d1afb75e28f78ff7988600b9141 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},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698