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>
This commit is contained in:
parent
83286a0df2
commit
955b3d5580
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user