Commit 32f0dd6aeee5da844d6320ad555283d40bedbd61

Geoff Lang 2020-10-15T10:08:51

Add Queries and Setters for resource initialization state. There are cases where we know that the next draw operation will fully initialize a texture/renderbuffer and we can save the robust resource init cost. Default all resource init state to Initialized, any redefinition will set it back to MayNeedInit. After setting an individual texture image to initialized, check if all images are now initialized and update the TextureState::mInitState to match. The cost of this check is only performed after initializing an image and allows future init checks to be faster. Bug: chromium:1132514 Change-Id: Ia23664ae162559d1614f1eb5643e24a491d87f7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2475456 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>