diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-24 10:10:11 +0000 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-12-02 15:47:29 +0100 |
commit | 8296e1d191e5f58977b6aafebf6da77129219ecb (patch) | |
tree | 72da7d4c254730c1ebf7adc60178f175b327747d /vcl/opengl/gdiimpl.cxx | |
parent | c2728f5406f1a871b42e8c5c2cce5352ed9799e2 (diff) |
coverity#1255909 Uninitialized scalar field
Change-Id: I162199233c9d3feb03e7ab33b777174b2a03035a
Reviewed-on: https://gerrit.libreoffice.org/13104
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/opengl/gdiimpl.cxx')
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 3802a7e37312..a6b0f84ce19b 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -381,11 +381,9 @@ bool OpenGLSalGraphicsImpl::CheckOffscreenTexture() return true; } - SalTwoRect aPosAry; - aPosAry.mnSrcX = aPosAry.mnDestX = 0; - aPosAry.mnSrcY = aPosAry.mnDestY = 0; - aPosAry.mnSrcWidth = aPosAry.mnDestWidth = GetWidth(); - aPosAry.mnSrcHeight = aPosAry.mnDestHeight = GetHeight(); + GLfloat fWidth = GetWidth(); + GLfloat fHeight = GetHeight(); + SalTwoRect aPosAry(0, 0, fWidth, fHeight, 0,0, fWidth, fHeight); // TODO: improve performance: lfrb: User GL_ARB_copy_image? OpenGLTexture aNewTex = OpenGLTexture( GetWidth(), GetHeight() ); @@ -882,7 +880,6 @@ void OpenGLSalGraphicsImpl::DrawTransformedTexture( 0, (float) rTexture.GetHeight(), 0, 0, (float) rTexture.GetWidth(), 0, (float) rTexture.GetWidth(), (float) rTexture.GetHeight() }; GLfloat aTexCoord[8]; - SalTwoRect aPosAry; if( rMask ) { @@ -920,9 +917,9 @@ void OpenGLSalGraphicsImpl::DrawTransformedTexture( rTexture.SetFilter( GL_LINEAR ); CHECK_GL_ERROR(); - aPosAry.mnSrcX = aPosAry.mnSrcY = 0; - aPosAry.mnSrcWidth = rTexture.GetWidth(); - aPosAry.mnSrcHeight = rTexture.GetHeight(); + GLfloat fWidth = rTexture.GetWidth(); + GLfloat fHeight = rTexture.GetHeight(); + SalTwoRect aPosAry(0, 0, fWidth, fHeight, 0, 0, fWidth, fHeight); rTexture.GetCoord( aTexCoord, aPosAry ); glEnableVertexAttribArray( GL_ATTRIB_TEX ); glVertexAttribPointer( GL_ATTRIB_TEX, 2, GL_FLOAT, GL_FALSE, 0, aTexCoord ); @@ -1514,14 +1511,7 @@ void OpenGLSalGraphicsImpl::copyArea( { SAL_INFO( "vcl.opengl", "::copyArea " << nSrcX << "," << nSrcY << " >> " << nDestX << "," << nDestY << " (" << nSrcWidth << "," << nSrcHeight << ")" ); OpenGLTexture aTexture; - SalTwoRect aPosAry; - - aPosAry.mnSrcX = 0; - aPosAry.mnSrcY = 0; - aPosAry.mnDestX = nDestX; - aPosAry.mnDestY = nDestY; - aPosAry.mnSrcWidth = aPosAry.mnDestWidth = nSrcWidth; - aPosAry.mnSrcHeight = aPosAry.mnDestHeight = nSrcHeight; + SalTwoRect aPosAry(0, 0, nSrcWidth, nSrcHeight, nDestX, nDestY, nSrcWidth, nSrcHeight); PreDraw(); aTexture = OpenGLTexture( nSrcX, GetHeight() - nSrcY - nSrcHeight, nSrcWidth, nSrcHeight ); |