summaryrefslogtreecommitdiff
path: root/vcl/opengl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2016-02-09 23:23:54 +0100
committerMichael Meeks <michael.meeks@collabora.com>2016-02-10 10:42:42 +0000
commitb4c6cf513c5bb0ed02b95bbdbb0879a78c1eca65 (patch)
treeea0d4751c5f463f3cf243376910a58cd8d1d3577 /vcl/opengl
parent63fd137cd54fb6df0c812a97d962239b8d0996a0 (diff)
opengl: remove unneeded mnBufWidth{Height} from OpenGLSalBitmap
Change-Id: Idf445b9f6b403a0d37650c14e17b7d754451edf1 Reviewed-on: https://gerrit.libreoffice.org/22258 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/opengl')
-rw-r--r--vcl/opengl/salbmp.cxx22
-rw-r--r--vcl/opengl/scale.cxx6
2 files changed, 6 insertions, 22 deletions
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index be5f8f0d2767..07ec676a1cdd 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -115,8 +115,6 @@ OpenGLSalBitmap::OpenGLSalBitmap()
, mnBytesPerRow(0)
, mnWidth(0)
, mnHeight(0)
-, mnBufWidth(0)
-, mnBufHeight(0)
{
}
@@ -137,8 +135,6 @@ bool OpenGLSalBitmap::Create( const OpenGLTexture& rTex, long nX, long nY, long
mnWidth = nWidth;
mnHeight = nHeight;
- mnBufWidth = 0;
- mnBufHeight = 0;
// TODO Check the framebuffer configuration
mnBits = 32;
@@ -168,8 +164,8 @@ bool OpenGLSalBitmap::Create( const Size& rSize, sal_uInt16 nBits, const BitmapP
return false;
maPalette = rBitmapPalette;
mnBits = nBits;
- mnWidth = mnBufWidth = rSize.Width();
- mnHeight = mnBufHeight = rSize.Height();
+ mnWidth = rSize.Width();
+ mnHeight = rSize.Height();
return false;
}
@@ -203,8 +199,6 @@ bool OpenGLSalBitmap::Create( const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount
mnBytesPerRow = rSourceBitmap.mnBytesPerRow;
mnWidth = rSourceBitmap.mnWidth;
mnHeight = rSourceBitmap.mnHeight;
- mnBufWidth = rSourceBitmap.mnBufWidth;
- mnBufHeight = rSourceBitmap.mnBufHeight;
maPalette = rSourceBitmap.maPalette;
// execute any pending operations on the source bitmap
maTexture = rSourceBitmap.GetTexture();
@@ -474,7 +468,7 @@ GLuint OpenGLSalBitmap::CreateTexture()
VCL_GL_INFO( "::CreateTexture - convert from " << mnBits << " to 24 bits" );
// convert to 24 bits RGB using palette
- pData = new sal_uInt8[mnBufHeight * mnBufWidth * 3];
+ pData = new sal_uInt8[mnHeight * mnWidth * 3];
bAllocated = true;
determineTextureFormat(24, nFormat, nType);
@@ -483,12 +477,12 @@ GLuint OpenGLSalBitmap::CreateTexture()
sal_uInt8* pSrcData = mpUserBuffer.get();
sal_uInt8* pDstData = pData;
- sal_uInt32 nY = mnBufHeight;
+ sal_uInt32 nY = mnHeight;
while( nY-- )
{
pSrcFormat->StartLine( pSrcData );
- sal_uInt32 nX = mnBufWidth;
+ sal_uInt32 nX = mnWidth;
if (nFormat == GL_BGR)
{
while( nX-- )
@@ -517,7 +511,7 @@ GLuint OpenGLSalBitmap::CreateTexture()
OpenGLVCLContextZone aContextZone;
- lclInstantiateTexture(maTexture, mnBufWidth, mnBufHeight, nFormat, nType, pData);
+ lclInstantiateTexture(maTexture, mnWidth, mnHeight, nFormat, nType, pData);
VCL_GL_INFO("Created texture " << maTexture.Id() << " bits: " << mnBits);
@@ -566,8 +560,6 @@ bool OpenGLSalBitmap::ReadTexture()
size_t nCanary = static_cast<sal_uInt32>(mnBytesPerRow) * mnHeight;
assert(!memcmp(pData + nCanary, CANARY, sizeof (CANARY)));
#endif
- mnBufWidth = mnWidth;
- mnBufHeight = mnHeight;
return true;
}
else if (mnBits == 1)
@@ -608,8 +600,6 @@ bool OpenGLSalBitmap::ReadTexture()
nIndex++;
pData[nIndex] = 0;
}
- mnBufWidth = mnWidth;
- mnBufHeight = mnHeight;
return true;
}
diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx
index 3f248072ad6a..9ba74323c8c1 100644
--- a/vcl/opengl/scale.cxx
+++ b/vcl/opengl/scale.cxx
@@ -68,8 +68,6 @@ bool OpenGLSalBitmap::ImplScaleFilter(
mnWidth = nNewWidth;
mnHeight = nNewHeight;
- mnBufWidth = mnWidth;
- mnBufHeight = mnHeight;
maTexture = aNewTex;
CHECK_GL_ERROR();
@@ -183,8 +181,6 @@ bool OpenGLSalBitmap::ImplScaleConvolution(
mnWidth = nNewWidth;
mnHeight = nNewHeight;
- mnBufWidth = mnWidth;
- mnBufHeight = mnHeight;
CHECK_GL_ERROR();
return true;
@@ -260,8 +256,6 @@ bool OpenGLSalBitmap::ImplScaleArea( const rtl::Reference< OpenGLContext > &xCon
mnWidth = nNewWidth;
mnHeight = nNewHeight;
- mnBufWidth = mnWidth;
- mnBufHeight = mnHeight;
CHECK_GL_ERROR();
return true;