aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SurfaceTest.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2018-02-20 11:55:48 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-21 18:33:36 +0000
commit955b3d55808117f45e24de1db1e245b5491897ea (patch)
treee3308cce29dbabc180b6be0ddebc29317ed12ee2 /tests/SurfaceTest.cpp
parent83286a0df2a6ab1c83644bd3cba242b9741b43be (diff)
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 <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/SurfaceTest.cpp')
-rw-r--r--tests/SurfaceTest.cpp6
1 files changed, 5 insertions, 1 deletions
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<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));
}