diff options
author | Jonathan Dixon <joth@google.com> | 2012-11-12 11:06:01 -0800 |
---|---|---|
committer | Jonathan Dixon <joth@google.com> | 2012-11-12 11:06:01 -0800 |
commit | a2b0d0b4d6d1ff22fbb1329e358e1cc0a112aab3 (patch) | |
tree | e7432b7d49f6acc9ed35ea39fc740a0e8c8cb2c7 /chromium/plat_support/jni_entry_point.cpp | |
parent | 3949435b480cb71106f65b237025da359cf8a8ca (diff) | |
download | webview-a2b0d0b4d6d1ff22fbb1329e358e1cc0a112aab3.tar.gz |
Plumb through the glue layer functor to AwContents
Adds new glue-layer .so and code to load it from Java.
Depends on upstream patch https://codereview.chromium.org/11358118/
Together these changes provide all the plumbing needed to get GL
functor calls through to the chromium backend.
Change-Id: I1899d59ab6f13de6d9fb07147d36b08504ef955e
Diffstat (limited to 'chromium/plat_support/jni_entry_point.cpp')
-rw-r--r-- | chromium/plat_support/jni_entry_point.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/chromium/plat_support/jni_entry_point.cpp b/chromium/plat_support/jni_entry_point.cpp new file mode 100644 index 0000000..6293fa5 --- /dev/null +++ b/chromium/plat_support/jni_entry_point.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG "webviewchromium_plat_support" + +#include <jni.h> +#include <utils/Log.h> + +namespace android { + +void RegisterDrawGLFunctor(JNIEnv* env); + +} // namespace android + +JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { + JNIEnv* env = NULL; + jint ret = vm->AttachCurrentThread(&env, NULL); + LOG_ALWAYS_FATAL_IF(ret != JNI_OK, "AttachCurrentThread failed"); + android::RegisterDrawGLFunctor(env); + + return JNI_VERSION_1_4; +} |