summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-03-31 20:39:01 +0300
committerTor Lillqvist <tml@iki.fi>2013-03-31 21:55:10 +0300
commit41a70cc2d32dde3e2c76a6f1d4f3dd1b32bb1c02 (patch)
tree4dc2a1023e0f33a1fb9a288a91cf3245425e0e25 /ios
parent14d909632e208fa1b3a27212633cf3607ccf1136 (diff)
Try redrawing in multiple phases to avoid blocking the UI thread too long
When initially calling lo_render_windows() from a redrawRect(), just post the user event asking for a redraw of the (headless) windows, and return without actually drawing anything to the context. Then when the RenderWindows() callback for that user event eventually gets called (which during startup and/or loading of a document might be several seconds later, as there is lots of other activity going on also as "user events"), ask the UI thread for a fresh redraw, and wait for lo_render_windows() in that phase to signal the actual redraw of the "headless" windows into the context. Unfortunately this doesn't work well enough. It is not a good idea to not draw anything in response to a drawRect() it seems. The affected rectangle gets initialised to black. So there is now irritating flashing. One sees an almost ready document (and the UI elements which still are there), but then it goes away for some time before finally re-appearding. Quite silly. So I will revert this, and I am committing it just to keep the code for reference in git. Change-Id: I9ee490345f093d80113c36f9e3268cab5a810dd0
Diffstat (limited to 'ios')
-rw-r--r--ios/experimental/LibreOffice/LibreOffice/AppDelegate.m1
1 files changed, 1 insertions, 0 deletions
diff --git a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
index 2f74d483fb63..8daaccdbc9b1 100644
--- a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
+++ b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
@@ -37,6 +37,7 @@ static UIView *theView;
r.origin = CGPointMake(0, 0);
self.view = [[View alloc] initWithFrame: r];
+ self.view.clearsContextBeforeDrawing = NO;
vc.view = self.view;
theView = self.view;