| Index: ui/gl/android/surface_texture.cc
|
| diff --git a/ui/gl/android/surface_texture.cc b/ui/gl/android/surface_texture.cc
|
| index 98fc6e99279ef781c3b21578ec9318bc0fd2694a..69c9004defa2a8138084fb22417aa39059810589 100644
|
| --- a/ui/gl/android/surface_texture.cc
|
| +++ b/ui/gl/android/surface_texture.cc
|
| @@ -28,14 +28,14 @@ SurfaceTexture::SurfaceTexture(
|
|
|
| SurfaceTexture::~SurfaceTexture() {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| - Java_SurfaceTexturePlatformWrapper_destroy(env, j_surface_texture_.obj());
|
| + Java_SurfaceTexturePlatformWrapper_destroy(env, j_surface_texture_);
|
| }
|
|
|
| void SurfaceTexture::SetFrameAvailableCallback(
|
| const base::Closure& callback) {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| Java_SurfaceTexturePlatformWrapper_setFrameAvailableCallback(
|
| - env, j_surface_texture_.obj(),
|
| + env, j_surface_texture_,
|
| reinterpret_cast<intptr_t>(new SurfaceTextureListener(callback, false)));
|
| }
|
|
|
| @@ -43,14 +43,13 @@ void SurfaceTexture::SetFrameAvailableCallbackOnAnyThread(
|
| const base::Closure& callback) {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| Java_SurfaceTexturePlatformWrapper_setFrameAvailableCallback(
|
| - env, j_surface_texture_.obj(),
|
| + env, j_surface_texture_,
|
| reinterpret_cast<intptr_t>(new SurfaceTextureListener(callback, true)));
|
| }
|
|
|
| void SurfaceTexture::UpdateTexImage() {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| - Java_SurfaceTexturePlatformWrapper_updateTexImage(env,
|
| - j_surface_texture_.obj());
|
| + Java_SurfaceTexturePlatformWrapper_updateTexImage(env, j_surface_texture_);
|
| }
|
|
|
| void SurfaceTexture::GetTransformMatrix(float mtx[16]) {
|
| @@ -58,8 +57,8 @@ void SurfaceTexture::GetTransformMatrix(float mtx[16]) {
|
|
|
| base::android::ScopedJavaLocalRef<jfloatArray> jmatrix(
|
| env, env->NewFloatArray(16));
|
| - Java_SurfaceTexturePlatformWrapper_getTransformMatrix(
|
| - env, j_surface_texture_.obj(), jmatrix.obj());
|
| + Java_SurfaceTexturePlatformWrapper_getTransformMatrix(env, j_surface_texture_,
|
| + jmatrix);
|
|
|
| jboolean is_copy;
|
| jfloat* elements = env->GetFloatArrayElements(jmatrix.obj(), &is_copy);
|
| @@ -74,14 +73,14 @@ void SurfaceTexture::AttachToGLContext() {
|
| glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texture_id);
|
| DCHECK(texture_id);
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| - Java_SurfaceTexturePlatformWrapper_attachToGLContext(
|
| - env, j_surface_texture_.obj(), texture_id);
|
| + Java_SurfaceTexturePlatformWrapper_attachToGLContext(env, j_surface_texture_,
|
| + texture_id);
|
| }
|
|
|
| void SurfaceTexture::DetachFromGLContext() {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| - Java_SurfaceTexturePlatformWrapper_detachFromGLContext(
|
| - env, j_surface_texture_.obj());
|
| + Java_SurfaceTexturePlatformWrapper_detachFromGLContext(env,
|
| + j_surface_texture_);
|
| }
|
|
|
| ANativeWindow* SurfaceTexture::CreateSurface() {
|
| @@ -98,7 +97,7 @@ ANativeWindow* SurfaceTexture::CreateSurface() {
|
|
|
| void SurfaceTexture::ReleaseSurfaceTexture() {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| - Java_SurfaceTexturePlatformWrapper_release(env, j_surface_texture_.obj());
|
| + Java_SurfaceTexturePlatformWrapper_release(env, j_surface_texture_);
|
| }
|
|
|
| } // namespace gl
|
|
|