| Index: tools/viewer/sk_app/android/surface_glue_android.h
|
| diff --git a/tools/viewer/sk_app/android/surface_glue_android.h b/tools/viewer/sk_app/android/surface_glue_android.h
|
| index 1ce06674b9eead2ac60d6f13a5f8517f0d4797fe..d78be676829772c1cc5efe8e185537973548a759 100644
|
| --- a/tools/viewer/sk_app/android/surface_glue_android.h
|
| +++ b/tools/viewer/sk_app/android/surface_glue_android.h
|
| @@ -24,13 +24,16 @@ enum MessageType {
|
| kSurfaceDestroyed,
|
| kDestroyApp,
|
| kContentInvalidated,
|
| - kKeyPressed
|
| + kKeyPressed,
|
| + kTouched
|
| };
|
|
|
| struct Message {
|
| MessageType fType = kUndefined;
|
| ANativeWindow* fNativeWindow = nullptr;
|
| - int keycode = 0;
|
| + int fKeycode = 0;
|
| + int fTouchOwner, fTouchState;
|
| + float fTouchX, fTouchY;
|
|
|
| Message() {}
|
| Message(MessageType t) : fType(t) {}
|
| @@ -40,6 +43,7 @@ struct SkiaAndroidApp {
|
| Application* fApp;
|
| Window* fWindow;
|
| jobject fAndroidApp;
|
| + bool fIsContentInvalidated = false; // use this to avoid duplicate invalidate events
|
|
|
| SkiaAndroidApp(JNIEnv* env, jobject androidApp);
|
|
|
| @@ -49,6 +53,7 @@ struct SkiaAndroidApp {
|
|
|
| // This must be called in SkiaAndroidApp's own pthread because the JNIEnv is thread sensitive
|
| void setTitle(const char* title) const;
|
| +
|
| private:
|
| pthread_t fThread;
|
| ANativeWindow* fNativeWindow;
|
|
|