[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/opengl vcl/source

Michael Meeks michael.meeks at collabora.com
Mon Aug 31 03:57:41 PDT 2015


 vcl/opengl/scale.cxx                |   10 +++++-----
 vcl/opengl/texture.cxx              |   16 ++++++++--------
 vcl/source/opengl/OpenGLContext.cxx |   24 ++++++++++++------------
 3 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit 6489557740fd3cae0d8ff559b3c760b3f26eec0b
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Aug 28 17:35:05 2015 +0100

    Add missing helpful GL trace messages outside of the impl. itself.
    
    Change-Id: I5b71e3c9edc3e1e89e52c2e17b5fe0a025ac66ea
    Reviewed-on: https://gerrit.libreoffice.org/18109
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx
index 6d9a4d1..6ddd299 100644
--- a/vcl/opengl/scale.cxx
+++ b/vcl/opengl/scale.cxx
@@ -305,7 +305,7 @@ bool OpenGLSalBitmap::ImplScaleArea( double rScaleX, double rScaleY )
 
 bool OpenGLSalBitmap::ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag )
 {
-    SAL_INFO( "vcl.opengl", "::ImplScale" );
+    VCL_GL_INFO( "vcl.opengl", "::ImplScale" );
 
     maUserBuffer.reset();
     makeCurrent();
@@ -353,13 +353,13 @@ ScaleOp::ScaleOp(
 
 bool ScaleOp::Execute()
 {
-    SAL_INFO( "vcl.opengl", "::Execute" );
+    VCL_GL_INFO( "vcl.opengl", "::Execute" );
     return mpBitmap->ImplScale( mfScaleX, mfScaleY, mnScaleFlag );
 }
 
 void ScaleOp::GetSize( Size& rSize ) const
 {
-    SAL_INFO( "vcl.opengl", "::GetSize" );
+    VCL_GL_INFO( "vcl.opengl", "::GetSize" );
     rSize.setWidth( rSize.Width() * mfScaleX );
     rSize.setHeight( rSize.Height() * mfScaleY );
 }
@@ -368,7 +368,7 @@ bool OpenGLSalBitmap::Scale( const double& rScaleX, const double& rScaleY, BmpSc
 {
     OpenGLZone aZone;
 
-    SAL_INFO("vcl.opengl", "::Scale " << int(nScaleFlag)
+    VCL_GL_INFO("vcl.opengl", "::Scale " << int(nScaleFlag)
              << " from " << mnWidth << "x" << mnHeight
              << " to " << (mnWidth * rScaleX) << "x" << (mnHeight * rScaleY) );
 
@@ -382,7 +382,7 @@ bool OpenGLSalBitmap::Scale( const double& rScaleX, const double& rScaleY, BmpSc
         makeCurrent();
         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 ) );
         }
         else
diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx
index 6d222f7..5861f76 100644
--- a/vcl/opengl/texture.cxx
+++ b/vcl/opengl/texture.cxx
@@ -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 );
     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();
 }
@@ -73,7 +73,7 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nX, int nY, int nWidth, int nHeight )
     CHECK_GL_ERROR();
     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();
 }
@@ -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 );
     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();
 }
 
 ImplOpenGLTexture::~ImplOpenGLTexture()
 {
-    SAL_INFO( "vcl.opengl", "~OpenGLTexture " << mnTexture );
+    VCL_GL_INFO( "vcl.opengl", "~OpenGLTexture " << mnTexture );
     if( mnTexture != 0 )
         glDeleteTextures( 1, &mnTexture );
 }
@@ -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);
     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" );
     CHECK_GL_ERROR();
 
