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

Unified Diff: ui/android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java

Issue 191933002: This is initial API support required for enabling SurfaceTexture backed zero-copy for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build issues Created 6 years, 9 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 | « media/base/android/media_source_player_unittest.cc ('k') | ui/gl/android/surface_texture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
diff --git a/ui/android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java b/ui/android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
index 53d33036edebd785726c59dd42110a40fa6b1610..5f4c59885f0846303661d388515c55e3c00f2e2b 100644
--- a/ui/android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
+++ b/ui/android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
@@ -26,6 +26,12 @@ class SurfaceTexturePlatformWrapper {
}
@CalledByNative
+ private static SurfaceTexture createSingleBuffered(int textureId) {
+ assert Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
+ return new SurfaceTexture(textureId, true);
+ }
+
+ @CalledByNative
private static void destroy(SurfaceTexture surfaceTexture) {
surfaceTexture.setOnFrameAvailableListener(null);
surfaceTexture.release();
@@ -48,6 +54,12 @@ class SurfaceTexturePlatformWrapper {
}
@CalledByNative
+ private static void releaseTexImage(SurfaceTexture surfaceTexture) {
+ assert Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
+ surfaceTexture.releaseTexImage();
+ }
+
+ @CalledByNative
private static void setDefaultBufferSize(SurfaceTexture surfaceTexture, int width,
int height) {
surfaceTexture.setDefaultBufferSize(width, height);
« no previous file with comments | « media/base/android/media_source_player_unittest.cc ('k') | ui/gl/android/surface_texture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698