[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl' - 4 commits - officecfg/registry vcl/Library_vclplug_gen.mk vcl/unx
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Thu Oct 30 16:45:53 PDT 2014
officecfg/registry/schema/org/openoffice/Office/Common.xcs | 12 +++
vcl/Library_vclplug_gen.mk | 4 +
vcl/unx/generic/gdi/salgdi.cxx | 47 ++++++-------
3 files changed, 39 insertions(+), 24 deletions(-)
New commits:
commit ae1f44f1d1bdb6aceca6a47e45c5fd323c968ddc
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Fri Oct 31 00:43:12 2014 +0100
use constructor init list
Change-Id: I0344bdbd1e5643f8de1ce336caec21a3e789d4ca
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 41de3a8..a87eb33 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -61,8 +61,23 @@
#include <officecfg/Office/Common.hxx>
X11SalGraphics::X11SalGraphics():
+ m_pFrame(NULL),
+ m_pVDev(NULL),
+ m_pColormap(NULL),
+ m_pDeleteColormap(NULL),
+ hDrawable_(None),
m_nXScreen( 0 ),
- pFontGC_(NULL)
+ m_pXRenderFormat(NULL),
+ m_aXRenderPicture(0),
+ pPaintRegion_(NULL),
+ mpClipRegion(NULL),
+ pFontGC_(NULL),
+ nTextColor_(MAKE_SALCOLOR(0x00, 0x00, 0x00)), //black
+ nTextPixel_(0),
+ hBrush_(None),
+ bWindow_(false),
+ bPrinter_(false),
+ bVirDev_(false)
{
bool bUseOpenGL = officecfg::Office::Common::VCL::UseOpenGL::get();
if (bUseOpenGL)
@@ -70,34 +85,14 @@ X11SalGraphics::X11SalGraphics():
else
mpImpl.reset(new X11SalGraphicsImpl(*this));
- m_pFrame = NULL;
- m_pVDev = NULL;
- m_pColormap = NULL;
- m_pDeleteColormap = NULL;
- hDrawable_ = None;
- m_aXRenderPicture = 0;
- m_pXRenderFormat = NULL;
-
- mpClipRegion = NULL;
- pPaintRegion_ = NULL;
-
for( int i = 0; i < MAX_FALLBACK; ++i )
mpServerFont[i] = NULL;
- nTextPixel_ = 0;
- nTextColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black
-
#if ENABLE_GRAPHITE
// check if graphite fonts have been disabled
static const char* pDisableGraphiteStr = getenv( "SAL_DISABLE_GRAPHITE" );
bDisableGraphite_ = pDisableGraphiteStr && (pDisableGraphiteStr[0]!='0');
#endif
-
- hBrush_ = None;
-
- bWindow_ = false;
- bPrinter_ = false;
- bVirDev_ = false;
}
X11SalGraphics::~X11SalGraphics()
commit b6dc064e59cfb852af3b41d17ea6d20d667a7261
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Fri Oct 31 00:32:14 2014 +0100
move that variable out of the constructor init list
We might delete it a few lines later again if we select the OpenGL one.
Change-Id: I08bac1b65bbae02f4f1dd149f484132f84dbc371
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index b950740..41de3a8 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -61,13 +61,15 @@
#include <officecfg/Office/Common.hxx>
X11SalGraphics::X11SalGraphics():
- mpImpl(new X11SalGraphicsImpl(*this)),
m_nXScreen( 0 ),
pFontGC_(NULL)
{
bool bUseOpenGL = officecfg::Office::Common::VCL::UseOpenGL::get();
if (bUseOpenGL)
mpImpl.reset(new OpenGLSalGraphicsImpl());
+ else
+ mpImpl.reset(new X11SalGraphicsImpl(*this));
+
m_pFrame = NULL;
m_pVDev = NULL;
m_pColormap = NULL;
commit dec2ac90edf42f504aa2744ba1559f88fe4c5819
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Fri Oct 31 00:29:57 2014 +0100
use configuration value for OpenGL backend
Change-Id: I18aa0a19a625b2a64d26adacaa139c9bf734dc9b
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index f303911..d25eec6 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -24,6 +24,10 @@ $(eval $(call gb_Library_set_include,vclplug_gen,\
-I$(SRCDIR)/vcl/inc \
))
+$(eval $(call gb_Library_use_custom_headers,vclplug_gen,\
+ officecfg/registry \
+))
+
$(eval $(call gb_Library_use_sdk_api,vclplug_gen))
$(eval $(call gb_Library_use_libraries,vclplug_gen,\
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 50941e6..b950740 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -58,13 +58,15 @@
#include "generic/printergfx.hxx"
#include "xrender_peer.hxx"
+#include <officecfg/Office/Common.hxx>
+
X11SalGraphics::X11SalGraphics():
mpImpl(new X11SalGraphicsImpl(*this)),
m_nXScreen( 0 ),
pFontGC_(NULL)
{
- static const char* pOpenGL = getenv("USE_OPENGL");
- if (pOpenGL)
+ bool bUseOpenGL = officecfg::Office::Common::VCL::UseOpenGL::get();
+ if (bUseOpenGL)
mpImpl.reset(new OpenGLSalGraphicsImpl());
m_pFrame = NULL;
m_pVDev = NULL;
commit e33c012e20b69c5de433e9d0bedd61e55ae30ea3
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Fri Oct 31 00:20:34 2014 +0100
add configuration value for VCL OpenGL backend
Change-Id: Ie23e31bec68e6f5ae3aab6ff5d6f19df5c2c9242
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 4e0f2a3..e19df23 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -847,6 +847,18 @@
</group>
</templates>
<component>
+ <group oor:name="VCL">
+ <info>
+ <desc>Contains settings for VCL.</desc>
+ </info>
+ <prop oor:name="UseOpenGL" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Specifies if OpenGL rendering should be used in VCL backends
+ supporting it.</desc>
+ </info>
+ <value>false</value>
+ </prop>
+ </group>
<group oor:name="InternalMSExport">
<info>
<desc>Contains internal MSExport settings that are common for all
More information about the Libreoffice-commits
mailing list