limit range of surface sizes in surface_image_unity
We're already not testing these giants sizes on 32-bit machines because
they overrun memory. I'm not sure it's important to test them at all.
Change-Id: I322d46add8024760fc71939abe09430f77cbd69d
Reviewed-on: https://skia-review.googlesource.com/c/165767
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 694a86c..87dc561 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -958,16 +958,12 @@
}
};
- const int32_t sizes[] = { 0, 1, 1 << 15, 1 << 16, 1 << 18, 1 << 28, 1 << 29, 1 << 30, -1 };
+ const int32_t sizes[] = { -1, 0, 1, 1 << 18 };
for (int cti = 0; cti <= kLastEnum_SkColorType; ++cti) {
SkColorType ct = static_cast<SkColorType>(cti);
for (int ati = 0; ati <= kLastEnum_SkAlphaType; ++ati) {
SkAlphaType at = static_cast<SkAlphaType>(ati);
for (int32_t size : sizes) {
- // Large allocations tend to make the 32-bit bots run out of virtual address space.
- if (sizeof(size_t) == 4 && size > (1<<20)) {
- continue;
- }
do_test(SkImageInfo::Make(1, size, ct, at));
do_test(SkImageInfo::Make(size, 1, ct, at));
}