diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-12-18 00:03:02 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-12-18 22:59:23 +0200 |
commit | 48f625b899b2c7774548af078f25dfccd7602d27 (patch) | |
tree | cd45eb893d6b8e9270202cbe053bd7a2a73d6ca7 /sw | |
parent | aec792c1a429bd96a172d529521247a2b3391987 (diff) |
Add a view-only iOS test app using tiled rendering
I had to add some horrible hacks to make sure the test doc has been
loaded into a Writer shell before retrieving its size and being able
to render it. Obviously some better solution is needed. But this is
just a testbed to get some profiling data.
The app is built using an Xcode project, and in gbuild through a
custom target based on the MobileLibreOffice one. Setting up the
various files used (or not used...) at run-time should really be
factored out from the CustomTarget files.
Change-Id: I1711b0cae9d28a09b73476b2d37d98b1820c9943
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 01933762695b..bd90cbed514e 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1807,7 +1807,14 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD // open, we need to add a documentHandle that would hold the right // document shell in the iOS / Android impl, and we would get it as a // parameter. - SwWrtShell *pViewShell = GetActiveWrtShell(); + + SwWrtShell *pViewShell; + + // FIXME: make sure this is not called before we have a document... + while (!(pViewShell = GetActiveWrtShell())) + { + sleep(1); + } // Creation, use and destruction of a VirtualDevice needs to be // protected by the SolarMutex, it seems. @@ -1833,7 +1840,13 @@ extern "C" MLODpxSize touch_lo_get_content_size() { #ifdef IOS - SwWrtShell *pViewShell = GetActiveWrtShell(); + SwWrtShell *pViewShell; + // FIXME: make sure this is not called before we have a document... + while (!(pViewShell = GetActiveWrtShell())) + { + sleep(1); + } + if (pViewShell) { static const MLORip WIDTH_ADDITION = 6L * DOCUMENTBORDER; |