Descriptioncc: Prevent allocating memory buffers too large in tests.
We were OOMing a unit test on lollipop devices since we were using a
resource larger than MAX_TEXTURE_SIZE which is 2048, so we had a
bitmap of size:
(100 * 2048 / 9.9, 15 * 2048 / 9.9)
= (20687, 3104)
Which is an ARGB32 bitmap so 4 bytes per pixel: 256,849,792 bytes.
With this patch we have
(100 * 512 / 9.9, 15 * 512 / 9.9)
= (5172, 776)
Which is 4,013,472 which will fit in memory much easier.
R=enne
BUG=642333
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
Committed: https://crrev.com/dd8e0f1980106ae0b0ff3ca86034b115c955d61b
Cr-Commit-Position: refs/heads/master@{#416289}
Patch Set 1 #Patch Set 2 : scrollbartexsize: . #Messages
Total messages: 17 (10 generated)
|