diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-07 16:11:02 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-06-07 18:16:00 +0000 |
commit | dc4b01a5a937565b1d6491850c922e1b7de0e949 (patch) | |
tree | 40cb93159e3d26c292bae366b908780e5dd41a08 /include | |
parent | tdf#50821 RTF import: fix handling of \trpaddf{b,l,r,t} (diff) | |
download | core-dc4b01a5a937565b1d6491850c922e1b7de0e949.tar.gz core-dc4b01a5a937565b1d6491850c922e1b7de0e949.zip |
only init the OpenGL context if we need it
Reviewed-on: https://gerrit.libreoffice.org/26023
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 78b100ec9cb0db2f7b33ece5ad3287a67a37246f)
we also need to set initialized falg for deferred initialization
Change-Id: Ia88a1720d204b9933f1476bd703b99180e45abde
Reviewed-on: https://gerrit.libreoffice.org/26031
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/openglwin.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/vcl/openglwin.hxx b/include/vcl/openglwin.hxx index 6b2e58dd5c40..cac81a6968ea 100644 --- a/include/vcl/openglwin.hxx +++ b/include/vcl/openglwin.hxx @@ -33,7 +33,7 @@ public: class VCL_DLLPUBLIC OpenGLWindow : public vcl::Window { public: - OpenGLWindow(vcl::Window* pParent); + OpenGLWindow(vcl::Window* pParent, bool bInit = true); virtual ~OpenGLWindow(); virtual void dispose() override; @@ -48,6 +48,10 @@ public: virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void Command( const CommandEvent& rCEvt ) override; + bool IsInitialized() const; + + void Initialize(); + private: std::unique_ptr<OpenGLWindowImpl> mxImpl; IRenderer* mpRenderer; |