Bug 835381 - Update libnestegg to 38c83d9d4c0c5c84373aa285bd30094a12d6b6f6. r=kinetik
[gecko.git] / widget / android / AndroidLayerViewWrapper.h
blob1b8b2111189dd548d246cd94e911c064a33d31f4
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef AndroidLayerViewWrapper_h__
7 #define AndroidLayerViewWrapper_h__
9 #include <jni.h>
10 #include <pthread.h>
12 class AndroidEGLObject {
13 public:
14 static void Init(JNIEnv* aJEnv);
17 typedef void* EGLSurface;
19 class AndroidGLController {
20 public:
21 static void Init(JNIEnv* aJEnv);
23 void Acquire(JNIEnv* aJEnv, jobject aJObj);
24 void Reacquire(JNIEnv* aJEnv, jobject aJObj);
25 EGLSurface ProvideEGLSurface();
26 void WaitForValidSurface();
28 private:
29 static jmethodID jWaitForValidSurfaceMethod;
30 static jmethodID jProvideEGLSurfaceMethod;
31 static jmethodID jResumeCompositorIfValidMethod;
33 // the JNIEnv for the compositor thread
34 JNIEnv* mJEnv;
35 pthread_t mThread;
36 jobject mJObj;
39 #endif