diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-28 14:43:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-29 11:12:47 +0200 |
commit | 3dfc17ed6334c619228668ffeff591bc75d32025 (patch) | |
tree | b2c985c9557151e120ddb10c4cc82bda4d7835ce /vcl/opengl/texture.cxx | |
parent | f8e989c2384250d30f84651eb03673fb8d8dd096 (diff) |
loplugin:constantparam (3)
Change-Id: Ifc47bb8e096c9a8563021b2fcb44199577740746
Reviewed-on: https://gerrit.libreoffice.org/59747
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/opengl/texture.cxx')
-rw-r--r-- | vcl/opengl/texture.cxx | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx index 45b3b35b7712..2862cce52352 100644 --- a/vcl/opengl/texture.cxx +++ b/vcl/opengl/texture.cxx @@ -380,7 +380,7 @@ void OpenGLTexture::GetCoord( GLfloat* pCoord, const SalTwoRect& rPosAry, bool b } } -void OpenGLTexture::GetTextureRect(const SalTwoRect& rPosAry, bool bInverted, GLfloat& x1, GLfloat& x2, GLfloat& y1, GLfloat& y2) const +void OpenGLTexture::GetTextureRect(const SalTwoRect& rPosAry, GLfloat& x1, GLfloat& x2, GLfloat& y1, GLfloat& y2) const { if (IsValid()) { @@ -390,16 +390,8 @@ void OpenGLTexture::GetTextureRect(const SalTwoRect& rPosAry, bool bInverted, GL x1 = (maRect.Left() + rPosAry.mnSrcX) / fTextureWidth; x2 = (maRect.Left() + rPosAry.mnSrcX + rPosAry.mnSrcWidth) / fTextureWidth; - if (bInverted) - { - y2 = 1.0f - (maRect.Top() + rPosAry.mnSrcY) / fTextureHeight; - y1 = 1.0f - (maRect.Top() + rPosAry.mnSrcY + rPosAry.mnSrcHeight) / fTextureHeight; - } - else - { - y1 = 1.0f - (maRect.Top() + rPosAry.mnSrcY) / fTextureHeight; - y2 = 1.0f - (maRect.Top() + rPosAry.mnSrcY + rPosAry.mnSrcHeight) / fTextureHeight; - } + y1 = 1.0f - (maRect.Top() + rPosAry.mnSrcY) / fTextureHeight; + y2 = 1.0f - (maRect.Top() + rPosAry.mnSrcY + rPosAry.mnSrcHeight) / fTextureHeight; } } @@ -411,7 +403,7 @@ void OpenGLTexture::FillCoords<GL_TRIANGLE_FAN>(std::vector<GLfloat>& rCoords, c GLfloat y1 = 0.0f; GLfloat y2 = 0.0f; - GetTextureRect(rPosAry, false/*bInverted*/, x1, x2, y1, y2); + GetTextureRect(rPosAry, x1, x2, y1, y2); rCoords.insert(rCoords.end(), { x1, y2, x1, y1, @@ -427,7 +419,7 @@ void OpenGLTexture::FillCoords<GL_TRIANGLES>(std::vector<GLfloat>& rCoords, cons GLfloat y1 = 0.0f; GLfloat y2 = 0.0f; - GetTextureRect(rPosAry, false/*bInverted*/, x1, x2, y1, y2); + GetTextureRect(rPosAry, x1, x2, y1, y2); rCoords.insert(rCoords.end(), { x1, y1, x2, y1, x1, y2, |