From 955b3d55808117f45e24de1db1e245b5491897ea Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Tue, 20 Feb 2018 11:55:48 -0500 Subject: tweak surface_image_unity on 32-bit bots The allocations implied by the larger sizes can exhaust the 32-bit virtual address space, even if we don't touch the bytes to page them in. Add a 1<<18 test case to make sure we always test something outside 16-bit sizes, even on 32-bit bots. Bug: skia:7614 Change-Id: I6bae930e89bd969931f478a8896f07451f7af595 Reviewed-on: https://skia-review.googlesource.com/108602 Reviewed-by: Mike Reed Commit-Queue: Mike Klein --- tests/SurfaceTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/SurfaceTest.cpp') diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp index 4ba549cd9a..ab91061094 100644 --- a/tests/SurfaceTest.cpp +++ b/tests/SurfaceTest.cpp @@ -1102,12 +1102,16 @@ DEF_TEST(surface_image_unity, reporter) { } }; - const int32_t sizes[] = { 0, 1, 1 << 15, 1 << 16, 1 << 28, 1 << 29, 1 << 30, -1 }; + const int32_t sizes[] = { 0, 1, 1 << 15, 1 << 16, 1 << 18, 1 << 28, 1 << 29, 1 << 30, -1 }; for (int cti = 0; cti <= kLastEnum_SkColorType; ++cti) { SkColorType ct = static_cast(cti); for (int ati = 0; ati <= kLastEnum_SkAlphaType; ++ati) { SkAlphaType at = static_cast(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)); } -- cgit v1.2.3