[webgl] Handle trivial case in GLES2Implementation::ReadPixels
ReadPixels required the {pixels} parameter not to be nullptr, even when it pointed into an ArrayBuffer of size 0. This requires the ArrayBuffer implementation to allocate a backing store of size 0 instead of just keeping a nullptr. With this CL we handle the trivial case (width == 0 or height == 0) in the beginning as a no-op, so that nullptr as backing store is okay. Bug: chromium:1008840 Change-Id: If7337bf2bb625e4f8addb0d346c5db276b555695 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1893059Reviewed-by:Kenneth Russell <kbr@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#712999}
Showing
Please register or sign in to comment