android/experimental/LOAndroid3/.gitignore |    1 
 helpcontent2                               |    2 -
 sw/source/core/draw/dflyobj.cxx            |    4 ++
 vcl/headless/svpinst.cxx                   |   18 ++++++---
 vcl/inc/generic/gendata.hxx                |    2 -
 vcl/inc/opengl/openglinst.hxx              |   54 -----------------------------
 vcl/inc/opengl/saldata.hxx                 |   21 +++++++++++
 vcl/inc/opengl/salgdi.h                    |   46 ++++++++++++++++++++++++
 vcl/inc/opengl/salvd.h                     |    2 -
 vcl/ios/iosinst.cxx                        |   14 ++++++-
 vcl/source/outdev/font.cxx                 |    2 +
 11 files changed, 100 insertions(+), 66 deletions(-)

New commits:
commit be6f16401d7fc9121c0129a018f6aaed2e3a98e6
Author: Ptyl Dragon <p...@cloudon.com>
Date:   Tue Oct 21 16:24:42 2014 +0300

    tiled rendering app now renders blank tiles
    
    Change-Id: I1b6ff522edcb2c57860434a1f64a445e55f7dbb1

diff --git a/android/experimental/LOAndroid3/.gitignore 
b/android/experimental/LOAndroid3/.gitignore
new file mode 100644
index 0000000..4d82deb
--- /dev/null
+++ b/android/experimental/LOAndroid3/.gitignore
@@ -0,0 +1 @@
+/AndroidManifest.xml
diff --git a/helpcontent2 b/helpcontent2
index b1065d4..2dd0975 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b1065d43c77fc050760c7427d371b5460b54d249
+Subproject commit 2dd0975408b8fbae59c9f924d8e013f48d23da52
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index caad92d..cc02a0c 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include "hintids.hxx"
 #include <svx/svdtrans.hxx>
 #include <editeng/protitem.hxx>
