[Libreoffice-commits] core.git: Branch 'feature/vcl-opengl2' - 3 commits - config_host/config_features.h.in configure.ac include/vcl ios/experimental ios/.gitignore sw/source vcl/headless vcl/inc vcl/ios vcl/Library_vcl.mk
Ptyl Dragon
ptyl at cloudon.com
Mon Oct 6 04:39:28 PDT 2014
config_host/config_features.h.in | 5
configure.ac | 10
include/vcl/sysdata.hxx | 11
ios/.gitignore | 1
ios/experimental/TiledLibreOffice/.gitignore | 9
ios/experimental/TiledLibreOffice/TiledLibreOffice/.gitignore | 1
sw/source/core/view/viewsh.cxx | 3
vcl/Library_vcl.mk | 19
vcl/headless/svpgdi.cxx | 5
vcl/headless/svpinst.cxx | 22
vcl/inc/headless/svpframe.hxx | 7
vcl/inc/headless/svpgdi.hxx | 18
vcl/inc/headless/svpinst.hxx | 6
vcl/inc/headless/svpvd.hxx | 4
vcl/inc/opengl/openglinst.hxx | 54 +
vcl/inc/opengl/salbmp.h | 98 +++
vcl/inc/opengl/salgdi.h | 302 ++++++++++
vcl/inc/opengl/salvd.h | 57 +
vcl/inc/saldatabasic.hxx | 9
vcl/ios/iosinst.cxx | 15
20 files changed, 645 insertions(+), 11 deletions(-)
New commits:
commit c3fe92ca70ad58e2fbac78508d343f06a80c7e86
Author: Ptyl Dragon <ptyl at cloudon.com>
Date: Mon Oct 6 14:40:58 2014 +0300
change return type to ImplFontCharMapPtr post creating vcl-opengl2 branch
Change-Id: Id2022cf1b3665b54356c28deda51d82e172a839e
diff --git a/vcl/inc/opengl/salgdi.h b/vcl/inc/opengl/salgdi.h
index 4631182..0f71248 100644
--- a/vcl/inc/opengl/salgdi.h
+++ b/vcl/inc/opengl/salgdi.h
@@ -185,7 +185,7 @@ public:
// get the current font's metrics
virtual void GetFontMetric( ImplFontMetricData*, int /* nFallbackLevel */ ) SAL_OVERRIDE {}
// get the repertoire of the current font
- virtual const ImplFontCharMap*
+ virtual const ImplFontCharMapPtr
GetImplFontCharMap() const SAL_OVERRIDE
{
return nullptr;
commit 500149536c75fd4b3f81ebaf5fa624ee143809f6
Author: Ptyl Dragon <ptyl at cloudon.com>
Date: Mon Oct 6 12:52:55 2014 +0300
make works with OpenGLSalInstance / OpenGLSalGraphics
Change-Id: Ie5156dd15122586e9c173a3532759a3be728809a
diff --git a/configure.ac b/configure.ac
index f01ed6f..6e85b87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2448,6 +2448,7 @@ if test $_os != iOS -a $_os != Android; then
fi
if test "$enable_vgl" == yes; then
+ HAVE_VCL_OPEN_GL_BACKEND="TRUE"
AC_DEFINE(HAVE_VCL_OPEN_GL_BACKEND)
fi
diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index 4cfc737..fa909af 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_VCL_SYSDATA_HXX
#define INCLUDED_VCL_SYSDATA_HXX
+#include <config_features.h>
+
#include <vector>
#include <cstddef>
@@ -36,9 +38,12 @@ class NSView;
#endif
#ifdef IOS
+#if HAVE_VCL_OPEN_GL_BACKEND
+#else
typedef const struct __CTFont * CTFontRef;
typedef struct CGContext *CGContextRef;
#endif
+#endif
#if defined( WNT )
#include <windef.h>
@@ -140,7 +145,10 @@ struct SystemGraphicsData
#elif defined( ANDROID )
// Nothing
#elif defined( IOS )
+#if HAVE_VCL_OPEN_GL_BACKEND
+#else
CGContextRef rCGContext; // CoreGraphics graphic context
+#endif
#elif defined( UNX )
void* pDisplay; // the relevant display connection
long hDrawable; // a drawable
@@ -159,7 +167,10 @@ struct SystemGraphicsData
#elif defined( ANDROID )
// Nothing
#elif defined( IOS )
+#if HAVE_VCL_OPEN_GL_BACKEND
+#else
, rCGContext( NULL )
+#endif
#elif defined( UNX )
, pDisplay( NULL )
, hDrawable( 0 )
diff --git a/ios/.gitignore b/ios/.gitignore
index 08c6a68..3d2a3a2 100644
--- a/ios/.gitignore
+++ b/ios/.gitignore
@@ -7,3 +7,4 @@
#
/lo.xcconfig
+/.log
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/.gitignore b/ios/experimental/TiledLibreOffice/TiledLibreOffice/.gitignore
new file mode 100644
index 0000000..ba78577
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/.gitignore
@@ -0,0 +1 @@
+/native-code.mm
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 0731c2b..7506b6b 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1851,7 +1851,10 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
if (pViewShell)
{
SystemGraphicsData aData;
+#if HAVE_VCL_OPEN_GL_BACKEND
+#else
aData.rCGContext = (CGContextRef) context;
+#endif
VirtualDevice aDevice(&aData, (sal_uInt16)0);
// paint to it
pViewShell->PaintTile(aDevice, contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight);
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index dea1d8d..213d59f 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -401,9 +401,11 @@ $(eval $(call gb_Library_add_defs,vcl,\
-DMACOSX_BUNDLE_IDENTIFIER=\"$(MACOSX_BUNDLE_IDENTIFIER)\" \
))
-$(eval $(call gb_Library_add_exception_objects,vcl,\
+$(if $(filter-out TRUE, $(HAVE_VCL_OPEN_GL_BACKEND)), \
+$(eval $(call gb_Library_add_exception_objects,vcl, \
$(vcl_coretext_code) \
-))
+)) \
+)
$(eval $(call gb_Library_use_system_darwin_frameworks,vcl,\
ApplicationServices \
@@ -462,8 +464,13 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/osx/PictToBmpFlt \
vcl/osx/clipboard \
vcl/osx/service_entry \
- $(vcl_quartz_code) \
- vcl/quartz/salgdiutils \
+ $(if $(filter-out TRUE, $(HAVE_VCL_OPEN_GL_BACKEND)),\
+ $(vcl_quartz_code) \
+ vcl/quartz/salgdiutils \
+ )\
+ $(if $(filter TRUE, $(HAVE_VCL_OPEN_GL_BACKEND)),\
+ vcl/quartz/utils \
+ )\
vcl/osx/salnativewidgets \
vcl/osx/salprn \
vcl/osx/salframe \
@@ -604,8 +611,8 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/ios/iosinst \
vcl/ios/dummies \
$(vcl_really_generic_code) \
- $(vcl_coretext_code) \
- $(vcl_quartz_code) \
+ $(if $(filter-out TRUE, $(HAVE_VCL_OPEN_GL_BACKEND)), $(vcl_quartz_code) $(vcl_coretext_code)) \
+ $(if $(filter TRUE, $(HAVE_VCL_OPEN_GL_BACKEND)), vcl/quartz/utils )\
$(vcl_headless_code) \
))
$(eval $(call gb_Library_use_system_darwin_frameworks,vcl,\
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index ef8f126..db3ea29 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -730,11 +730,12 @@ bool SvpSalGraphics::supportsOperation( OutDevSupportType ) const
#endif
#ifdef IOS
-
+#if HAVE_VCL_OPEN_GL_BACKEND
+#else
void SvpSalGraphics::RefreshRect(float /* lX */, float /* lY */, float /* lWidth */, float /* lHeight */)
{
}
-
+#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 3fa2226..2fa3448 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
@@ -32,10 +34,16 @@
#include "headless/svpvd.hxx"
#ifdef IOS
#include "headless/svpgdi.hxx"
+#if HAVE_VCL_OPEN_GL_BACKEND
+#include "opengl/salbmp.h"
+#include "opengl/salgdi.h"
+#include "opengl/salvd.h"
+#else
#include "quartz/salbmp.h"
#include "quartz/salgdi.h"
#include "quartz/salvd.h"
#endif
+#endif
#include "headless/svpbmp.hxx"
#include <salframe.hxx>
@@ -230,6 +238,16 @@ SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* /* pGraphics
return pNew;
}
+#else
+#if HAVE_VCL_OPEN_GL_BACKEND
+SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* /* pGraphics */,
+ long /* nDX */, long /*nDY*/,
+ sal_uInt16 /* nBitCount */,
+ const SystemGraphicsData* /* pData */ )
+{
+ return nullptr;
+}
+#endif
#endif
SalTimer* SvpSalInstance::CreateSalTimer()
@@ -250,7 +268,11 @@ SalSystem* SvpSalInstance::CreateSalSystem()
SalBitmap* SvpSalInstance::CreateSalBitmap()
{
#ifdef IOS
+#if HAVE_VCL_OPEN_GL_BACKEND
+ return new OpenGLSalBitmap();
+#else
return new QuartzSalBitmap();
+#endif
#else
return new SvpSalBitmap();
#endif
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 8e0bbd4..bd26e39 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_VCL_INC_HEADLESS_SVPFRAME_HXX
#define INCLUDED_VCL_INC_HEADLESS_SVPFRAME_HXX
+#include <config_features.h>
+
#include <vcl/sysdata.hxx>
#include <basegfx/range/b2ibox.hxx>
#include <basebmp/bitmapdevice.hxx>
@@ -29,9 +31,14 @@
#include <list>
#ifdef IOS
+#if HAVE_VCL_OPEN_GL_BACKEND
+#define SvpSalGraphics OpenGLSalGraphics
+#define SvpSalInstance OpenGLSalInstance
+#else
#define SvpSalGraphics AquaSalGraphics
#define SvpSalInstance AquaSalInstance
#endif
+#endif
class SvpSalInstance;
class SvpSalGraphics;
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index aad4693..425dc04 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_VCL_INC_HEADLESS_SVPGDI_HXX
#define INCLUDED_VCL_INC_HEADLESS_SVPGDI_HXX
+#include <config_features.h>
+
#include <basebmp/bitmapdevice.hxx>
#include <basebmp/color.hxx>
#include <vcl/sysdata.hxx>
@@ -28,12 +30,16 @@
#include "sallayout.hxx"
#ifdef IOS
+#if HAVE_VCL_OPEN_GL_BACKEND
+#include "opengl/salgdi.h"
+#else
#include "quartz/salgdi.h"
#include <premac.h>
#include <Foundation/Foundation.h>
#include <CoreGraphics/CoreGraphics.h>
#include <postmac.h>
#endif
+#endif
class ServerFont;
@@ -42,9 +48,15 @@ class ServerFont;
// let's continue calling the SalGraphics subclass "AquaSalGraphics" even if it
// is used by us also on iOS, where of course the term "Aqua" has no meaning at all.
// (Note that even on OS X, using the term "Aqua" is a misunderstanding or obsolete.)
+#if HAVE_VCL_OPEN_GL_BACKEND
+#define SvpSalGraphics OpenGLSalGraphics
+#define SVP_SAL_GRAPHICS_ALREADY_DEFINED
+#else
#define SvpSalGraphics AquaSalGraphics
#endif
+#endif
+#ifndef SVP_SAL_GRAPHICS_ALREADY_DEFINED
class SvpSalGraphics : public SalGraphics
{
#ifndef IOS
@@ -83,7 +95,6 @@ private:
public:
void setDevice( basebmp::BitmapDeviceSharedPtr& rDevice );
-#else
friend class CTLayout;
CGLayerRef mxLayer;
@@ -242,6 +253,8 @@ public:
virtual SystemFontData GetSysFontData( int nFallbacklevel ) const SAL_OVERRIDE;
#ifdef IOS
+#if HAVE_VCL_OPEN_GL_BACKEND
+#else
void SetVirDevGraphics( CGLayerRef xLayer, CGContextRef xContext, int = 0 );
bool CheckContext();
@@ -262,7 +275,10 @@ public:
void ApplyXorContext();
void Pattern50Fill();
#endif
+#endif
};
+#endif
+#undef SVP_SAL_GRAPHICS_ALREADY_DEFINED
#endif // INCLUDED_VCL_INC_HEADLESS_SVPGDI_HXX
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index 0bf542f..d5fd8cc 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_VCL_INC_HEADLESS_SVPINST_HXX
#define INCLUDED_VCL_INC_HEADLESS_SVPINST_HXX
+#include <config_features.h>
+
#include <osl/mutex.hxx>
#include <osl/thread.hxx>
#include <salinst.hxx>
@@ -37,8 +39,12 @@
#define VIRTUAL_DESKTOP_HEIGHT 768
#ifdef IOS
+#if HAVE_VCL_OPEN_GL_BACKEND
+#define SvpSalInstance OpenGLSalInstance
+#else
#define SvpSalInstance AquaSalInstance
#endif
+#endif
class SvpSalInstance;
class SvpSalTimer : public SalTimer
diff --git a/vcl/inc/headless/svpvd.hxx b/vcl/inc/headless/svpvd.hxx
index f6a9cc5..3b3d38b 100644
--- a/vcl/inc/headless/svpvd.hxx
+++ b/vcl/inc/headless/svpvd.hxx
@@ -25,8 +25,12 @@
#include <list>
#ifdef IOS
+#if HAVE_VCL_OPEN_GL_BACKEND
+#define SvpSalGraphics OpenGLSalGraphics
+#else
#define SvpSalGraphics AquaSalGraphics
#endif
+#endif
class SvpSalGraphics;
diff --git a/vcl/inc/opengl/openglinst.hxx b/vcl/inc/opengl/openglinst.hxx
new file mode 100644
index 0000000..0c9ac4d
--- /dev/null
+++ b/vcl/inc/opengl/openglinst.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_OPENGL_OPENGLINST_HXX
+#define INCLUDED_VCL_INC_OPENGL_OPENGLINST_HXX
+
+#include <tools/link.hxx>
+
+#include "headless/svpinst.hxx"
+#include "headless/svpframe.hxx"
+
+class OpenGLSalInstance : public SvpSalInstance
+{
+public:
+ OpenGLSalInstance( SalYieldMutex * /* pMutex */ ) {}
+ virtual ~OpenGLSalInstance() {}
+ static OpenGLSalInstance *getInstance()
+ {
+ return nullptr;
+ }
+
+ virtual SalSystem* CreateSalSystem() SAL_OVERRIDE
+ {
+ return nullptr;
+ }
+ virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* /* salGraphics */,
+ long /* nDX */,
+ long /* nDY */,
+ sal_uInt16 /* nBitCount */,
+ const SystemGraphicsData* /* systemGraphicsData */ ) SAL_OVERRIDE
+ {
+ return nullptr;
+ }
+};
+
+#endif // INCLUDED_VCL_INC_OPENGL_OPENGLINST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/salbmp.h b/vcl/inc/opengl/salbmp.h
new file mode 100644
index 0000000..1ed8aa1
--- /dev/null
+++ b/vcl/inc/opengl/salbmp.h
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_OPENGL_SALBMP_H
+#define INCLUDED_VCL_INC_OPENGL_SALBMP_H
+
+#include "tools/gen.hxx"
+
+#include "basebmp/bitmapdevice.hxx"
+
+#include "vcl/salbtype.hxx"
+
+#include "headless/svpgdi.hxx"
+
+#include "salinst.hxx"
+#include "salvd.hxx"
+#include "salbmp.hxx"
+
+// - SalBitmap -
+
+struct BitmapBuffer;
+class BitmapPalette;
+
+class OpenGLSalBitmap : public SalBitmap
+{
+public:
+ OpenGLSalBitmap() {}
+ virtual ~OpenGLSalBitmap() {}
+
+public:
+
+ // SalBitmap methods
+ bool Create( const Size& /* rSize*/, sal_uInt16 /* nBitCount */, const BitmapPalette& /* rPal */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ bool Create( const SalBitmap& /* rSalBmp */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ bool Create( const SalBitmap& /* rSalBmp */, SalGraphics* /* pGraphics */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ bool Create( const SalBitmap& /* rSalBmp */, sal_uInt16 /* nNewBitCount */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > /* xBitmapCanvas */,
+ Size& /* rSize */,
+ bool /* bMask */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+
+ void Destroy() SAL_OVERRIDE {}
+
+ Size GetSize() const SAL_OVERRIDE
+ {
+ return {};
+ }
+ sal_uInt16 GetBitCount() const SAL_OVERRIDE
+ {
+ return 0;
+ }
+
+ BitmapBuffer *AcquireBuffer( bool /* bReadOnly */ ) SAL_OVERRIDE
+ {
+ return nullptr;
+ }
+ void ReleaseBuffer( BitmapBuffer* /* pBuffer */, bool /* bReadOnly */ ) SAL_OVERRIDE {}
+
+ bool GetSystemData( BitmapSystemData& /* rData */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+
+};
+
+#endif // INCLUDED_VCL_INC_OPENGL_SALBMP_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/salgdi.h b/vcl/inc/opengl/salgdi.h
new file mode 100644
index 0000000..4631182
--- /dev/null
+++ b/vcl/inc/opengl/salgdi.h
@@ -0,0 +1,302 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_OPENGL_SALGDI_H
+#define INCLUDED_VCL_INC_OPENGL_SALGDI_H
+
+
+#include "salgdi.hxx"
+#include <vcl/sysdata.hxx>
+
+class OpenGLSalGraphics : public SalGraphics
+{
+protected:
+ virtual bool drawTransformedBitmap(
+ const basegfx::B2DPoint& /* rNull */,
+ const basegfx::B2DPoint& /* rX */,
+ const basegfx::B2DPoint& /* rY */,
+ const SalBitmap& /* rSourceBitmap */,
+ const SalBitmap* /* pAlphaBitmap */) SAL_OVERRIDE
+ {
+ return false;
+ }
+public:
+ OpenGLSalGraphics() {}
+ virtual ~OpenGLSalGraphics() {}
+
+ virtual bool setClipRegion( const vcl::Region& ) SAL_OVERRIDE
+ {
+ return false;
+ }
+
+ // draw --> LineColor and FillColor and RasterOp and ClipRegion
+ virtual void drawPixel( long /* nX */, long /* nY */ ) SAL_OVERRIDE {}
+ virtual void drawPixel( long /* nX */, long /* nY */, SalColor /* nSalColor */ ) SAL_OVERRIDE {}
+ virtual void drawLine( long /* nX1 */, long /* nY1 */, long /* nX2 */, long /* nY2 */ ) SAL_OVERRIDE {}
+ virtual void drawRect( long /* nX */, long /* nY */, long /* nWidth */, long /* nHeight */ ) SAL_OVERRIDE {}
+ virtual void drawPolyLine( sal_uInt32 /* nPoints */, const SalPoint* /* pPtAry */ ) SAL_OVERRIDE {}
+ virtual void drawPolygon( sal_uInt32 /* nPoints */, const SalPoint* /* pPtAry */ ) SAL_OVERRIDE {}
+ virtual void drawPolyPolygon( sal_uInt32 /* nPoly */, const sal_uInt32* /* pPoints */, PCONSTSALPOINT* /* pPtAry */ ) SAL_OVERRIDE {}
+ virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double /* fTransparency */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ virtual bool drawPolyLineBezier( sal_uInt32 /* nPoints */, const SalPoint* /* pPtAry */, const sal_uInt8* /* pFlgAry */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ virtual bool drawPolygonBezier( sal_uInt32 /* nPoints */, const SalPoint* /* pPtAry */, const sal_uInt8* /* pFlgAry */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ virtual bool drawPolyPolygonBezier( sal_uInt32 /* nPoly */, const sal_uInt32* /* pPoints */, const SalPoint* const* /* pPtAry */, const sal_uInt8* const* /* pFlgAry */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ virtual bool drawPolyLine(
+ const ::basegfx::B2DPolygon&,
+ double /* fTransparency */,
+ const ::basegfx::B2DVector& /* rLineWidths */,
+ basegfx::B2DLineJoin,
+ com::sun::star::drawing::LineCap /* eLineCap */) SAL_OVERRIDE
+ {
+ return false;
+ }
+
+ // CopyArea --> No RasterOp, but ClipRegion
+ virtual void copyArea( long /* nDestX */, long /* nDestY */, long /* nSrcX */, long /* nSrcY */, long /* nSrcWidth */,
+ long /* nSrcHeight */, sal_uInt16 /* nFlags */ ) SAL_OVERRIDE {}
+
+ // CopyBits and DrawBitmap --> RasterOp and ClipRegion
+ // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
+ virtual void copyBits( const SalTwoRect& /* rPosAry */, SalGraphics* /* pSrcGraphics */ ) SAL_OVERRIDE {}
+ virtual void drawBitmap( const SalTwoRect& /* rPosAry */, const SalBitmap& /* rSalBitmap */ ) SAL_OVERRIDE {}
+ virtual void drawBitmap( const SalTwoRect& /* rPosAry */,
+ const SalBitmap& /* rSalBitmap */,
+ SalColor /* nTransparentColor */ ) SAL_OVERRIDE {}
+ virtual void drawBitmap( const SalTwoRect& /* rPosAry */,
+ const SalBitmap& /* rSalBitmap */,
+ const SalBitmap& /* rTransparentBitmap */ ) SAL_OVERRIDE {}
+ virtual void drawMask( const SalTwoRect& /* rPosAry */,
+ const SalBitmap& /* rSalBitmap */,
+ SalColor /* nMaskColor */ ) SAL_OVERRIDE {}
+
+ virtual SalBitmap* getBitmap( long /* nX */, long /* nY */, long /* nWidth */, long /* nHeight */ ) SAL_OVERRIDE
+ {
+ return nullptr;
+ }
+ virtual SalColor getPixel( long /* nX */, long /* nY */ ) SAL_OVERRIDE
+ {
+ return {};
+ }
+
+ // invert --> ClipRegion (only Windows or VirDevs)
+ virtual void invert( long /* nX */, long /* nY */, long /* nWidth */, long /* nHeight */, SalInvert /* nFlags */) SAL_OVERRIDE {}
+ virtual void invert( sal_uInt32 /* nPoints */, const SalPoint* /* pPtAry */, SalInvert /* nFlags */ ) SAL_OVERRIDE {}
+
+ virtual bool drawEPS( long /* nX */, long /* nY */, long /* nWidth */, long /* nHeight */, void* /* pPtr */, sal_uLong /* nSize */ ) SAL_OVERRIDE;
+
+ virtual bool drawAlphaBitmap( const SalTwoRect&,
+ const SalBitmap& /* rSourceBitmap */,
+ const SalBitmap& /* rAlphaBitmap */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+
+ virtual bool drawAlphaRect( long /* nX */, long /* nY */, long /* nWidth */,
+ long /* nHeight */, sal_uInt8 /* nTransparency */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+
+ virtual bool hitTestNativeControl( ControlType /* nType */, ControlPart /* nPart */, const Rectangle& /* rControlRegion */,
+ const Point& /* aPos */, bool& /* rIsInside */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ virtual bool drawNativeControl( ControlType /* nType */, ControlPart /* nPart */, const Rectangle& /* rControlRegion */,
+ ControlState /* nState */, const ImplControlValue& /* aValue */,
+ const OUString& /* aCaption */ ) SAL_OVERRIDE
+
+ {
+ return false;
+ }
+ virtual bool getNativeControlRegion( ControlType /* nType */, ControlPart /* nPart */, const Rectangle& /* rControlRegion */, ControlState /* nState */,
+ const ImplControlValue& /* aValue */, const OUString& /* aCaption */,
+ Rectangle & /* rNativeBoundingRegion */, Rectangle & /* rNativeContentRegion */ ) SAL_OVERRIDE
+
+ {
+ return false;
+ }
+ // get device resolution
+ virtual void GetResolution( sal_Int32& /* rDPIX */, sal_Int32& /* rDPIY */ ) SAL_OVERRIDE;
+ // get the depth of the device
+ virtual sal_uInt16 GetBitCount() const SAL_OVERRIDE
+ {
+ return 0;
+ }
+ // get the width of the device
+ virtual long GetGraphicsWidth() const SAL_OVERRIDE
+ {
+ return 0L;
+ }
+
+ // set the clip region to empty
+ virtual void ResetClipRegion() SAL_OVERRIDE {}
+
+ // set the line color to transparent (= don't draw lines)
+ virtual void SetLineColor() SAL_OVERRIDE {}
+ // set the line color to a specific color
+ virtual void SetLineColor( SalColor /* nSalColor */ ) SAL_OVERRIDE {}
+ // set the fill color to transparent (= don't fill)
+ virtual void SetFillColor() SAL_OVERRIDE {}
+ // set the fill color to a specific color, shapes will be
+ // filled accordingly
+ virtual void SetFillColor( SalColor /* nSalColor */ ) SAL_OVERRIDE {}
+ // enable/disable XOR drawing
+ virtual void SetXORMode( bool /* bSet */, bool /* bInvertOnly */ ) SAL_OVERRIDE {}
+ // set line color for raster operations
+ virtual void SetROPLineColor( SalROPColor /* nROPColor */ ) SAL_OVERRIDE {}
+ // set fill color for raster operations
+ virtual void SetROPFillColor( SalROPColor /* nROPColor */ ) SAL_OVERRIDE {}
+ // set the text color to a specific color
+ virtual void SetTextColor( SalColor /* nSalColor */ ) SAL_OVERRIDE {}
+ // set the font
+ virtual sal_uInt16 SetFont( FontSelectPattern*, int /* nFallbackLevel */ ) SAL_OVERRIDE
+ {
+ return 0;
+ }
+ // get the current font's metrics
+ virtual void GetFontMetric( ImplFontMetricData*, int /* nFallbackLevel */ ) SAL_OVERRIDE {}
+ // get the repertoire of the current font
+ virtual const ImplFontCharMap*
+ GetImplFontCharMap() const SAL_OVERRIDE
+ {
+ return nullptr;
+ }
+ virtual bool GetFontCapabilities(vcl::FontCapabilities & /* rFontCapabilities */) const SAL_OVERRIDE
+ {
+ return false;
+ }
+ // graphics must fill supplied font list
+ virtual void GetDevFontList( PhysicalFontCollection* ) SAL_OVERRIDE {}
+ // graphics must drop any cached font info
+ virtual void ClearDevFontCache() SAL_OVERRIDE {}
+ virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& /* rFileURL */, const OUString& /* rFontName */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ // CreateFontSubset: a method to get a subset of glyhps of a font
+ // inside a new valid font file
+ // returns TRUE if creation of subset was successful
+ // parameters: rToFile: contains a osl file URL to write the subset to
+ // pFont: describes from which font to create a subset
+ // pGlyphIDs: the glyph ids to be extracted
+ // pEncoding: the character code corresponding to each glyph
+ // pWidths: the advance widths of the correspoding glyphs (in PS font units)
+ // nGlyphs: the number of glyphs
+ // rInfo: additional outgoing information
+ // implementation note: encoding 0 with glyph id 0 should be added implicitly
+ // as "undefined character"
+ virtual bool CreateFontSubset( const OUString& /* rToFile */,
+ const PhysicalFontFace* /* pFont */,
+ sal_GlyphId* /* pGlyphIds */,
+ sal_uInt8* /* pEncoding */,
+ sal_Int32* /* pWidths */,
+ int /* nGlyphs */,
+ FontSubsetInfo& /* rInfo */ // out parameter
+ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+
+ // GetFontEncodingVector: a method to get the encoding map Unicode
+ // to font encoded character; this is only used for type1 fonts and
+ // may return NULL in case of unknown encoding vector
+ // if ppNonEncoded is set and non encoded characters (that is type1
+ // glyphs with only a name) exist it is set to the corresponding
+ // map for non encoded glyphs; the encoding vector contains -1
+ // as encoding for these cases
+ virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** /* ppNonEncoded */ ) SAL_OVERRIDE
+ {
+ return nullptr;
+ }
+
+ // GetEmbedFontData: gets the font data for a font marked
+ // embeddable by GetDevFontList or NULL in case of error
+ // parameters: pFont: describes the font in question
+ // pWidths: the widths of all glyphs from char code 0 to 255
+ // pWidths MUST support at least 256 members;
+ // rInfo: additional outgoing information
+ // pDataLen: out parameter, contains the byte length of the returned buffer
+ virtual const void* GetEmbedFontData( const PhysicalFontFace*,
+ const sal_Ucs* /* pUnicodes */,
+ sal_Int32* /* pWidths */,
+ FontSubsetInfo& /* rInfo */,
+ long* /* pDataLen */ ) SAL_OVERRIDE
+ {
+ return nullptr;
+ }
+ // frees the font data again
+ virtual void FreeEmbedFontData( const void* /* pData */, long /* nDataLen */ ) SAL_OVERRIDE {}
+
+ virtual void GetGlyphWidths( const PhysicalFontFace*,
+ bool /* bVertical */,
+ Int32Vector& /* rWidths */,
+ Ucs2UIntMap& /* rUnicodeEnc */ ) SAL_OVERRIDE {}
+
+ virtual bool GetGlyphBoundRect( sal_GlyphId, Rectangle& ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ virtual bool GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) SAL_OVERRIDE
+ {
+ return false;
+ }
+
+ virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int /*nFallbackLevel */ ) SAL_OVERRIDE
+ {
+ return nullptr;
+ }
+ virtual void DrawServerFontLayout( const ServerFontLayout& ) SAL_OVERRIDE {}
+ virtual bool supportsOperation( OutDevSupportType ) const SAL_OVERRIDE
+ {
+ return false;
+ }
+
+ // Query the platform layer for control support
+ virtual bool IsNativeControlSupported( ControlType /* nType */, ControlPart /* Part */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+
+ virtual SystemGraphicsData
+ GetGraphicsData() const SAL_OVERRIDE
+ {
+ return {};
+ }
+ virtual SystemFontData GetSysFontData( int /* nFallbacklevel */ ) const SAL_OVERRIDE
+ {
+ return {};
+ }
+};
+
+#endif // INCLUDED_VCL_INC_OPENGL_SALGDI_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/salvd.h b/vcl/inc/opengl/salvd.h
new file mode 100644
index 0000000..29b3c3fc
--- /dev/null
+++ b/vcl/inc/opengl/salvd.h
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_OPENGL_SALVD_H
+#define INCLUDED_VCL_INC_OPENGL_SALVD_H
+
+#include "opengl/salgdi.h"
+
+#include "salvd.hxx"
+
+struct SalVirDevData
+{
+};
+
+typedef struct SalVirDevData SalVirDevData;
+typedef SalVirDevData *SalVirDevDataPtr;
+typedef SalVirDevDataPtr *SalVirDevDataHandle;
+
+class OpenGLSalGraphics;
+
+class OpenGLSalVirtualDevice : public SalVirtualDevice
+{
+public:
+ OpenGLSalVirtualDevice( OpenGLSalGraphics* /* pGraphic */, long /* nDX */, long /* nDY */, sal_uInt16 /* nBitCount */, const SystemGraphicsData * /* pData */ ){}
+ virtual ~OpenGLSalVirtualDevice() {}
+
+ virtual SalGraphics* AcquireGraphics() SAL_OVERRIDE
+ {
+ return nullptr;
+ }
+ virtual void ReleaseGraphics( SalGraphics* /* pGraphics */ ) SAL_OVERRIDE {}
+ virtual bool SetSize( long /* nNewDX */, long /* nNewDY */ ) SAL_OVERRIDE
+ {
+ return false;
+ }
+ virtual void GetSize( long& /* rWidth */ , long& /* rHeight */ ) SAL_OVERRIDE {}
+};
+
+#endif // INCLUDED_VCL_INC_OPENGL_SALVD_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/saldatabasic.hxx b/vcl/inc/saldatabasic.hxx
index 6803d60..e659375 100644
--- a/vcl/inc/saldatabasic.hxx
+++ b/vcl/inc/saldatabasic.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_VCL_INC_SALDATABASIC_HXX
#define INCLUDED_VCL_INC_SALDATABASIC_HXX
+#include <config_features.h>
+
#include <svdata.hxx>
#include <salinst.hxx>
#include <osl/module.h>
@@ -27,8 +29,12 @@
#include "vcl/dllapi.h"
#ifdef IOS
+#if HAVE_VCL_OPEN_GL_BACKEND
+#include "opengl/salgdi.h"
+#else
#include "quartz/salgdi.h"
#endif
+#endif
namespace psp
{
@@ -47,9 +53,12 @@ public:
SalData();
virtual ~SalData();
#ifdef IOS
+#if HAVE_VCL_OPEN_GL_BACKEND
+#else
SystemFontList* mpFontList;
CGColorSpaceRef mxRGBSpace;
CGColorSpaceRef mxGraySpace;
+#endif
static void ensureThreadAutoreleasePool() {};
#endif
};
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index f1d87b8..508539c 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <premac.h>
#include <UIKit/UIKit.h>
#include <postmac.h>
@@ -197,10 +199,14 @@ const OUString& SalGetDesktopEnvironment()
}
SalData::SalData() :
- m_pInstance( 0 ),
+ m_pInstance( 0 )
+#if HAVE_VCL_OPEN_GL_BACKEND
+#else
+ ,
mpFontList( 0 ),
mxRGBSpace( CGColorSpaceCreateDeviceRGB() ),
mxGraySpace( CGColorSpaceCreateDeviceGray() )
+#endif
{
}
@@ -232,8 +238,13 @@ int IosSalSystem::ShowNativeDialog( const OUString& rTitle,
(void)rButtons;
(void)nDefButton;
+#if HAVE_VCL_OPEN_GL_BACKEND
+ // CreateNSString doesn't link, dunno why
+ (void)rTitle;
+ (void)rMessage;
+#else
NSLog(@"%@: %@", CreateNSString(rTitle), CreateNSString(rMessage));
-
+#endif
return 0;
}
commit 685aa13ccd1961db2749c131453cceada0ff64de
Author: Ptyl Dragon <ptyl at cloudon.com>
Date: Tue Sep 30 12:41:02 2014 +0300
Added flag --enable-vgl mapped to HAVE_VCL_OPEN_GL_BACKEND
Change-Id: I8077d90ecb950740ce76a37444658d8bdc799453
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index 04dc7ba..9c97eb5 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -136,4 +136,9 @@
*/
#define HAVE_FEATURE_COLLADA 0
+/*
+ * Whether VCL renders using Open GL.
+ */
+#define HAVE_VCL_OPEN_GL_BACKEND 0
+
#endif
diff --git a/configure.ac b/configure.ac
index 6e17ac2..f01ed6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1222,6 +1222,11 @@ AC_ARG_ENABLE(vlc,
[Enable building with the VLC avmedia backend.]),
,enable_vlc=no)
+AC_ARG_ENABLE(vgl,
+ AS_HELP_STRING([--enable-vgl],
+ [Enable building with the VCL Open GL backend.]),
+,enable_vgl=no)
+
AC_ARG_ENABLE(neon,
AS_HELP_STRING([--disable-neon],
[Disable neon and the compilation of webdav binding.]),
@@ -2442,6 +2447,10 @@ if test $_os != iOS -a $_os != Android; then
AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
fi
+if test "$enable_vgl" == yes; then
+ AC_DEFINE(HAVE_VCL_OPEN_GL_BACKEND)
+fi
+
DISABLE_EXPORT=''
if test "$enable_export" != no; then
BUILD_TYPE="$BUILD_TYPE EXPORT"
diff --git a/ios/experimental/TiledLibreOffice/.gitignore b/ios/experimental/TiledLibreOffice/.gitignore
new file mode 100644
index 0000000..a8966da9
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/.gitignore
@@ -0,0 +1,9 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+/Resources
More information about the Libreoffice-commits
mailing list