[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - 2 commits - vcl/inc vcl/opengl vcl/source

Louis-Francis Ratté-Boulianne lfrb at collabora.com
Wed Nov 19 11:20:56 PST 2014


 vcl/inc/regionband.hxx        |    2 +-
 vcl/opengl/gdiimpl.cxx        |    3 ++-
 vcl/source/gdi/regionband.cxx |    2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 1f3a20c2d1fffe996cb06fc6f102157ae0bccce3
Author: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
Date:   Wed Nov 19 14:18:10 2014 -0500

    vcl: Correctly set the values for the GL scissor test when clipping
    
    Change-Id: I5ff59f93a3760e6a920860f8aa5fc3f62d0d183d

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 53c7ce0..877db3b 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -182,7 +182,8 @@ bool OpenGLSalGraphicsImpl::setClipRegion( const vcl::Region& rClip )
         mbUseStencil = false;
         mbUseScissor = true;
         maContext.makeCurrent();
-        glScissor( aRect.Left(), GetHeight() - aRect.Top(), aRect.GetWidth(), aRect.GetHeight() );
+        glViewport( 0, 0, GetWidth(), GetHeight() );
+        glScissor( aRect.Left(), GetHeight() - aRect.Bottom() - 1, aRect.GetWidth(), aRect.GetHeight() );
     }
     else
     {
commit 913554d500166983b6b8d76506fb38d467986dd4
Author: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
Date:   Wed Nov 19 14:10:22 2014 -0500

    vcl: Actually returns the number of rectangles for the RegionBand
    
    Change-Id: I6be30b28fa608855919890dc47145ef5a3648021

diff --git a/vcl/inc/regionband.hxx b/vcl/inc/regionband.hxx
index 5676329..277e2c7 100644
--- a/vcl/inc/regionband.hxx
+++ b/vcl/inc/regionband.hxx
@@ -73,7 +73,7 @@ public:
     void XOr(const RegionBand& rSource);
     Rectangle GetBoundRect() const;
     bool IsInside(const Point& rPoint) const;
-    sal_uInt32 getRectangleCount() const; // only users are Region::Intersect and PSWriter::ImplBmp
+    sal_uInt32 getRectangleCount() const; // only users are Region::Intersect, Region::IsRectangle and PSWriter::ImplBmp
     void GetRegionRectangles(RectangleVector& rTarget) const;
 };
 
diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx
index a7d109f..5e1492c 100644
--- a/vcl/source/gdi/regionband.cxx
+++ b/vcl/source/gdi/regionband.cxx
@@ -1259,7 +1259,7 @@ sal_uInt32 RegionBand::getRectangleCount() const
         pBand = pBand->mpNextBand;
     }
 
-    return 0;
+    return nCount;
 }
 
 #ifdef DBG_UTIL


More information about the Libreoffice-commits mailing list