@@ -469,7 +471,9 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject(
             // if there's no viewport set, all fly-frames will be painted,
             // which is slow, wastes memory, and can cause other trouble.
             (void) rViewInformation; // suppress "unused parameter" warning
+#if !HAVE_VCL_OPEN_GL_BACKEND
             assert(!rViewInformation.getViewport().isEmpty());
+#endif
             if ( !pFlyFrm->IsFlyInCntFrm() )
             {
                 // it is also necessary to restore the VCL MapMode from 
ViewInformation since e.g.
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 2fa3448..9cab138 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -240,12 +240,18 @@ SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( 
SalGraphics* /* pGraphics
 
 #else
 #if HAVE_VCL_OPEN_GL_BACKEND
-SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* /* 
pGraphics */,
-                                                      long /* nDX */, long 
/*nDY*/,
-                                                      sal_uInt16 /* nBitCount 
*/,
-                                                      const 
SystemGraphicsData* /* pData */ )
-{
-    return nullptr;
+SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* pGraphics,
+                                                      long nDX, long nDY,
+                                                      sal_uInt16 nBitCount,
+                                                      const 
SystemGraphicsData* pData )
+{
+    OpenGLSalVirtualDevice * pNew = new OpenGLSalVirtualDevice(pGraphics,
+                                                               nDX,
+                                                               nDY,
+                                                               nBitCount,
+                                                               pData);
+    pNew->SetSize( nDX, nDY );
+    return pNew;
 }
 #endif
 #endif
diff --git a/vcl/inc/generic/gendata.hxx b/vcl/inc/generic/gendata.hxx
index 334193d..8f6a29a 100644
--- a/vcl/inc/generic/gendata.hxx
+++ b/vcl/inc/generic/gendata.hxx
@@ -22,7 +22,7 @@ enum SalGenericDataType { SAL_DATA_GTK, SAL_DATA_GTK3,
                           SAL_DATA_TDE3, SAL_DATA_KDE3, SAL_DATA_KDE4,
                           SAL_DATA_UNX, SAL_DATA_SVP,
                           SAL_DATA_ANDROID, SAL_DATA_IOS,
-                          SAL_DATA_HEADLESS };
+                          SAL_DATA_HEADLESS, SAL_DATA_OPEN_GL };
 
 class VCL_DLLPUBLIC SalGenericData : public SalData
 {
diff --git a/vcl/inc/opengl/openglinst.hxx b/vcl/inc/opengl/openglinst.hxx
deleted file mode 100644
index 0c9ac4d..0000000
--- a/vcl/inc/opengl/openglinst.hxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- 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/saldata.hxx b/vcl/inc/opengl/saldata.hxx
new file mode 100644
index 0000000..fd6400c
--- /dev/null
+++ b/vcl/inc/opengl/saldata.hxx
@@ -0,0 +1,21 @@
+//
+//  saldata.hxx
+//
+//
+//  Created by ptyl on 10/20/14.
+//
+//
+
+#ifndef INCLUDED_VCL_INC_OPENGL_SALDATA_H
+#define INCLUDED_VCL_INC_OPENGL_SALDATA_H
+
+#include <generic/gendata.hxx>
+
+class OpenGLSalData : public SalGenericData
+{
+public:
+    OpenGLSalData( SalInstance *pInstance ) : SalGenericData( 
SAL_DATA_OPEN_GL, pInstance ) {}
+    virtual void ErrorTrapPush() {}
+    virtual bool ErrorTrapPop( bool ) { return false; }
+};
+#endif /* INCLUDED_VCL_INC_OPENGL_SALDATA_H */
diff --git a/vcl/inc/opengl/salgdi.h b/vcl/inc/opengl/salgdi.h
index 0f71248..50aa2241 100644
--- a/vcl/inc/opengl/salgdi.h
+++ b/vcl/inc/opengl/salgdi.h
@@ -20,10 +20,50 @@
 #ifndef INCLUDED_VCL_INC_OPENGL_SALGDI_H
 #define INCLUDED_VCL_INC_OPENGL_SALGDI_H
 
+#include "PhysicalFontCollection.hxx"
 
 #include "salgdi.hxx"
 #include <vcl/sysdata.hxx>
 
+static ImplDevFontAttributes & lcl_getImplDevFontAttributes()
+{
+    static ImplDevFontAttributes rDFA;
+    rDFA.mbOrientation = true;
+    rDFA.mbDevice      = true;
+    rDFA.mnQuality     = 0;
+    rDFA.SetFamilyType( FAMILY_DONTKNOW );
+    rDFA.SetPitch( PITCH_VARIABLE );
+    rDFA.SetWidthType( WIDTH_NORMAL );
+    rDFA.SetWeight( WEIGHT_NORMAL );
+    rDFA.SetItalic( ITALIC_NORMAL );
+    rDFA.SetSymbolFlag( false );
+    rDFA.mbEmbeddable = false;
+    rDFA.mbSubsettable = true;
+    rDFA.SetFamilyName("openGLFamily");
+    rDFA.SetStyleName("openGLStyle");
+    return rDFA;
+}
+
+class OpenGLFont : public PhysicalFontFace
+{
+public:
+    OpenGLFont() : PhysicalFontFace(lcl_getImplDevFontAttributes(),
+                                    1) {}
+    virtual ~OpenGLFont() {}
+    PhysicalFontFace*               Clone() const SAL_OVERRIDE
+    {
+        return new OpenGLFont;
+    }
+    ImplFontEntry*                  CreateFontInstance( FontSelectPattern& ) 
const SAL_OVERRIDE
+    {
+        return nullptr;
+    }
+    sal_IntPtr                      GetFontId() const SAL_OVERRIDE
+    {
+        return 1;
+    }
+};
+
 class OpenGLSalGraphics : public SalGraphics
 {
 protected:
@@ -195,7 +235,11 @@ public:
         return false;
     }
     // graphics must fill supplied font list
-    virtual void            GetDevFontList( PhysicalFontCollection* ) 
SAL_OVERRIDE {}
+    virtual void            GetDevFontList( PhysicalFontCollection* 
pFontCollection) SAL_OVERRIDE
+    {
+        pFontCollection->Add(new OpenGLFont);
+
+    }
     // graphics must drop any cached font info
     virtual void            ClearDevFontCache() SAL_OVERRIDE {}
     virtual bool            AddTempDevFont( PhysicalFontCollection*, const 
OUString& /* rFileURL */, const OUString& /* rFontName */ ) SAL_OVERRIDE
diff --git a/vcl/inc/opengl/salvd.h b/vcl/inc/opengl/salvd.h
index 29b3c3f..438ed32 100644
--- a/vcl/inc/opengl/salvd.h
+++ b/vcl/inc/opengl/salvd.h
@@ -37,7 +37,7 @@ class OpenGLSalGraphics;
 class OpenGLSalVirtualDevice : public SalVirtualDevice
 {
 public:
-    OpenGLSalVirtualDevice( OpenGLSalGraphics* /* pGraphic */, long /* nDX */, 
long /* nDY */, sal_uInt16 /* nBitCount */, const SystemGraphicsData * /* pData 
*/ ){}
+    OpenGLSalVirtualDevice( SalGraphics* /* pGraphic */, long /* nDX */, long 
/* nDY */, sal_uInt16 /* nBitCount */, const SystemGraphicsData * /* pData */ 
){}
     virtual ~OpenGLSalVirtualDevice() {}
 
     virtual SalGraphics*            AcquireGraphics() SAL_OVERRIDE
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index 508539c..6e8762e 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -35,6 +35,16 @@
 #include <vcl/layout.hxx>
 #include <vcl/settings.hxx>
 
+#if HAVE_VCL_OPEN_GL_BACKEND
+#include "headless/svpinst.hxx"
+#include "opengl/saldata.hxx"
+#define SAL_INST OpenGLSalInstance
+#define SAL_DATA OpenGLSalData
+#else
+#define SAL_INST IosSalInstance
+#define SAL_DATA IosSalData
+#endif
+
 // Horrible hack
 static int viewWidth = 1, viewHeight = 1;
 
@@ -217,8 +227,8 @@ SalData::~SalData()
 // This is our main entry point:
 SalInstance *CreateSalInstance()
 {
-    IosSalInstance* pInstance = new IosSalInstance( new SalYieldMutex() );
-    new IosSalData( pInstance );
+    SAL_INST* pInstance = new SAL_INST( new SalYieldMutex() );
+    new SAL_DATA( pInstance );
     pInstance->AcquireYieldMutex(1);
     ImplGetSVData()->maWinData.mbNoSaveBackground = true;
     return pInstance;
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 0a7733d..f77ff1e 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include "i18nlangtag/mslangid.hxx"
 
 #include <vcl/virdev.hxx>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to