Commit 83dde7b9 by Geoff Lang Committed by Commit Bot

Use the std::unordered_map::at method instead of operator[].

It is known that the entry exists in the map, the at operator is slightly faster in this case. BUG=angleproject:2079 Change-Id: I3a64212293fa0320f3df5327e92d11eb7ef28c4f Reviewed-on: https://chromium-review.googlesource.com/543683Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent da066657
......@@ -813,7 +813,7 @@ void StateManagerGL::setGenericShaderState(const gl::Context *context)
{
const TextureGL *textureGL = GetImplAs<TextureGL>(texture);
if (mTextures[textureType][textureUnitIndex] != textureGL->getTextureID() ||
if (mTextures.at(textureType)[textureUnitIndex] != textureGL->getTextureID() ||
texture->hasAnyDirtyBit() || textureGL->hasAnyDirtyBit())
{
activeTexture(textureUnitIndex);
......@@ -826,7 +826,7 @@ void StateManagerGL::setGenericShaderState(const gl::Context *context)
}
else
{
if (mTextures[textureType][textureUnitIndex] != 0)
if (mTextures.at(textureType)[textureUnitIndex] != 0)
{
activeTexture(textureUnitIndex);
bindTexture(textureType, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment