Kaydet (Commit) 1419d851 authored tarafından Louis-Francis Ratté-Boulianne's avatar Louis-Francis Ratté-Boulianne Kaydeden (comit) Jan Holesovsky

vcl: Implement copyArea in OpenGL backend

Change-Id: If98a2f39a7f3c3079abe7f5e293d7761db0ed8f9
üst c0f1b99e
......@@ -1361,12 +1361,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
......@@ -1459,6 +1473,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;
......
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