Index: ui/gl/android/surface_texture.cc |
diff --git a/ui/gl/android/surface_texture.cc b/ui/gl/android/surface_texture.cc |
index 35f9b47288b6deb3ac9e865e826bed9edef872a2..3d6932d13227013219f4f142b616facdc556b735 100644 |
--- a/ui/gl/android/surface_texture.cc |
+++ b/ui/gl/android/surface_texture.cc |
@@ -26,10 +26,10 @@ bool GlContextMethodsAvailable() { |
namespace gfx { |
-SurfaceTexture::SurfaceTexture(int texture_id) { |
+SurfaceTexture::SurfaceTexture(int texture_id, bool single_buffered) { |
JNIEnv* env = base::android::AttachCurrentThread(); |
- j_surface_texture_.Reset( |
- Java_SurfaceTexturePlatformWrapper_create(env, texture_id)); |
+ j_surface_texture_.Reset(Java_SurfaceTexturePlatformWrapper_create( |
+ env, texture_id, single_buffered)); |
} |
SurfaceTexture::~SurfaceTexture() { |
@@ -52,6 +52,12 @@ void SurfaceTexture::UpdateTexImage() { |
j_surface_texture_.obj()); |
} |
+void SurfaceTexture::ReleaseTexImage() { |
+ JNIEnv* env = base::android::AttachCurrentThread(); |
+ Java_SurfaceTexturePlatformWrapper_releaseTexImage(env, |
+ j_surface_texture_.obj()); |
+} |
+ |
void SurfaceTexture::GetTransformMatrix(float mtx[16]) { |
JNIEnv* env = base::android::AttachCurrentThread(); |