Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: ui/gl/android/surface_texture.cc

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/android/scoped_java_surface.cc ('k') | ui/platform_window/android/platform_ime_controller_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/gl/android/scoped_java_surface.cc ('k') | ui/platform_window/android/platform_ime_controller_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698