Commit 458c654b by jchen10 Committed by Commit Bot

Fix type cast errors in GLES1State

Bug: angleproject:2306 Change-Id: Ic63de75d12b76395450517c99b742b8a5807cf9b Reviewed-on: https://chromium-review.googlesource.com/1179373Reviewed-by: 's avatarLingfeng Yang <lfy@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
parent d731ff82
...@@ -206,16 +206,16 @@ MatrixType GLES1State::getMatrixMode() const ...@@ -206,16 +206,16 @@ MatrixType GLES1State::getMatrixMode() const
return mMatrixMode; return mMatrixMode;
} }
int GLES1State::getCurrentMatrixStackDepth(GLenum queryType) const GLint GLES1State::getCurrentMatrixStackDepth(GLenum queryType) const
{ {
switch (queryType) switch (queryType)
{ {
case GL_MODELVIEW_STACK_DEPTH: case GL_MODELVIEW_STACK_DEPTH:
return mModelviewMatrices.size(); return clampCast<GLint>(mModelviewMatrices.size());
case GL_PROJECTION_STACK_DEPTH: case GL_PROJECTION_STACK_DEPTH:
return mProjectionMatrices.size(); return clampCast<GLint>(mProjectionMatrices.size());
case GL_TEXTURE_STACK_DEPTH: case GL_TEXTURE_STACK_DEPTH:
return mTextureMatrices[mGLState->getActiveSampler()].size(); return clampCast<GLint>(mTextureMatrices[mGLState->getActiveSampler()].size());
default: default:
UNREACHABLE(); UNREACHABLE();
return 0; return 0;
......
...@@ -148,7 +148,7 @@ class GLES1State final : angle::NonCopyable ...@@ -148,7 +148,7 @@ class GLES1State final : angle::NonCopyable
void setMatrixMode(MatrixType mode); void setMatrixMode(MatrixType mode);
MatrixType getMatrixMode() const; MatrixType getMatrixMode() const;
int getCurrentMatrixStackDepth(GLenum param) const; GLint getCurrentMatrixStackDepth(GLenum param) const;
void pushMatrix(); void pushMatrix();
void popMatrix(); void popMatrix();
......
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