[Libreoffice-commits] core.git: 6 commits - ios/CustomTarget_Viewer_app.mk ios/experimental vcl/aqua vcl/generic vcl/inc vcl/ios vcl/Library_vcl.mk
Tor Lillqvist
tml at iki.fi
Sun Mar 17 22:44:00 PDT 2013
ios/CustomTarget_Viewer_app.mk | 3 -
ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm | 6 +-
vcl/Library_vcl.mk | 16 +++---
vcl/aqua/source/app/saldata.cxx | 25 ---------
vcl/generic/app/gensys.cxx | 8 +--
vcl/inc/aqua/saldata.hxx | 1
vcl/inc/generic/gensys.h | 4 +
vcl/inc/ios/saldata.hxx | 1
vcl/ios/source/app/saldata.cxx | 46 ------------------
9 files changed, 21 insertions(+), 89 deletions(-)
New commits:
commit 6dfe7e790352e3e3ff63cfd8b142a8fc007b496c
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Mar 17 16:37:02 2013 +0200
Don't do any own auto-cleanup of aurorelease pools on iOS when a thread ends
According to documentation, the system does it automatically. Testing
seemed to confirm that, with the code still in I got mysterious
crashes.
Not sure if the corresponding code is unnecessary or wrong on OS X,
too.
Change-Id: I14e9f5bcc0376e9235f8d36b484b38c1e44932c4
diff --git a/vcl/ios/source/app/saldata.cxx b/vcl/ios/source/app/saldata.cxx
index cc02eca..f06b139 100644
--- a/vcl/ios/source/app/saldata.cxx
+++ b/vcl/ios/source/app/saldata.cxx
@@ -24,12 +24,6 @@
oslThreadKey SalData::s_aAutoReleaseKey = 0;
-static void SAL_CALL releasePool( void* pPool )
-{
- if( pPool )
- [(NSAutoreleasePool*)pPool release];
-}
-
SalData::SalData()
:
mpTimerProc( NULL ),
@@ -46,7 +40,7 @@ SalData::SalData()
mnDPIY( 0 )
{
if( s_aAutoReleaseKey == 0 )
- s_aAutoReleaseKey = osl_createThreadKey( releasePool );
+ s_aAutoReleaseKey = osl_createThreadKey( NULL );
}
SalData::~SalData()
@@ -55,20 +49,6 @@ SalData::~SalData()
CGColorSpaceRelease( mxP50Space );
CGColorSpaceRelease( mxRGBSpace );
CGColorSpaceRelease( mxGraySpace );
- if( s_aAutoReleaseKey )
- {
- // release the last pool
- NSAutoreleasePool* pPool = nil;
- pPool = reinterpret_cast<NSAutoreleasePool*>( osl_getThreadKeyData( s_aAutoReleaseKey ) );
- if( pPool )
- {
- osl_setThreadKeyData( s_aAutoReleaseKey, NULL );
- [pPool release];
- }
-
- osl_destroyThreadKey( s_aAutoReleaseKey );
- s_aAutoReleaseKey = 0;
- }
}
void SalData::ensureThreadAutoreleasePool()
commit 39c603ca8964295067775a4e0ec768ca7fd6feea
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Mar 17 16:35:43 2013 +0200
Only copy the project.pbxproj
Change-Id: I8848ccaf893072d9c8653d9142004fef708be7f3
diff --git a/ios/CustomTarget_Viewer_app.mk b/ios/CustomTarget_Viewer_app.mk
index a4ef0eb..03daa6a 100644
--- a/ios/CustomTarget_Viewer_app.mk
+++ b/ios/CustomTarget_Viewer_app.mk
@@ -139,8 +139,7 @@ else
# can then open it from there in Xcode.
$(call gb_CustomTarget_get_target,ios/Viewer_app) : $(gb_Helper_PHONY)
if test $(SRCDIR) != $(BUILDDIR); then \
- rm -rf $(BUILDDIR)/ios/experimental/Viewer; \
- (cd $(SRCDIR) && tar cf - ios/experimental/Viewer) | (cd $(BUILDDIR) && tar xf -); \
+ (cd $(SRCDIR) && tar cf - ios/experimental/Viewer/Viewer.xcodeproj/project.pbxproj) | (cd $(BUILDDIR) && tar xf -); \
fi
$(call gb_CustomTarget_get_clean_target,ios/Viewer_app) :
commit f74bbb4c357058a727ebc9ea1313c65c3480a389
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Mar 17 01:01:05 2013 +0200
Use autorelease block
Change-Id: I7c3c8fcc81297ca97474b2b9482d40b47688febd
diff --git a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm
index bb95e5e..cc1e8d2 100644
--- a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm
+++ b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm
@@ -40,11 +40,11 @@
{
(void) argument;
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ @autoreleasepool {
- lo_initialize();
+ lo_initialize();
- [pool release];
+ }
}
- (void)applicationWillResignActive:(UIApplication *)application
commit dc234a1da0e5e57472333b91899cc2628eac702d
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Mar 17 00:35:10 2013 +0200
Factor out the CoreText source files
Change-Id: I5c91058af2f6da287bff050a358f446b653c800a
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 49c1c78..a63a523 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -347,6 +347,12 @@ $(eval $(call gb_Library_use_packages,vcl,\
basebmp_inc \
))
+vcl_coretext_code=\
+ vcl/coretext/salcoretextfontutils \
+ vcl/coretext/salcoretextlayout \
+ vcl/coretext/salcoretextstyle \
+ vcl/coretext/salgdi
+
# GUIBASE specific stuff
ifeq ($(OS),MACOSX)
@@ -362,10 +368,7 @@ $(eval $(call gb_Library_add_defs,vcl,\
))
$(eval $(call gb_Library_add_exception_objects,vcl,\
- vcl/coretext/salcoretextfontutils \
- vcl/coretext/salcoretextlayout \
- vcl/coretext/salcoretextstyle \
- vcl/coretext/salgdi \
+ $(vcl_coretext_code) \
))
ifeq ($(MACOSX_SDK_VERSION),1070)
@@ -603,11 +606,8 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/ios/source/dtrans/iOSTransferable \
vcl/ios/source/dtrans/ios_clipboard \
vcl/ios/source/dtrans/service_entry \
- vcl/coretext/salcoretextfontutils \
- vcl/coretext//salcoretextlayout \
- vcl/coretext//salcoretextstyle \
+ $(vcl_coretext_code) \
vcl/quartz/salbmp \
- vcl/coretext/salgdi \
vcl/ios/source/gdi/salgdicommon \
vcl/ios/source/gdi/salnativewidgets \
vcl/ios/source/gdi/salgdiutils \
commit 2a4af0e257baa3e559003c29cade5b594adef5e2
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Mar 17 00:20:35 2013 +0200
Bypass X11-specific code if not on X11
Change-Id: I6452191b11b197b0f90ae6638019d3bc6db67ad7
diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx
index 6144f37..b24cfa2 100644
--- a/vcl/generic/app/gensys.cxx
+++ b/vcl/generic/app/gensys.cxx
@@ -146,9 +146,9 @@ int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUStri
return nResult != -1 ? nButtonIds[ nResult ] : 0;
}
-// ------------------------------------------------------------------------
-// Helpers primarily for X Windowing derivatives
-// ------------------------------------------------------------------------
+#if !defined(ANDROID) && !defined(IOS)
+
+// X11-specific
const char* SalGenericSystem::getFrameResName()
{
@@ -213,4 +213,6 @@ OString SalGenericSystem::getFrameResName( SalExtStyle nStyle )
return aBuf.makeStringAndClear();
}
+#endif
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/generic/gensys.h b/vcl/inc/generic/gensys.h
index b055f11..d51f222 100644
--- a/vcl/inc/generic/gensys.h
+++ b/vcl/inc/generic/gensys.h
@@ -43,10 +43,12 @@ class VCL_DLLPUBLIC SalGenericSystem : public SalSystem
int nButtonCombination,
int nDefaultButton, bool bUseResources);
- // simple helpers primarily for X Windowing W_CLASS hints
+#if !defined(ANDROID) && !defined(IOS)
+ // Simple helpers for X11 WM_CLASS hints
static const char *getFrameResName();
static const char *getFrameClassName();
static rtl::OString getFrameResName( SalExtStyle nStyle );
+#endif
};
#endif // _SV_GENSYS_H
commit e0c2dd693c012bba30feb4c1dd0c5b424b135e3e
Author: Tor Lillqvist <tml at iki.fi>
Date: Sat Mar 16 23:38:05 2013 +0200
SalData::drainThreadAutoreleasePool() is unused
Change-Id: Idbb98b32ffc5970e236c9d319e0e8791b855e283
diff --git a/vcl/aqua/source/app/saldata.cxx b/vcl/aqua/source/app/saldata.cxx
index 150314f..dcbd350 100644
--- a/vcl/aqua/source/app/saldata.cxx
+++ b/vcl/aqua/source/app/saldata.cxx
@@ -105,31 +105,6 @@ void SalData::ensureThreadAutoreleasePool()
}
}
-void SalData::drainThreadAutoreleasePool()
-{
- NSAutoreleasePool* pPool = nil;
- if( s_aAutoReleaseKey )
- {
- pPool = reinterpret_cast<NSAutoreleasePool*>( osl_getThreadKeyData( s_aAutoReleaseKey ) );
- if( pPool )
- {
- // osl_setThreadKeyData( s_aAutoReleaseKey, NULL );
- // [pPool release];
- [pPool drain];
- }
- else
- {
- pPool = [[NSAutoreleasePool alloc] init];
- osl_setThreadKeyData( s_aAutoReleaseKey, pPool );
- }
- }
- else
- {
- OSL_FAIL( "no autorelease key" );
- }
-}
-
-
struct curs_ent
{
const char* pBaseName;
diff --git a/vcl/inc/aqua/saldata.hxx b/vcl/inc/aqua/saldata.hxx
index b7f3ad7..d26e616 100644
--- a/vcl/inc/aqua/saldata.hxx
+++ b/vcl/inc/aqua/saldata.hxx
@@ -105,7 +105,6 @@ public:
NSCursor* getCursor( PointerStyle i_eStyle );
static void ensureThreadAutoreleasePool();
- static void drainThreadAutoreleasePool();
static NSStatusItem* getStatusItem();
};
diff --git a/vcl/inc/ios/saldata.hxx b/vcl/inc/ios/saldata.hxx
index d461899..8163a6d 100644
--- a/vcl/inc/ios/saldata.hxx
+++ b/vcl/inc/ios/saldata.hxx
@@ -86,7 +86,6 @@ public:
~SalData();
static void ensureThreadAutoreleasePool();
- static void drainThreadAutoreleasePool();
};
inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = pData; }
diff --git a/vcl/ios/source/app/saldata.cxx b/vcl/ios/source/app/saldata.cxx
index b83bc78..cc02eca 100644
--- a/vcl/ios/source/app/saldata.cxx
+++ b/vcl/ios/source/app/saldata.cxx
@@ -89,28 +89,4 @@ void SalData::ensureThreadAutoreleasePool()
}
}
-void SalData::drainThreadAutoreleasePool()
-{
- NSAutoreleasePool* pPool = nil;
- if( s_aAutoReleaseKey )
- {
- pPool = reinterpret_cast<NSAutoreleasePool*>( osl_getThreadKeyData( s_aAutoReleaseKey ) );
- if( pPool )
- {
- // osl_setThreadKeyData( s_aAutoReleaseKey, NULL );
- // [pPool release];
- [pPool drain];
- }
- else
- {
- pPool = [[NSAutoreleasePool alloc] init];
- osl_setThreadKeyData( s_aAutoReleaseKey, pPool );
- }
- }
- else
- {
- OSL_FAIL( "no autorelease key" );
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list