summaryrefslogtreecommitdiff
path: root/vcl/inc/ios
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-03-30 01:39:22 +0200
committerTor Lillqvist <tml@iki.fi>2013-03-30 08:41:33 +0200
commitd08a58a6845a3423d7d2919e157d1b205d68db51 (patch)
tree2de6aaf29982ff471b32119c8378d4a17faef64d /vcl/inc/ios
parent62f6e67f6b0986208cf1030e265b51f1bf154bc7 (diff)
Render the "headless" frames to the UI view in the LO thread
We used to render them in the app main (GUI) thread, which is dangerous, accessing the headless frames in one thread while the LO thread (where the "main" LibreOffice code is running) might be updating and changing them. This fixes some problems like that part of the document did not show up. If I would test the app on a multi-core iPad, presumably I would have seen even more problems. But this also introduces new problems: Now the UI doesn't appear incrementally (for instance, with an actually progressing progress bar during the loading of the document) as it used to. Now it all appeads all of a sudden, everything at once. Which would be fine if it happened very quickly after starting the app, but it doesn't... on the original iPad it takes half a minute. Change-Id: I04068e0d884aa5cb86acefa76449aac4e081b193
Diffstat (limited to 'vcl/inc/ios')
-rw-r--r--vcl/inc/ios/iosinst.hxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/vcl/inc/ios/iosinst.hxx b/vcl/inc/ios/iosinst.hxx
index d5d6b8c378ba..654bd58d180f 100644
--- a/vcl/inc/ios/iosinst.hxx
+++ b/vcl/inc/ios/iosinst.hxx
@@ -20,6 +20,14 @@
#ifndef IOS_SALINST_H
#define IOS_SALINST_H
+#include <pthread.h>
+
+#include <premac.h>
+#include <CoreGraphics/CoreGraphics.h>
+#include <postmac.h>
+
+#include <tools/link.hxx>
+
#include "headless/svpinst.hxx"
#include "headless/svpframe.hxx"
@@ -37,12 +45,21 @@ public:
SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
- virtual bool AnyInput( sal_uInt16 nType );
+ // virtual bool AnyInput( sal_uInt16 nType );
SalFrame *getFocusFrame() const;
void damaged( IosSalFrame *frame,
const basegfx::B2IBox& rDamageRect);
+
+ typedef struct {
+ CGContextRef context;
+ CGRect rect;
+ } RenderWindowsArg;
+ DECL_LINK( RenderWindows, RenderWindowsArg* );
+
+ pthread_mutex_t m_aRenderMutex;
+ pthread_cond_t m_aRenderCond;
};
#endif // IOS_SALINST_H