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

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Wed Sep 2 19:51:05 PDT 2015


 vcl/opengl/gdiimpl.cxx |   30 ++++++++----------------------
 1 file changed, 8 insertions(+), 22 deletions(-)

New commits:
commit 426ec2deb0793d22b7a94af8386d1714900cc26a
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Thu Sep 3 11:30:52 2015 +0900

    opengl: let OutputDevice do the bezier subdivision
    
    (cherry picked from commit 796b2d6b20e3e9d6ca7f095a49d9b3a54f58645f)
    
    Conflicts:
    	vcl/opengl/gdiimpl.cxx
    
    Change-Id: I0620cd29695d792320c6e3209dff84822485d883
    Reviewed-on: https://gerrit.libreoffice.org/18287
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 0b31dd6..f8ccd93 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1427,33 +1427,19 @@ bool OpenGLSalGraphicsImpl::drawPolyLine(
         return false;
     }
 
-    // #i11575#desc5#b adjust B2D tesselation result to raster positions
-    basegfx::B2DPolygon aPolygon = rPolygon;
-    const double fHalfWidth = 0.5 * rLineWidth.getX();
-
     // shortcut for hairline drawing to improve performance
     if (bIsHairline)
     {
-        PreDraw();
-        if (UseSolidAA(mnLineColor, fTransparency))
-        {
-            Polygon aToolsPolygon(aPolygon);
-            sal_uInt32 nPoints = aToolsPolygon.GetSize();
-            if (aToolsPolygon.HasFlags())
-            {
-                aToolsPolygon = Polygon::SubdivideBezier(aToolsPolygon);
-                nPoints = aToolsPolygon.GetSize();
-            }
-            for (sal_uInt32 i = 0; i < nPoints - 1; ++i)
-            {
-                DrawLineAA(aToolsPolygon[i].X(),     aToolsPolygon[i].Y(),
-                           aToolsPolygon[i + 1].X(), aToolsPolygon[i + 1].Y());
-            }
-        }
-        PostDraw();
-        return true;
+        // Let's just leave it to OutputDevice to do the bezier subdivision,
+        // drawPolyLine(sal_uInt32 nPoints, const SalPoint* pPtAry) will be
+        // called with the result.
+        return false;
     }
 
+    // #i11575#desc5#b adjust B2D tesselation result to raster positions
+    basegfx::B2DPolygon aPolygon = rPolygon;
+    const double fHalfWidth = 0.5 * rLineWidth.getX();
+
     // get the area polygon for the line polygon
     if( (rLineWidth.getX() != rLineWidth.getY())
     && !basegfx::fTools::equalZero( rLineWidth.getY() ) )


More information about the Libreoffice-commits mailing list