[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - 2 commits - vcl/inc vcl/opengl

Markus Mohrhard markus.mohrhard at collabora.co.uk
Wed Jan 7 03:49:21 PST 2015


 vcl/inc/openglgdiimpl.hxx |    2 +-
 vcl/opengl/gdiimpl.cxx    |   15 ++++++++-------
 2 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 011903894b031d82523d60650dbc3bc18209fded
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Wed Jan 7 08:31:50 2015 +0100

    it makes no sense to use the line color in some cases
    
    Hopefully that helps a little bit with some strange rendering effects.
    
    Change-Id: I6b001bf31d745d6d19f91acadee5ceb0e5480025

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 5f9bfe0..1e72c0a 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -732,7 +732,8 @@ void OpenGLSalGraphicsImpl::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPol
 #ifdef DBG_UTIL
         assert( mProgramIsSolidLineColor );
 #endif
-        UseSolidAA( mnLineColor );
+        bool bUseLineColor = bLine || mnLineColor != SALCOLOR_NONE;
+        UseSolidAA( bUseLineColor ? mnLineColor : mnFillColor );
         for( sal_uInt32 i = 0; i < aSimplePolyPolygon.count(); i++ )
         {
             const basegfx::B2DPolygon& rPolygon( aSimplePolyPolygon.getB2DPolygon( i ) );
commit 118529d4644a3630def1b811504de7dbff367ce5
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Wed Jan 7 08:31:28 2015 +0100

    make sure to use the FillColor when we used it before
    
    Change-Id: I36443d12e1607221b9505d1e05a51e804d714e16

diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index 4ca30b3..69c211d 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -84,7 +84,7 @@ public:
     void DrawRect( long nX, long nY, long nWidth, long nHeight );
     void DrawRect( const Rectangle& rRect );
     void DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry );
-    void DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, bool blockAA = false );
+    void DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, bool bLine, bool blockAA = false );
     void DrawRegionBand( const RegionBand& rRegion );
     void DrawTextureRect( OpenGLTexture& rTexture, const SalTwoRect& rPosAry, bool bInverted = false );
     void DrawTexture( OpenGLTexture& rTexture, const SalTwoRect& rPosAry, bool bInverted = false );
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index f75966f..5f9bfe0 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -198,7 +198,7 @@ void OpenGLSalGraphicsImpl::ImplSetClipBit( const vcl::Region& rClip, GLuint nMa
         if( rClip.getRegionBand() )
             DrawRegionBand( *rClip.getRegionBand() );
         else
-            DrawPolyPolygon( rClip.GetAsB2DPolyPolygon(), true );
+            DrawPolyPolygon( rClip.GetAsB2DPolyPolygon(), false, true );
     }
 
     glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
@@ -695,11 +695,11 @@ void OpenGLSalGraphicsImpl::DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPt
     else
     {
         const ::basegfx::B2DPolyPolygon aPolyPolygon( aPolygon );
-        DrawPolyPolygon( aPolyPolygon );
+        DrawPolyPolygon( aPolyPolygon, false );
     }
 }
 
-void OpenGLSalGraphicsImpl::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, bool blockAA )
+void OpenGLSalGraphicsImpl::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, bool bLine, bool blockAA )
 {
     ::std::vector< GLfloat > aVertices;
     GLfloat nWidth = GetWidth();
@@ -745,7 +745,7 @@ void OpenGLSalGraphicsImpl::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPol
                 DrawLineAA( rPt1.getX(), rPt1.getY(), rPt2.getX(), rPt2.getY());
             }
         }
-        UseSolid( mnLineColor );
+        UseSolid( bLine ? mnLineColor : mnFillColor );
     }
 
     CHECK_GL_ERROR();
@@ -1133,7 +1133,7 @@ bool OpenGLSalGraphicsImpl::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rP
         for( sal_uInt32 i = 0; i < rPolyPolygon.count(); i++ )
         {
             const ::basegfx::B2DPolyPolygon aOnePoly( rPolyPolygon.getB2DPolygon( i ) );
-            DrawPolyPolygon( aOnePoly );
+            DrawPolyPolygon( aOnePoly, false );
         }
     }
 
@@ -1216,7 +1216,7 @@ bool OpenGLSalGraphicsImpl::drawPolyLine(
         for( sal_uInt32 i = 0; i < aAreaPolyPoly.count(); i++ )
         {
             const ::basegfx::B2DPolyPolygon aOnePoly( aAreaPolyPoly.getB2DPolygon( i ) );
-            DrawPolyPolygon( aOnePoly );
+            DrawPolyPolygon( aOnePoly, true );
         }
     }
     PostDraw();


More information about the Libreoffice-commits mailing list