Kaydet (Commit) b7d74366 authored tarafından Michael Meeks's avatar Michael Meeks Kaydeden (comit) Markus Mohrhard

vcldemo: disable broken gradient stencil use.

Change-Id: Ifce85b1a7fa8e8b6fc57802a5fb559d2db50ba2a
üst cf01aff0
...@@ -1373,6 +1373,8 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly, ...@@ -1373,6 +1373,8 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
PreDraw(); PreDraw();
#define FIXME_BROKEN_STENCIL_FOR_GRADIENTS 0
#if FIXME_BROKEN_STENCIL_FOR_GRADIENTS
ImplSetClipBit( vcl::Region( rPolyPoly ), 0x02 ); ImplSetClipBit( vcl::Region( rPolyPoly ), 0x02 );
if( mbUseStencil ) if( mbUseStencil )
{ {
...@@ -1384,6 +1386,7 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly, ...@@ -1384,6 +1386,7 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
glEnable( GL_STENCIL_TEST ); glEnable( GL_STENCIL_TEST );
glStencilFunc( GL_EQUAL, 2, 0xFF ); glStencilFunc( GL_EQUAL, 2, 0xFF );
} }
#endif
// if border >= 100%, draw solid rectangle with start color // if border >= 100%, draw solid rectangle with start color
if( rGradient.GetBorder() >= 100.0 ) if( rGradient.GetBorder() >= 100.0 )
...@@ -1408,8 +1411,10 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly, ...@@ -1408,8 +1411,10 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
DrawRadialGradient( rGradient, aBoundRect ); DrawRadialGradient( rGradient, aBoundRect );
} }
#if FIXME_BROKEN_STENCIL_FOR_GRADIENTS
if( !mbUseStencil ) if( !mbUseStencil )
glDisable( GL_STENCIL_TEST ); glDisable( GL_STENCIL_TEST );
#endif
PostDraw(); PostDraw();
CHECK_GL_ERROR(); CHECK_GL_ERROR();
......
...@@ -200,6 +200,7 @@ public: ...@@ -200,6 +200,7 @@ public:
void drawBackground(OutputDevice &rDev, Rectangle r) void drawBackground(OutputDevice &rDev, Rectangle r)
{ {
rDev.Erase();
Gradient aGradient; Gradient aGradient;
aGradient.SetStartColor(COL_BLUE); aGradient.SetStartColor(COL_BLUE);
aGradient.SetEndColor(COL_GREEN); aGradient.SetEndColor(COL_GREEN);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment