Bug 925608 - 7/8: rename ProvideEGLSurface to CreateEGLSurfaceForCompositor - r=kats

This commit is contained in:
Benoit Jacob 2013-11-15 11:28:59 -05:00
parent b56e9f0b0c
commit 1d3a8d8fae
6 changed files with 12 additions and 12 deletions

View File

@ -183,7 +183,7 @@ CreateSurfaceForWindow(nsIWidget* widget, const EGLConfig& config) {
#ifdef MOZ_ANDROID_OMTC
mozilla::AndroidBridge::Bridge()->RegisterCompositor();
newSurface = mozilla::AndroidBridge::Bridge()->ProvideEGLSurface();
newSurface = mozilla::AndroidBridge::Bridge()->CreateEGLSurfaceForCompositor();
if (newSurface == EGL_NO_SURFACE) {
return EGL_NO_SURFACE;
}

View File

@ -202,8 +202,8 @@ public class GLController {
throw new GLControllerException("No suitable EGL configuration found");
}
@GeneratableAndroidBridgeTarget(allowMultithread = true, stubName = "ProvideEGLSurfaceWrapper")
private EGLSurface provideEGLSurface() {
@GeneratableAndroidBridgeTarget(allowMultithread = true, stubName = "CreateEGLSurfaceForCompositorWrapper")
private EGLSurface createEGLSurfaceForCompositor() {
initEGL();
return mEGL.eglCreateWindowSurface(mEGLDisplay, mEGLConfig, mView.getNativeWindow(), null);
}

View File

@ -723,19 +723,19 @@ AndroidBridge::RegisterCompositor(JNIEnv *env)
}
EGLSurface
AndroidBridge::ProvideEGLSurface()
AndroidBridge::CreateEGLSurfaceForCompositor()
{
if (!jEGLSurfacePointerField) {
return nullptr;
}
MOZ_ASSERT(mGLControllerObj, "AndroidBridge::ProvideEGLSurface called with a null GL controller ref");
MOZ_ASSERT(mGLControllerObj, "AndroidBridge::CreateEGLSurfaceForCompositor called with a null GL controller ref");
JNIEnv* env = GetJNIForThread(); // called on the compositor thread
if (!env) {
return nullptr;
}
jobject eglSurface = ProvideEGLSurfaceWrapper(mGLControllerObj);
jobject eglSurface = CreateEGLSurfaceForCompositorWrapper(mGLControllerObj);
if (!eglSurface)
return nullptr;

View File

@ -228,7 +228,7 @@ public:
// Switch Java to composite with the Gecko Compositor thread
void RegisterCompositor(JNIEnv* env = nullptr);
EGLSurface ProvideEGLSurface();
EGLSurface CreateEGLSurfaceForCompositor();
bool GetStaticStringField(const char *classID, const char *field, nsAString &result, JNIEnv* env = nullptr);

View File

@ -108,7 +108,7 @@ void AndroidBridge::InitStubs(JNIEnv *jEnv) {
jSendThumbnail = getStaticMethod("notifyThumbnail", "(Ljava/nio/ByteBuffer;IZ)V");
mGLControllerClass = getClassGlobalRef("org/mozilla/gecko/gfx/GLController");
jProvideEGLSurfaceWrapper = getMethod("provideEGLSurface", "()Ljavax/microedition/khronos/egl/EGLSurface;");
jCreateEGLSurfaceForCompositorWrapper = getMethod("createEGLSurfaceForCompositor", "()Ljavax/microedition/khronos/egl/EGLSurface;");
mLayerViewClass = getClassGlobalRef("org/mozilla/gecko/gfx/LayerView");
jRegisterCompositorWrapper = getStaticMethod("registerCxxCompositor", "()Lorg/mozilla/gecko/gfx/GLController;");
@ -2469,7 +2469,7 @@ void AndroidBridge::SendThumbnail(jobject a0, int32_t a1, bool a2) {
env->PopLocalFrame(NULL);
}
jobject AndroidBridge::ProvideEGLSurfaceWrapper(jobject aTarget) {
jobject AndroidBridge::CreateEGLSurfaceForCompositorWrapper(jobject aTarget) {
JNIEnv *env = GetJNIForThread();
if (!env) {
ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
@ -2483,7 +2483,7 @@ jobject AndroidBridge::ProvideEGLSurfaceWrapper(jobject aTarget) {
return nullptr;
}
jobject temp = env->CallObjectMethod(aTarget, jProvideEGLSurfaceWrapper);
jobject temp = env->CallObjectMethod(aTarget, jCreateEGLSurfaceForCompositorWrapper);
if (env->ExceptionCheck()) {
ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);

View File

@ -92,7 +92,7 @@ jclass mThumbnailHelperClass;
jmethodID jSendThumbnail;
jclass mGLControllerClass;
jmethodID jProvideEGLSurfaceWrapper;
jmethodID jCreateEGLSurfaceForCompositorWrapper;
jclass mLayerViewClass;
jmethodID jRegisterCompositorWrapper;
@ -196,7 +196,7 @@ void StartJavaProfiling(int32_t a0, int32_t a1);
void StopJavaProfiling();
void UnpauseJavaProfiling();
void SendThumbnail(jobject a0, int32_t a1, bool a2);
jobject ProvideEGLSurfaceWrapper(jobject aTarget);
jobject CreateEGLSurfaceForCompositorWrapper(jobject aTarget);
jobject RegisterCompositorWrapper();
void PostDelayedCallbackWrapper(jobject aTarget, int64_t a0);
void RequestContentRepaintWrapper(jobject aTarget, jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4);