diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-07 16:11:02 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-07 16:11:20 +0000 |
commit | 78b100ec9cb0db2f7b33ece5ad3287a67a37246f (patch) | |
tree | 09915b94cacc0f590850b2dc5772cff617b46e4b /chart2 | |
parent | 665844d8dd0cf4b3fc6cdb56f3e155704ba76b00 (diff) |
only init the OpenGL context if we need it
Change-Id: Ia88a1720d204b9933f1476bd703b99180e45abde
Reviewed-on: https://gerrit.libreoffice.org/26023
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/ChartWindow.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index 25bdc33c7a13..3d3b8492b4e9 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -50,7 +50,7 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi , m_pWindowController( pController ) , m_bInPaint(false) #if HAVE_FEATURE_OPENGL - , m_pOpenGLWindow(VclPtr<OpenGLWindow>::Create(this)) + , m_pOpenGLWindow(VclPtr<OpenGLWindow>::Create(this, false)) #else , m_pOpenGLWindow(nullptr) #endif diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 569eeaee3f47..56c7a59e795b 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2731,6 +2731,10 @@ void ChartView::impl_updateView( bool bCheckLockedCtrler ) //create chart view { + OpenGLWindow* pWindow = mrChartModel.getOpenGLWindow(); + if (pWindow && ChartHelper::isGL3DDiagram(mrChartModel.getFirstDiagram())) + pWindow->Initialize(); + m_bViewDirty = false; m_bViewUpdatePending = false; createShapes(); |