diff options
author | Louis-Francis Ratté-Boulianne <lfrb@collabora.com> | 2014-11-18 12:34:53 -0500 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-11-22 20:14:16 +0100 |
commit | 4b6feefa51405e1313de62e1a19c4c213e79c22f (patch) | |
tree | 13796bcb39957f93c01bf338fc605204027bee48 /vcl/inc/openglgdiimpl.hxx | |
parent | vcl: Actually keep the new offscreen texture around (diff) | |
download | core-4b6feefa51405e1313de62e1a19c4c213e79c22f.tar.gz core-4b6feefa51405e1313de62e1a19c4c213e79c22f.zip |
vcl: Add support for backend-dependent blending of bitmaps (mask and alpha)
Change-Id: Iba64eb42965c86ca5655b9a105ef3f397e033ecf
Diffstat (limited to 'vcl/inc/openglgdiimpl.hxx')
-rw-r--r-- | vcl/inc/openglgdiimpl.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx index 5e4af511ef77..b26e10ce7ae0 100644 --- a/vcl/inc/openglgdiimpl.hxx +++ b/vcl/inc/openglgdiimpl.hxx @@ -71,6 +71,11 @@ protected: GLuint mnMaskedSamplerUniform; GLuint mnMaskSamplerUniform; + GLuint mnBlendedTextureProgram; + GLuint mnBlendedTextureUniform; + GLuint mnBlendedMaskUniform; + GLuint mnBlendedAlphaUniform; + GLuint mnMaskProgram; GLuint mnMaskUniform; GLuint mnMaskColorUniform; @@ -92,6 +97,7 @@ protected: bool CreateTextureProgram( void ); bool CreateTransformedTextureProgram( void ); bool CreateMaskedTextureProgram( void ); + bool CreateBlendedTextureProgram( void ); bool CreateTransformedMaskedTextureProgram( void ); bool CreateMaskProgram( void ); bool CreateLinearGradientProgram( void ); @@ -119,6 +125,7 @@ public: void DrawTransformedTexture( OpenGLTexture& rTexture, OpenGLTexture& rMask, const basegfx::B2DPoint& rNull, const basegfx::B2DPoint& rX, const basegfx::B2DPoint& rY ); void DrawAlphaTexture( OpenGLTexture& rTexture, const SalTwoRect& rPosAry, bool bInverted = false, bool pPremultiplied = false ); void DrawTextureWithMask( OpenGLTexture& rTexture, OpenGLTexture& rMask, const SalTwoRect& rPosAry ); + void DrawBlendedTexture( OpenGLTexture& rTexture, OpenGLTexture& rMask, OpenGLTexture& rAlpha, const SalTwoRect& rPosAry ); void DrawMask( OpenGLTexture& rTexture, SalColor nMaskColor, const SalTwoRect& rPosAry ); void DrawLinearGradient( const Gradient& rGradient, const Rectangle& rRect ); void DrawAxialGradient( const Gradient& rGradient, const Rectangle& rRect ); @@ -232,6 +239,16 @@ public: // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics void DoCopyBits(const SalTwoRect& rPosAry, OpenGLSalGraphicsImpl &rSrcImpl); + virtual bool blendBitmap( + const SalTwoRect&, + const SalBitmap& rBitmap ) SAL_OVERRIDE; + + virtual bool blendAlphaBitmap( + const SalTwoRect&, + const SalBitmap& rSrcBitmap, + const SalBitmap& rMaskBitmap, + const SalBitmap& rAlphaBitmap ) SAL_OVERRIDE; + virtual void drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) SAL_OVERRIDE; virtual void drawBitmap( |