summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-11-17 04:35:29 +0000
committerMichael Meeks <michael.meeks@collabora.com>2014-11-17 22:38:58 +0000
commitdfeaee01a30109883e41f45faf28fc247dadb3b2 (patch)
tree26e1bf401c7f4bdba70081991d2b6f030183020f
parent5b14cd7d8d293365ebc03ee1442610180c07ab8d (diff)
vcl: copyBits should operate on mrParent if no context supplied.
eg. OutputDevice::DrawOutDev: mpGraphics->CopyBits( aPosAry, NULL, this, NULL ); Change-Id: I0b041bb5aa6aba573b9f589842084722481cb438
-rw-r--r--vcl/inc/opengl/win/gdiimpl.hxx1
-rw-r--r--vcl/inc/opengl/x11/gdiimpl.hxx1
-rw-r--r--vcl/inc/openglgdiimpl.hxx2
-rw-r--r--vcl/opengl/gdiimpl.cxx4
-rw-r--r--vcl/opengl/win/gdiimpl.cxx6
-rw-r--r--vcl/opengl/x11/gdiimpl.cxx6
6 files changed, 17 insertions, 3 deletions
diff --git a/vcl/inc/opengl/win/gdiimpl.hxx b/vcl/inc/opengl/win/gdiimpl.hxx
index 085be79bcef2..557e58a09af3 100644
--- a/vcl/inc/opengl/win/gdiimpl.hxx
+++ b/vcl/inc/opengl/win/gdiimpl.hxx
@@ -29,6 +29,7 @@ protected:
virtual GLfloat GetHeight() const SAL_OVERRIDE;
public:
+ virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) SAL_OVERRIDE;
};
diff --git a/vcl/inc/opengl/x11/gdiimpl.hxx b/vcl/inc/opengl/x11/gdiimpl.hxx
index 00eaf8cdf9c2..a2b863e3631d 100644
--- a/vcl/inc/opengl/x11/gdiimpl.hxx
+++ b/vcl/inc/opengl/x11/gdiimpl.hxx
@@ -32,6 +32,7 @@ protected:
public:
// implementation of X11GraphicsImpl
+ virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) SAL_OVERRIDE;
void Init() SAL_OVERRIDE;
bool FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) SAL_OVERRIDE;
bool RenderPixmapToScreen( X11Pixmap* pPixmap, int nX, int nY ) SAL_OVERRIDE;
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index dd0b1e38712d..80d760a69796 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -216,7 +216,7 @@ public:
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
// CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
- virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) SAL_OVERRIDE;
+ void DoCopyBits( const SalTwoRect& rPosAry, OpenGLSalGraphicsImpl *pSrcImpl );
virtual void drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) SAL_OVERRIDE;
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 8532ba026e17..9ed40b6e643d 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1171,9 +1171,9 @@ void OpenGLSalGraphicsImpl::copyArea(
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
// CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
-void OpenGLSalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics )
+void OpenGLSalGraphicsImpl::DoCopyBits( const SalTwoRect& rPosAry, OpenGLSalGraphicsImpl* pSrcImpl )
{
- OpenGLSalGraphicsImpl *pImpl = pSrcGraphics ? dynamic_cast< OpenGLSalGraphicsImpl* >(pSrcGraphics->GetImpl()) : NULL;
+ OpenGLSalGraphicsImpl *pImpl = pSrcImpl;
SAL_INFO( "vcl.opengl", "::copyBits" );
diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx
index e829ca445f42..67a192eb7f12 100644
--- a/vcl/opengl/win/gdiimpl.cxx
+++ b/vcl/opengl/win/gdiimpl.cxx
@@ -18,6 +18,12 @@ WinOpenGLSalGraphicsImpl::WinOpenGLSalGraphicsImpl(WinSalGraphics& rGraphics):
{
}
+void WinOpenGLSalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics )
+{
+ OpenGLSalGraphicsImpl *pImpl = pSrcGraphics ? dynamic_cast< OpenGLSalGraphicsImpl* >(pSrcGraphics->GetImpl()) : static_cast< OpenGLSalGraphicsImpl *>(mrParent.GetImpl());
+ OpenGLSalGraphicsImpl::DoCopyBits( rPosAry, pImpl );
+}
+
GLfloat WinOpenGLSalGraphicsImpl::GetWidth() const
{
if( mrParent.gethWnd() && IsWindow( mrParent.gethWnd() ) )
diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx
index 5292038fcc9e..dcefcc23172f 100644
--- a/vcl/opengl/x11/gdiimpl.cxx
+++ b/vcl/opengl/x11/gdiimpl.cxx
@@ -81,6 +81,12 @@ void X11OpenGLSalGraphicsImpl::Init()
}
}
+void X11OpenGLSalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics )
+{
+ OpenGLSalGraphicsImpl *pImpl = pSrcGraphics ? dynamic_cast< OpenGLSalGraphicsImpl* >(pSrcGraphics->GetImpl()) : static_cast< OpenGLSalGraphicsImpl *>(mrParent.GetImpl());
+ OpenGLSalGraphicsImpl::DoCopyBits( rPosAry, pImpl );
+}
+
bool X11OpenGLSalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY )
{
Display* pDisplay = mrParent.GetXDisplay();