summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>2014-11-18 19:11:04 -0500
committerJan Holesovsky <kendy@collabora.com>2014-12-02 15:47:18 +0100
commitc6a60f2db482159442081e4c9eca12b0a2e75f3b (patch)
tree0323cbe6e9606fc8ea641b5e3346f7ced11c2c04
parente85bee73a53667a08ac1cdd2059b99d3f7bbe5a5 (diff)
vcl: Implement copyArea in OpenGL backend
Change-Id: If98a2f39a7f3c3079abe7f5e293d7761db0ed8f9
-rw-r--r--vcl/opengl/gdiimpl.cxx23
1 files changed, 19 insertions, 4 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 8a3ff9336a1e..77ae2fa14c26 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1358,12 +1358,26 @@ bool OpenGLSalGraphicsImpl::drawPolyPolygonBezier(
// CopyArea --> No RasterOp, but ClipRegion
void OpenGLSalGraphicsImpl::copyArea(
- long /*nDestX*/, long /*nDestY*/,
- long /*nSrcX*/, long /*nSrcY*/,
- long /*nSrcWidth*/, long /*nSrcHeight*/,
+ long nDestX, long nDestY,
+ long nSrcX, long nSrcY,
+ long nSrcWidth, long nSrcHeight,
sal_uInt16 /*nFlags*/ )
{
- SAL_INFO( "vcl.opengl", "::copyArea" );
+ SAL_INFO( "vcl.opengl", "::copyArea " << nSrcX << "," << nSrcY << " >> " << nDestX << "," << nDestY << " (" << nSrcWidth << "," << nSrcHeight << ")" );
+ OpenGLTexture aTexture;
+ SalTwoRect aPosAry;
+
+ aPosAry.mnSrcX = 0;
+ aPosAry.mnSrcY = 0;
+ aPosAry.mnDestX = nDestX;
+ aPosAry.mnDestY = nDestY;
+ aPosAry.mnSrcWidth = aPosAry.mnDestWidth = nSrcWidth;
+ aPosAry.mnSrcHeight = aPosAry.mnDestHeight = nSrcHeight;
+
+ PreDraw();
+ aTexture = OpenGLTexture( nSrcX, GetHeight() - nSrcY - nSrcHeight, nSrcWidth, nSrcHeight );
+ DrawTexture( aTexture, aPosAry );
+ PostDraw();
}
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
@@ -1456,6 +1470,7 @@ SalBitmap* OpenGLSalGraphicsImpl::getBitmap( long nX, long nY, long nWidth, long
SAL_INFO( "vcl.opengl", "::getBitmap " << nX << "," << nY <<
" " << nWidth << "x" << nHeight );
PreDraw();
+ nY = GetHeight() - nHeight - nY;
if( !pBitmap->Create( maOffscreenTex, nX, nY, nWidth, nHeight ) )
{
delete pBitmap;