Kaydet (Commit) 64895577 authored tarafından Michael Meeks's avatar Michael Meeks Kaydeden (comit) Caolán McNamara

Add missing helpful GL trace messages outside of the impl. itself.

Change-Id: I5b71e3c9edc3e1e89e52c2e17b5fe0a025ac66ea
Reviewed-on: https://gerrit.libreoffice.org/18109Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 3583320a
...@@ -305,7 +305,7 @@ bool OpenGLSalBitmap::ImplScaleArea( double rScaleX, double rScaleY ) ...@@ -305,7 +305,7 @@ bool OpenGLSalBitmap::ImplScaleArea( double rScaleX, double rScaleY )
bool OpenGLSalBitmap::ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) bool OpenGLSalBitmap::ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag )
{ {
SAL_INFO( "vcl.opengl", "::ImplScale" ); VCL_GL_INFO( "vcl.opengl", "::ImplScale" );
maUserBuffer.reset(); maUserBuffer.reset();
makeCurrent(); makeCurrent();
...@@ -353,13 +353,13 @@ ScaleOp::ScaleOp( ...@@ -353,13 +353,13 @@ ScaleOp::ScaleOp(
bool ScaleOp::Execute() bool ScaleOp::Execute()
{ {
SAL_INFO( "vcl.opengl", "::Execute" ); VCL_GL_INFO( "vcl.opengl", "::Execute" );
return mpBitmap->ImplScale( mfScaleX, mfScaleY, mnScaleFlag ); return mpBitmap->ImplScale( mfScaleX, mfScaleY, mnScaleFlag );
} }
void ScaleOp::GetSize( Size& rSize ) const void ScaleOp::GetSize( Size& rSize ) const
{ {
SAL_INFO( "vcl.opengl", "::GetSize" ); VCL_GL_INFO( "vcl.opengl", "::GetSize" );
rSize.setWidth( rSize.Width() * mfScaleX ); rSize.setWidth( rSize.Width() * mfScaleX );
rSize.setHeight( rSize.Height() * mfScaleY ); rSize.setHeight( rSize.Height() * mfScaleY );
} }
...@@ -368,7 +368,7 @@ bool OpenGLSalBitmap::Scale( const double& rScaleX, const double& rScaleY, BmpSc ...@@ -368,7 +368,7 @@ bool OpenGLSalBitmap::Scale( const double& rScaleX, const double& rScaleY, BmpSc
{ {
OpenGLZone aZone; OpenGLZone aZone;
SAL_INFO("vcl.opengl", "::Scale " << int(nScaleFlag) VCL_GL_INFO("vcl.opengl", "::Scale " << int(nScaleFlag)
<< " from " << mnWidth << "x" << mnHeight << " from " << mnWidth << "x" << mnHeight
<< " to " << (mnWidth * rScaleX) << "x" << (mnHeight * rScaleY) ); << " to " << (mnWidth * rScaleX) << "x" << (mnHeight * rScaleY) );
...@@ -382,7 +382,7 @@ bool OpenGLSalBitmap::Scale( const double& rScaleX, const double& rScaleY, BmpSc ...@@ -382,7 +382,7 @@ bool OpenGLSalBitmap::Scale( const double& rScaleX, const double& rScaleY, BmpSc
makeCurrent(); makeCurrent();
if( mpContext == NULL ) if( mpContext == NULL )
{ {
SAL_INFO( "vcl.opengl", "Add ScaleOp to pending operations" ); VCL_GL_INFO( "vcl.opengl", "Add ScaleOp to pending operations" );
maPendingOps.push_back( new ScaleOp( this, rScaleX, rScaleY, nScaleFlag ) ); maPendingOps.push_back( new ScaleOp( this, rScaleX, rScaleY, nScaleFlag ) );
} }
else else
......
...@@ -46,7 +46,7 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nWidth, int nHeight, bool bAllocate ) ...@@ -46,7 +46,7 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nWidth, int nHeight, bool bAllocate )
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, nWidth, nHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL ); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, nWidth, nHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL );
glBindTexture( GL_TEXTURE_2D, 0 ); glBindTexture( GL_TEXTURE_2D, 0 );
SAL_INFO( "vcl.opengl", "OpenGLTexture " << mnTexture << " " << nWidth << "x" << nHeight << " allocate" ); VCL_GL_INFO( "vcl.opengl", "OpenGLTexture " << mnTexture << " " << nWidth << "x" << nHeight << " allocate" );
CHECK_GL_ERROR(); CHECK_GL_ERROR();
} }
...@@ -73,7 +73,7 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nX, int nY, int nWidth, int nHeight ) ...@@ -73,7 +73,7 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nX, int nY, int nWidth, int nHeight )
CHECK_GL_ERROR(); CHECK_GL_ERROR();
glBindTexture( GL_TEXTURE_2D, 0 ); glBindTexture( GL_TEXTURE_2D, 0 );
SAL_INFO( "vcl.opengl", "OpenGLTexture " << mnTexture << " " << nWidth << "x" << nHeight << " from x" << nX << ", y" << nY ); VCL_GL_INFO( "vcl.opengl", "OpenGLTexture " << mnTexture << " " << nWidth << "x" << nHeight << " from x" << nX << ", y" << nY );
CHECK_GL_ERROR(); CHECK_GL_ERROR();
} }
...@@ -98,14 +98,14 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nWidth, int nHeight, int nFormat, int ...@@ -98,14 +98,14 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nWidth, int nHeight, int nFormat, int
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, mnWidth, mnHeight, 0, nFormat, nType, pData ); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, mnWidth, mnHeight, 0, nFormat, nType, pData );
glBindTexture( GL_TEXTURE_2D, 0 ); glBindTexture( GL_TEXTURE_2D, 0 );
SAL_INFO( "vcl.opengl", "OpenGLTexture " << mnTexture << " " << nWidth << "x" << nHeight << " from data" ); VCL_GL_INFO( "vcl.opengl", "OpenGLTexture " << mnTexture << " " << nWidth << "x" << nHeight << " from data" );
CHECK_GL_ERROR(); CHECK_GL_ERROR();
} }
ImplOpenGLTexture::~ImplOpenGLTexture() ImplOpenGLTexture::~ImplOpenGLTexture()
{ {
SAL_INFO( "vcl.opengl", "~OpenGLTexture " << mnTexture ); VCL_GL_INFO( "vcl.opengl", "~OpenGLTexture " << mnTexture );
if( mnTexture != 0 ) if( mnTexture != 0 )
glDeleteTextures( 1, &mnTexture ); glDeleteTextures( 1, &mnTexture );
} }
...@@ -119,7 +119,7 @@ bool ImplOpenGLTexture::InsertBuffer(int nX, int nY, int nWidth, int nHeight, in ...@@ -119,7 +119,7 @@ bool ImplOpenGLTexture::InsertBuffer(int nX, int nY, int nWidth, int nHeight, in
glTexSubImage2D(GL_TEXTURE_2D, 0, nX, mnHeight - nY - nHeight, nWidth, nHeight, nFormat, nType, pData); glTexSubImage2D(GL_TEXTURE_2D, 0, nX, mnHeight - nY - nHeight, nWidth, nHeight, nFormat, nType, pData);
glBindTexture(GL_TEXTURE_2D, 0); glBindTexture(GL_TEXTURE_2D, 0);
SAL_INFO( "vcl.opengl", "OpenGLTexture " << mnTexture << " Insert buff. to " << nX << " " << nY VCL_GL_INFO( "vcl.opengl", "OpenGLTexture " << mnTexture << " Insert buff. to " << nX << " " << nY
<< " size " << nWidth << "x" << nHeight << " from data" ); << " size " << nWidth << "x" << nHeight << " from data" );
CHECK_GL_ERROR(); CHECK_GL_ERROR();
...@@ -208,7 +208,7 @@ OpenGLTexture::OpenGLTexture( const OpenGLTexture& rTexture, ...@@ -208,7 +208,7 @@ OpenGLTexture::OpenGLTexture( const OpenGLTexture& rTexture,
mnSlotNumber = rTexture.mnSlotNumber; mnSlotNumber = rTexture.mnSlotNumber;
if (mpImpl) if (mpImpl)
mpImpl->IncreaseRefCount(mnSlotNumber); mpImpl->IncreaseRefCount(mnSlotNumber);
SAL_INFO( "vcl.opengl", "Copying texture " << Id() << " [" << maRect.Left() << "," << maRect.Top() << "] " << GetWidth() << "x" << GetHeight() ); VCL_GL_INFO( "vcl.opengl", "Copying texture " << Id() << " [" << maRect.Left() << "," << maRect.Top() << "] " << GetWidth() << "x" << GetHeight() );
} }
OpenGLTexture::~OpenGLTexture() OpenGLTexture::~OpenGLTexture()
...@@ -245,7 +245,7 @@ int OpenGLTexture::GetHeight() const ...@@ -245,7 +245,7 @@ int OpenGLTexture::GetHeight() const
void OpenGLTexture::GetCoord( GLfloat* pCoord, const SalTwoRect& rPosAry, bool bInverted ) const void OpenGLTexture::GetCoord( GLfloat* pCoord, const SalTwoRect& rPosAry, bool bInverted ) const
{ {
SAL_INFO( "vcl.opengl", "Getting coord " << Id() << " [" << maRect.Left() << "," << maRect.Top() << "] " << GetWidth() << "x" << GetHeight() ); VCL_GL_INFO( "vcl.opengl", "Getting coord " << Id() << " [" << maRect.Left() << "," << maRect.Top() << "] " << GetWidth() << "x" << GetHeight() );
if( mpImpl == NULL ) if( mpImpl == NULL )
{ {
...@@ -362,7 +362,7 @@ void OpenGLTexture::Read( GLenum nFormat, GLenum nType, sal_uInt8* pData ) ...@@ -362,7 +362,7 @@ void OpenGLTexture::Read( GLenum nFormat, GLenum nType, sal_uInt8* pData )
Bind(); Bind();
glPixelStorei( GL_PACK_ALIGNMENT, 1 ); glPixelStorei( GL_PACK_ALIGNMENT, 1 );
SAL_INFO( "vcl.opengl", "Reading texture " << Id() << " " << GetWidth() << "x" << GetHeight() ); VCL_GL_INFO( "vcl.opengl", "Reading texture " << Id() << " " << GetWidth() << "x" << GetHeight() );
if( GetWidth() == mpImpl->mnWidth && GetHeight() == mpImpl->mnHeight ) if( GetWidth() == mpImpl->mnWidth && GetHeight() == mpImpl->mnHeight )
{ {
......
...@@ -70,7 +70,7 @@ OpenGLContext::OpenGLContext(): ...@@ -70,7 +70,7 @@ OpenGLContext::OpenGLContext():
mpPrevContext(NULL), mpPrevContext(NULL),
mpNextContext(NULL) mpNextContext(NULL)
{ {
SAL_INFO("vcl.opengl", "new context: " << this); VCL_GL_INFO("vcl.opengl", "new context: " << this);
#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined(LIBO_HEADLESS) #if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined(LIBO_HEADLESS)
mbPixmap = false; mbPixmap = false;
...@@ -92,7 +92,7 @@ OpenGLContext::OpenGLContext(): ...@@ -92,7 +92,7 @@ OpenGLContext::OpenGLContext():
OpenGLContext::~OpenGLContext() OpenGLContext::~OpenGLContext()
{ {
SAL_INFO("vcl.opengl", "delete context: " << this); VCL_GL_INFO("vcl.opengl", "delete context: " << this);
reset(); reset();
ImplSVData* pSVData = ImplGetSVData(); ImplSVData* pSVData = ImplGetSVData();
...@@ -571,7 +571,7 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubl ...@@ -571,7 +571,7 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubl
if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) ) if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) )
return NULL; return NULL;
SAL_INFO("vcl.opengl", "window: " << win); VCL_GL_INFO("vcl.opengl", "window: " << win);
XWindowAttributes xattr; XWindowAttributes xattr;
if( !XGetWindowAttributes( dpy, win, &xattr ) ) if( !XGetWindowAttributes( dpy, win, &xattr ) )
...@@ -658,7 +658,7 @@ Visual* getVisual(Display* dpy, Window win) ...@@ -658,7 +658,7 @@ Visual* getVisual(Display* dpy, Window win)
SAL_WARN("vcl.opengl", "Failed to get window attributes for getVisual " << win); SAL_WARN("vcl.opengl", "Failed to get window attributes for getVisual " << win);
xattr.visual = NULL; xattr.visual = NULL;
} }
SAL_INFO("vcl.opengl", "using VisualID " << xattr.visual); VCL_GL_INFO("vcl.opengl", "using VisualID " << xattr.visual);
return xattr.visual; return xattr.visual;
} }
...@@ -765,7 +765,7 @@ bool OpenGLContext::ImplInit() ...@@ -765,7 +765,7 @@ bool OpenGLContext::ImplInit()
TempErrorHandler aErrorHandler(m_aGLWin.dpy, unxErrorHandler); TempErrorHandler aErrorHandler(m_aGLWin.dpy, unxErrorHandler);
#endif #endif
SAL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start"); VCL_GL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start");
if (!g_vShareList.empty()) if (!g_vShareList.empty())
pSharedCtx = g_vShareList.front(); pSharedCtx = g_vShareList.front();
...@@ -865,7 +865,7 @@ bool OpenGLContext::ImplInit() ...@@ -865,7 +865,7 @@ bool OpenGLContext::ImplInit()
if( errorTriggered ) if( errorTriggered )
SAL_WARN("vcl.opengl", "error when trying to set swap interval, NVIDIA or Mesa bug?"); SAL_WARN("vcl.opengl", "error when trying to set swap interval, NVIDIA or Mesa bug?");
else else
SAL_INFO("vcl.opengl", "set swap interval to 1 (enable vsync)"); VCL_GL_INFO("vcl.opengl", "set swap interval to 1 (enable vsync)");
} }
} }
...@@ -888,7 +888,7 @@ bool OpenGLContext::ImplInit() ...@@ -888,7 +888,7 @@ bool OpenGLContext::ImplInit()
{ {
OpenGLZone aZone; OpenGLZone aZone;
SAL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start"); VCL_GL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start");
// PixelFormat tells Windows how we want things to be // PixelFormat tells Windows how we want things to be
PIXELFORMATDESCRIPTOR PixelFormatFront = PIXELFORMATDESCRIPTOR PixelFormatFront =
{ {
...@@ -1012,7 +1012,7 @@ bool OpenGLContext::ImplInit() ...@@ -1012,7 +1012,7 @@ bool OpenGLContext::ImplInit()
{ {
OpenGLZone aZone; OpenGLZone aZone;
SAL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start"); VCL_GL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start");
NSOpenGLView* pView = getOpenGLView(); NSOpenGLView* pView = getOpenGLView();
OpenGLWrapper::makeCurrent(pView); OpenGLWrapper::makeCurrent(pView);
...@@ -1023,7 +1023,7 @@ bool OpenGLContext::ImplInit() ...@@ -1023,7 +1023,7 @@ bool OpenGLContext::ImplInit()
bool OpenGLContext::ImplInit() bool OpenGLContext::ImplInit()
{ {
SAL_INFO("vcl.opengl", "OpenGLContext not implemented for this platform"); VCL_GL_INFO("vcl.opengl", "OpenGLContext not implemented for this platform");
return false; return false;
} }
...@@ -1069,7 +1069,7 @@ bool OpenGLContext::InitGLEW() ...@@ -1069,7 +1069,7 @@ bool OpenGLContext::InitGLEW()
VCL_GL_INFO("vcl.opengl", "LibreOffice GLContext initialized: " << this); VCL_GL_INFO("vcl.opengl", "LibreOffice GLContext initialized: " << this);
#endif #endif
SAL_INFO("vcl.opengl", "OpenGLContext::ImplInit----end"); VCL_GL_INFO("vcl.opengl", "OpenGLContext::ImplInit----end");
mbInitialized = true; mbInitialized = true;
return true; return true;
} }
...@@ -1350,7 +1350,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool) ...@@ -1350,7 +1350,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool)
if( vi ) if( vi )
{ {
SAL_INFO("vcl.opengl", "using VisualID " << vi->visualid); VCL_GL_INFO("vcl.opengl", "using VisualID " << vi->visualid);
aWinData.pVisual = (void*)(vi->visual); aWinData.pVisual = (void*)(vi->visual);
} }
#endif #endif
...@@ -1427,7 +1427,7 @@ void OpenGLContext::makeCurrent() ...@@ -1427,7 +1427,7 @@ void OpenGLContext::makeCurrent()
// move the context to the end of the contexts list // move the context to the end of the contexts list
static int nSwitch = 0; static int nSwitch = 0;
SAL_INFO("vcl.opengl", "******* CONTEXT SWITCH " << ++nSwitch << " *********"); VCL_GL_INFO("vcl.opengl", "******* CONTEXT SWITCH " << ++nSwitch << " *********");
if( mpNextContext ) if( mpNextContext )
{ {
if( mpPrevContext ) if( mpPrevContext )
......
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