Fix unreasonable Canvas memory allocation
The maximum size allow for canvas initialization is 2147483647 (2^31-1). When such a canvas is created, it requires 2^62 * (byte per pixel) memory, or more than 1 terabyte of memory, to be allocate. It's not reasonable to update canvas memory usage based on this number. In this cl, I added a upper limit for the canvas size for memory usage calculation only. Bug: 1150554 Change-Id: I326a86fb804212b7f41f0f1cad153de35861b399 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2562825Reviewed-by:Fernando Serboncini <fserb@chromium.org> Commit-Queue: Yi Xu <yiyix@chromium.org> Cr-Commit-Position: refs/heads/master@{#832102}
Showing
Please register or sign in to comment