| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "android_webview/native/aw_gl_functor.h" | 5 #include "android_webview/native/aw_gl_functor.h" |
| 6 | 6 |
| 7 #include "android_webview/public/browser/draw_gl.h" | 7 #include "android_webview/public/browser/draw_gl.h" |
| 8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
| 9 #include "jni/AwGLFunctor_jni.h" | 9 #include "jni/AwGLFunctor_jni.h" |
| 10 | 10 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 80 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 81 return reinterpret_cast<intptr_t>(&render_thread_manager_); | 81 return reinterpret_cast<intptr_t>(&render_thread_manager_); |
| 82 } | 82 } |
| 83 | 83 |
| 84 static jint GetNativeInstanceCount(JNIEnv* env, const JavaParamRef<jclass>&) { | 84 static jint GetNativeInstanceCount(JNIEnv* env, const JavaParamRef<jclass>&) { |
| 85 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 85 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 86 return g_instance_count; | 86 return g_instance_count; |
| 87 } | 87 } |
| 88 | 88 |
| 89 static jlong GetAwDrawGLFunction(JNIEnv* env, const JavaParamRef<jclass>&) { | 89 static jlong GetAwDrawGLFunction(JNIEnv* env, const JavaParamRef<jclass>&) { |
| 90 DCHECK_CURRENTLY_ON(BrowserThread::UI); | |
| 91 return reinterpret_cast<intptr_t>(&DrawGLFunction); | 90 return reinterpret_cast<intptr_t>(&DrawGLFunction); |
| 92 } | 91 } |
| 93 | 92 |
| 94 static jlong Create(JNIEnv* env, | 93 static jlong Create(JNIEnv* env, |
| 95 const JavaParamRef<jclass>&, | 94 const JavaParamRef<jclass>&, |
| 96 const base::android::JavaParamRef<jobject>& obj) { | 95 const base::android::JavaParamRef<jobject>& obj) { |
| 97 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 96 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 98 return reinterpret_cast<intptr_t>( | 97 return reinterpret_cast<intptr_t>( |
| 99 new AwGLFunctor(JavaObjectWeakGlobalRef(env, obj))); | 98 new AwGLFunctor(JavaObjectWeakGlobalRef(env, obj))); |
| 100 } | 99 } |
| 101 | 100 |
| 102 bool RegisterAwGLFunctor(JNIEnv* env) { | 101 bool RegisterAwGLFunctor(JNIEnv* env) { |
| 103 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 102 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 104 return RegisterNativesImpl(env); | 103 return RegisterNativesImpl(env); |
| 105 } | 104 } |
| 106 | 105 |
| 107 } // namespace android_webview | 106 } // namespace android_webview |
| OLD | NEW |