Skip to content

Commit

Permalink
limit range of surface sizes in surface_image_unity
Browse files Browse the repository at this point in the history
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 <[email protected]>
Commit-Queue: Ben Wagner <[email protected]>
Reviewed-by: Ben Wagner <[email protected]>
  • Loading branch information
Mike Klein authored and Skia Commit-Bot committed Nov 1, 2018
1 parent ef77604 commit e978ca2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/SurfaceTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,16 +958,12 @@ DEF_TEST(surface_image_unity, reporter) {
}
};

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));
}
Expand Down

0 comments on commit e978ca2

Please sign in to comment.