[Libreoffice-commits] core.git: 2 commits - svx/inc svx/source vcl/inc vcl/unx

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Wed Jul 20 08:39:22 UTC 2016


 svx/inc/sdr/overlay/overlayhandle.hxx    |    4 +++-
 svx/source/sdr/overlay/overlayhandle.cxx |    4 +++-
 svx/source/svdraw/svdhdl.cxx             |    2 +-
 vcl/inc/unx/salgdi.h                     |    1 +
 vcl/unx/generic/gdi/salgdi.cxx           |    9 +++++----
 5 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 33f48960c6ce718937767796d39a40344a356956
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Wed Jul 20 17:21:12 2016 +0900

    vcl: don't use the faster cairo code path when using OpenGL
    
    Change-Id: Ia5f2fbf8765db4828338df4eb1f6d7405004e738

diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 7cb0841..a9c91ed 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -349,6 +349,7 @@ protected:
     bool                            bPrinter_ : 1;      // is Printer
     bool                            bVirDev_ : 1;       // is VirDev
     bool                            bFontGC_ : 1;       // is Font GC valid
+    bool                            m_bOpenGL : 1;
 
 private:
     std::unique_ptr<SalGraphicsImpl> mxImpl;
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index ea966b41..66c9e62 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -91,9 +91,10 @@ X11SalGraphics::X11SalGraphics():
     bWindow_(false),
     bPrinter_(false),
     bVirDev_(false),
-    bFontGC_(false)
+    bFontGC_(false),
+    m_bOpenGL(OpenGLHelper::isVCLOpenGLEnabled())
 {
-    if (OpenGLHelper::isVCLOpenGLEnabled())
+    if (m_bOpenGL)
     {
         mxImpl.reset(new X11OpenGLSalGraphicsImpl(*this));
         mxTextRenderImpl.reset((new OpenGLX11CairoTextRender(*this)));
@@ -598,7 +599,7 @@ bool X11SalGraphics::drawPolyPolygon( const basegfx::B2DPolyPolygon& rOrigPolyPo
 #if ENABLE_CAIRO_CANVAS
     static bool bUseCairoForPolygons = false;
 
-    if(bUseCairoForPolygons && SupportsCairo())
+    if (!m_bOpenGL && bUseCairoForPolygons && SupportsCairo())
     {
         // snap to raster if requested
         basegfx::B2DPolyPolygon aPolyPoly(rOrigPolyPoly);
@@ -729,7 +730,7 @@ bool X11SalGraphics::drawPolyLine(
 #if ENABLE_CAIRO_CANVAS
     static bool bUseCairoForFatLines = true;
 
-    if(bUseCairoForFatLines && SupportsCairo())
+    if (!m_bOpenGL && bUseCairoForFatLines && SupportsCairo())
     {
         cairo_t* cr = getCairoContext();
         clipRegion(cr);
commit 788e8e6f4b9a66b4a6ba7ffbf234cb2cbbe3e998
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon Jul 18 13:53:09 2016 +0900

    svx: rotate drawn (non-bitmap) handles with the object
    
    Change-Id: Id0cad502fd99737a35d894109deae4f26df36d06

diff --git a/svx/inc/sdr/overlay/overlayhandle.hxx b/svx/inc/sdr/overlay/overlayhandle.hxx
index 201fd93..09e18aa 100644
--- a/svx/inc/sdr/overlay/overlayhandle.hxx
+++ b/svx/inc/sdr/overlay/overlayhandle.hxx
@@ -22,6 +22,7 @@ class SVX_DLLPUBLIC OverlayHandle : public OverlayObjectWithBasePosition
 protected:
     basegfx::B2DSize maSize;
     Color maStrokeColor;
+    float mfTransparency;
 
     // geometry creation for OverlayObject
     virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
@@ -30,7 +31,8 @@ public:
     OverlayHandle(const basegfx::B2DPoint& rBasePos,
                   const basegfx::B2DSize& rSize,
                   Color& rStrokeColor,
-                  Color& rFillColor);
+                  Color& rFillColor,
+                  float fTransparency = 0.0f);
 
     virtual ~OverlayHandle();
 };
diff --git a/svx/source/sdr/overlay/overlayhandle.cxx b/svx/source/sdr/overlay/overlayhandle.cxx
index 0c89165..c5f1c0c 100644
--- a/svx/source/sdr/overlay/overlayhandle.cxx
+++ b/svx/source/sdr/overlay/overlayhandle.cxx
@@ -47,10 +47,12 @@ primitive2d::Primitive2DContainer OverlayHandle::createOverlayObjectPrimitive2DS
 OverlayHandle::OverlayHandle(const B2DPoint& rBasePos,
                              const B2DSize& rSize,
                              Color& rStrokeColor,
-                             Color& rFillColor)
+                             Color& rFillColor,
+                             float fTransparency)
     : OverlayObjectWithBasePosition(rBasePos, rFillColor)
     , maSize(rSize)
     , maStrokeColor(rStrokeColor)
+    , mfTransparency(fTransparency)
 {
 }
 
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 923ff01..dd9f08d 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -616,7 +616,7 @@ void SdrHdl::CreateB2dIAObject()
                                 default:
                                     break;
                             }
-                            pNewOverlayObject = new sdr::overlay::OverlayHandle(aPosition, aB2DSize, aHandleStrokeColor, aHandleFillColor);
+                            pNewOverlayObject = new sdr::overlay::OverlayHandle(aPosition, aB2DSize, aHandleStrokeColor, aHandleFillColor, nRotationAngle);
                         }
                         else
                         {


More information about the Libreoffice-commits mailing list