OSDN Git Service

[GLESv3] Fix build
authorLingfeng Yang <lfy@google.com>
Thu, 12 Jan 2017 01:06:42 +0000 (17:06 -0800)
committerLingfeng Yang <lfy@google.com>
Thu, 12 Jan 2017 01:06:42 +0000 (17:06 -0800)
Change-Id: I1255b2505eec7ce032992b99c20df4a1dca4394f

shared/OpenglCodecCommon/GLClientState.cpp
shared/OpenglCodecCommon/GLSharedGroup.cpp

index 2148e2e..0cd2e8d 100644 (file)
@@ -151,7 +151,7 @@ void GLClientState::setVertexBindingDivisor(int bindingindex, GLuint divisor) {
 }
 
 const GLClientState::BufferBinding& GLClientState::getCurrAttributeBindingInfo(int attribindex) {
-    return m_currVaoState.bufferBindings_const().at(m_currVaoState[attribindex].bindingindex);
+    return m_currVaoState.bufferBindings_const()[m_currVaoState[attribindex].bindingindex];
 }
 
 void GLClientState::setVertexAttribBinding(int attribindex, int bindingindex) {
@@ -204,7 +204,7 @@ void GLClientState::addVertexArrayObject(GLuint name) {
                 name,
                 VAOState(0, m_nLocations, std::max(m_nLocations, m_max_vertex_attrib_bindings))));
     VertexAttribStateVector& attribState =
-        m_vaoMap.at(name).attribState;
+        m_vaoMap.find(name)->second.attribState;
     for (int i = 0; i < m_nLocations; i++) {
         attribState[i].enabled = 0;
         attribState[i].enableDirty = false;
@@ -720,7 +720,6 @@ int GLClientState::compareTexId(const void* pid, const void* prec)
 GLenum GLClientState::bindTexture(GLenum target, GLuint texture,
         GLboolean* firstUse)
 {
-    assert(m_tex.textureRecs);
     GLboolean first = GL_FALSE;
 
     TextureRec* texrec = getTextureRec(texture);
@@ -1343,13 +1342,13 @@ FboProps& GLClientState::boundFboProps(GLenum target) {
 const FboProps& GLClientState::boundFboProps_const(GLenum target) const {
     switch (target) {
     case GL_DRAW_FRAMEBUFFER:
-        return mFboState.fboData.at(mFboState.boundDrawFramebuffer);
+        return mFboState.fboData.find(mFboState.boundDrawFramebuffer)->second;
     case GL_READ_FRAMEBUFFER:
-        return mFboState.fboData.at(mFboState.boundReadFramebuffer);
+        return mFboState.fboData.find(mFboState.boundReadFramebuffer)->second;
     case GL_FRAMEBUFFER:
-        return mFboState.fboData.at(mFboState.boundDrawFramebuffer);
+        return mFboState.fboData.find(mFboState.boundDrawFramebuffer)->second;
     }
-    return mFboState.fboData.at(mFboState.boundDrawFramebuffer);
+    return mFboState.fboData.find(mFboState.boundDrawFramebuffer)->second;
 }
 
 void GLClientState::bindFramebuffer(GLenum target, GLuint name) {
index 58dc89a..beaf1e2 100755 (executable)
@@ -511,7 +511,7 @@ GLint GLSharedGroup::getNextSamplerUniform(GLuint program, GLint index, GLint* v
     ProgramData* pData = m_programs.valueFor(program);
     if (pData) return pData->getNextSamplerUniform(index, val, target);
     if (m_shaderProgramIdMap.find(program) == m_shaderProgramIdMap.end()) return -1;
-    ShaderProgramData* spData = m_shaderPrograms.valueFor(m_shaderProgramIdMap.at(program));
+    ShaderProgramData* spData = m_shaderPrograms.valueFor(m_shaderProgramIdMap.find(program)->second);
     if (spData) return spData->programData->getNextSamplerUniform(index, val, target);
     return -1;
 }