@@ -208,7 +208,7 @@ OpenGLTexture::OpenGLTexture( const OpenGLTexture& rTexture,
     mnSlotNumber = rTexture.mnSlotNumber;
     if (mpImpl)
         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()
@@ -245,7 +245,7 @@ int OpenGLTexture::GetHeight() 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 )
     {
@@ -362,7 +362,7 @@ void OpenGLTexture::Read( GLenum nFormat, GLenum nType, sal_uInt8* pData )
     Bind();
     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 )
     {
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index c703c64..5c64448 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -70,7 +70,7 @@ OpenGLContext::OpenGLContext():
     mpPrevContext(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)
     mbPixmap = false;
@@ -92,7 +92,7 @@ OpenGLContext::OpenGLContext():
 
 OpenGLContext::~OpenGLContext()
 {
-    SAL_INFO("vcl.opengl", "delete context: " << this);
+    VCL_GL_INFO("vcl.opengl", "delete context: " << this);
     reset();
 
     ImplSVData* pSVData = ImplGetSVData();
@@ -571,7 +571,7 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubl
     if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) )
         return NULL;
 
-    SAL_INFO("vcl.opengl", "window: " << win);
+    VCL_GL_INFO("vcl.opengl", "window: " << win);
 
     XWindowAttributes xattr;
     if( !XGetWindowAttributes( dpy, win, &xattr ) )
@@ -658,7 +658,7 @@ Visual* getVisual(Display* dpy, Window win)
         SAL_WARN("vcl.opengl", "Failed to get window attributes for getVisual " << win);
         xattr.visual = NULL;
     }
-    SAL_INFO("vcl.opengl", "using VisualID " << xattr.visual);
+    VCL_GL_INFO("vcl.opengl", "using VisualID " << xattr.visual);
     return xattr.visual;
 }
 
@@ -765,7 +765,7 @@ bool OpenGLContext::ImplInit()
     TempErrorHandler aErrorHandler(m_aGLWin.dpy, unxErrorHandler);
 #endif
 
-    SAL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start");
+    VCL_GL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start");
 
     if (!g_vShareList.empty())
         pSharedCtx = g_vShareList.front();
@@ -865,7 +865,7 @@ bool OpenGLContext::ImplInit()
             if( errorTriggered )
                 SAL_WARN("vcl.opengl", "error when trying to set swap interval, NVIDIA or Mesa bug?");
             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()
 {
     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
     PIXELFORMATDESCRIPTOR PixelFormatFront =
     {
@@ -1012,7 +1012,7 @@ bool OpenGLContext::ImplInit()
 {
     OpenGLZone aZone;
 
-    SAL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start");
+    VCL_GL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start");
     NSOpenGLView* pView = getOpenGLView();
     OpenGLWrapper::makeCurrent(pView);
 
@@ -1023,7 +1023,7 @@ 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;
 }
 
@@ -1069,7 +1069,7 @@ bool OpenGLContext::InitGLEW()
     VCL_GL_INFO("vcl.opengl", "LibreOffice GLContext initialized: " << this);
 #endif
 
-    SAL_INFO("vcl.opengl", "OpenGLContext::ImplInit----end");
+    VCL_GL_INFO("vcl.opengl", "OpenGLContext::ImplInit----end");
     mbInitialized = true;
     return true;
 }
@@ -1350,7 +1350,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool)
 
     if( vi )
     {
-        SAL_INFO("vcl.opengl", "using VisualID " << vi->visualid);
+        VCL_GL_INFO("vcl.opengl", "using VisualID " << vi->visualid);
         aWinData.pVisual = (void*)(vi->visual);
     }
 #endif
@@ -1427,7 +1427,7 @@ void OpenGLContext::makeCurrent()
 
     // move the context to the end of the contexts list
     static int nSwitch = 0;
-    SAL_INFO("vcl.opengl", "******* CONTEXT SWITCH " << ++nSwitch << " *********");
+    VCL_GL_INFO("vcl.opengl", "******* CONTEXT SWITCH " << ++nSwitch << " *********");
     if( mpNextContext )
     {
         if( mpPrevContext )


More information about the Libreoffice-commits mailing list