diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-07 02:17:49 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-07 02:33:42 +0200 |
commit | 0ce2d740a2ed93a029a290fe88748ac92baff9a0 (patch) | |
tree | 3751cf456702440375fac64790df35bbf46a2dd2 /vcl/inc/android | |
parent | Use __android_log_print directly (diff) | |
download | core-0ce2d740a2ed93a029a290fe88748ac92baff9a0.tar.gz core-0ce2d740a2ed93a029a290fe88748ac92baff9a0.zip |
Handle damage tracking and redrawing properly in the "desktop" Android app
In the damaged() method do a callback up to Java code in Desktop that
invalidates the view. For now store the view in a static field, but need to do
that in a cleaner way eventually. There might in some circumstancest be
several instances of the Desktop activity present. Obviously should also run
just one LO thread.
Get rid of the temporary self-invalidattion in onDraw() silliness.
Start the LO thread that runs soffice_main() from Java, not from native
code. Apparently only threads created from Java have proper class loaders in
Android.
No need for an own DoReleaseYield() in AndroidSalInstance, the one in the
SvpSalInstance base class does what needs to be done.
Change-Id: I4cb85b352fca1f1375f726620ec8c93d2047f113
Diffstat (limited to 'vcl/inc/android')
-rw-r--r-- | vcl/inc/android/androidinst.hxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx index 34c0d6e02716..77b6fd32ad42 100644 --- a/vcl/inc/android/androidinst.hxx +++ b/vcl/inc/android/androidinst.hxx @@ -30,9 +30,7 @@ #ifndef ANDROID_SALINST_H #define ANDROID_SALINST_H -#include <EGL/egl.h> -#include <GLES/gl.h> - +#include <jni.h> #include <android/input.h> #include <android/native_window.h> #include <headless/svpinst.hxx> @@ -43,6 +41,17 @@ class AndroidSalInstance : public SvpSalInstance { void BlitFrameToWindow(ANativeWindow_Buffer *pOutBuffer, const basebmp::BitmapDeviceSharedPtr& aDev); + + // This JNIEnv is valid only in the thread where this + // AndroidSalInstance object is created, which is the "LO" thread + // in which soffice_main() runs + JNIEnv *m_pJNIEnv; + + // The Desktop class + jclass m_nDesktopClass; + + jmethodID m_nCallbackDamaged; + public: AndroidSalInstance( SalYieldMutex *pMutex ); virtual ~AndroidSalInstance(); @@ -66,9 +75,6 @@ public: SalFrame *getFocusFrame() const; void damaged(AndroidSalFrame *frame); -protected: - virtual void DoReleaseYield( int nTimeoutMS ); - bool mbQueueReDraw; }; #endif // ANDROID_SALINST_H |