diff options
author | Louis-Francis Ratté-Boulianne <lfrb@collabora.com> | 2014-11-22 07:58:38 -0500 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-11-22 20:14:19 +0100 |
commit | e26237f6cbc0d499c91aa32c3bea1f9daee6578e (patch) | |
tree | d592bb8b6e516f5cf05ac5cc98bdbe1d0a9fcf9a /vcl/inc/opengl | |
parent | 90af2a6c403e7f6e5192d54f69b38b85a9e6fbc8 (diff) |
vcl: Always use the same OpenGL context when drawing in a window
Change-Id: Ief0e947149c133aaa8e81973e088c4df6432bfdc
Diffstat (limited to 'vcl/inc/opengl')
-rw-r--r-- | vcl/inc/opengl/win/gdiimpl.hxx | 9 | ||||
-rw-r--r-- | vcl/inc/opengl/x11/gdiimpl.hxx | 6 |
2 files changed, 14 insertions, 1 deletions
diff --git a/vcl/inc/opengl/win/gdiimpl.hxx b/vcl/inc/opengl/win/gdiimpl.hxx index 557e58a09af3..66a03332284c 100644 --- a/vcl/inc/opengl/win/gdiimpl.hxx +++ b/vcl/inc/opengl/win/gdiimpl.hxx @@ -15,6 +15,8 @@ #include "openglgdiimpl.hxx" #include "win/salgdi.h" +class OpenGLContext; + class WinOpenGLSalGraphicsImpl : public OpenGLSalGraphicsImpl { friend class WinLayout; @@ -24,9 +26,16 @@ private: public: WinOpenGLSalGraphicsImpl(WinSalGraphics& rGraphics); + virtual void Init() SAL_OVERRIDE; + protected: virtual GLfloat GetWidth() const SAL_OVERRIDE; virtual GLfloat GetHeight() const SAL_OVERRIDE; + virtual bool IsOffscreen() const SAL_OVERRIDE; + + virtual OpenGLContext* CreateWinContext() SAL_OVERRIDE; + virtual bool CompareWinContext( OpenGLContext* pContext ) SAL_OVERRIDE; + virtual OpenGLContext* CreatePixmapContext() 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 d25d5d0212ca..f5e5bfb4f2f4 100644 --- a/vcl/inc/opengl/x11/gdiimpl.hxx +++ b/vcl/inc/opengl/x11/gdiimpl.hxx @@ -28,12 +28,16 @@ public: protected: GLfloat GetWidth() const SAL_OVERRIDE; GLfloat GetHeight() const SAL_OVERRIDE; + bool IsOffscreen() const SAL_OVERRIDE; + + virtual OpenGLContext* CreateWinContext() SAL_OVERRIDE; + virtual bool CompareWinContext( OpenGLContext* pContext ) SAL_OVERRIDE; + virtual OpenGLContext* CreatePixmapContext() SAL_OVERRIDE; 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, X11Pixmap* pMask, int nX, int nY ) SAL_OVERRIDE; }; |