diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2014-11-15 17:33:36 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-12-11 14:09:12 +0100 |
commit | b7d74366a9a15557a1c3dd98f019034ade137b4e (patch) | |
tree | d31c7177b8d2dc8e27768ece962e7ac9c5e5a5f8 /vcl | |
parent | cf01aff0027f3254ec1f4519447086fc76cbba3b (diff) |
vcldemo: disable broken gradient stencil use.
Change-Id: Ifce85b1a7fa8e8b6fc57802a5fb559d2db50ba2a
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 5 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 9520c863f5d7..3690a6b5fa77 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -1373,6 +1373,8 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly, PreDraw(); +#define FIXME_BROKEN_STENCIL_FOR_GRADIENTS 0 +#if FIXME_BROKEN_STENCIL_FOR_GRADIENTS ImplSetClipBit( vcl::Region( rPolyPoly ), 0x02 ); if( mbUseStencil ) { @@ -1384,6 +1386,7 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly, glEnable( GL_STENCIL_TEST ); glStencilFunc( GL_EQUAL, 2, 0xFF ); } +#endif // if border >= 100%, draw solid rectangle with start color if( rGradient.GetBorder() >= 100.0 ) @@ -1408,8 +1411,10 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly, DrawRadialGradient( rGradient, aBoundRect ); } +#if FIXME_BROKEN_STENCIL_FOR_GRADIENTS if( !mbUseStencil ) glDisable( GL_STENCIL_TEST ); +#endif PostDraw(); CHECK_GL_ERROR(); diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 6423b0b24e23..a9d36341b6af 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -200,6 +200,7 @@ public: void drawBackground(OutputDevice &rDev, Rectangle r) { + rDev.Erase(); Gradient aGradient; aGradient.SetStartColor(COL_BLUE); aGradient.SetEndColor(COL_GREEN); |