diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-12-08 16:44:19 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-12-08 17:03:28 +0200 |
commit | 19b53ac04df4a87735b45bf8cdc25d3b1c5bf319 (patch) | |
tree | 13c3ad56276a9d9196fffd6b2fe54fa8e65f0c12 /vcl/opengl | |
parent | e0caeaa5be754c35742cec7ddf70c9021f66f2bf (diff) |
Rename OpenGLSalBitmap::makeCurrent() to makeSomeOpenGLContextCurrent()
The function does not, in any way, as far as I see, make the
OpenGLSalBitmap object "current". It picks one OpenGLContext object
and makes that current. So, rename it to be less misleading. Am I
missing something?
Change-Id: Ia9f8e2415e1075dd5892cd40140e6ad764feeaa4
Diffstat (limited to 'vcl/opengl')
-rw-r--r-- | vcl/opengl/salbmp.cxx | 12 | ||||
-rw-r--r-- | vcl/opengl/scale.cxx | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 9a704d9d2879..4a05af4b2dea 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -380,7 +380,7 @@ Size OpenGLSalBitmap::GetSize() const void OpenGLSalBitmap::ExecuteOperations() { - makeCurrent(); + makeSomeOpenGLContextCurrent(); while( !maPendingOps.empty() ) { OpenGLSalBitmapOp* pOp = maPendingOps.front(); @@ -459,7 +459,7 @@ GLuint OpenGLSalBitmap::CreateTexture() } } - makeCurrent(); + makeSomeOpenGLContextCurrent(); lclInstantiateTexture(maTexture, mnBufWidth, mnBufHeight, nFormat, nType, pData); @@ -505,7 +505,7 @@ bool OpenGLSalBitmap::ReadTexture() break; } - makeCurrent(); + makeSomeOpenGLContextCurrent(); maTexture.Read(nFormat, nType, pData); mnBufWidth = mnWidth; mnBufHeight = mnHeight; @@ -514,7 +514,7 @@ bool OpenGLSalBitmap::ReadTexture() else if (mnBits == 1) { // convert buffers from 24-bit RGB to 1-bit Mask std::vector<sal_uInt8> aBuffer(mnWidth * mnHeight * 3); - makeCurrent(); + makeSomeOpenGLContextCurrent(); sal_uInt8* pBuffer = aBuffer.data(); maTexture.Read(GL_RGB, GL_UNSIGNED_BYTE, pBuffer); @@ -669,7 +669,7 @@ rtl::Reference<OpenGLContext> OpenGLSalBitmap::GetBitmapContext() return ImplGetDefaultWindow()->GetGraphics()->GetOpenGLContext(); } -void OpenGLSalBitmap::makeCurrent() +void OpenGLSalBitmap::makeSomeOpenGLContextCurrent() { ImplSVData* pSVData = ImplGetSVData(); @@ -833,7 +833,7 @@ bool OpenGLSalBitmap::Replace( const Color& rSearchColor, const Color& rReplaceC OpenGLProgram* pProgram; GetTexture(); - makeCurrent(); + makeSomeOpenGLContextCurrent(); pProgram = mpContext->UseProgram( "textureVertexShader", "replaceColorFragmentShader" ); if( !pProgram ) diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx index 102ec73303f9..56658e5d795d 100644 --- a/vcl/opengl/scale.cxx +++ b/vcl/opengl/scale.cxx @@ -279,7 +279,7 @@ bool OpenGLSalBitmap::ImplScale( const double& rScaleX, const double& rScaleY, B VCL_GL_INFO( "::ImplScale" ); maUserBuffer.reset(); - makeCurrent(); + makeSomeOpenGLContextCurrent(); if( nScaleFlag == BmpScaleFlag::Fast ) { @@ -350,7 +350,7 @@ bool OpenGLSalBitmap::Scale( const double& rScaleX, const double& rScaleY, BmpSc nScaleFlag == BmpScaleFlag::Default || nScaleFlag == BmpScaleFlag::BestQuality ) { - makeCurrent(); + makeSomeOpenGLContextCurrent(); if( mpContext == nullptr ) { VCL_GL_INFO( "Add ScaleOp to pending operations" ); |