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

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: sdk version check and comments 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
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..6e5d51c6962e8143ca0e4bc94b18720b02bc4fee 100644
--- a/ui/android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
+++ b/ui/android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
@@ -21,8 +21,8 @@ class SurfaceTexturePlatformWrapper {
private static final String TAG = "SurfaceTexturePlatformWrapper";
@CalledByNative
- private static SurfaceTexture create(int textureId) {
- return new SurfaceTexture(textureId);
+ private static SurfaceTexture create(int textureId, boolean singleBufferMode) {
+ return new SurfaceTexture(textureId, singleBufferMode);
reveman 2014/03/10 16:16:58 you'll need to add a createSingleBuffered as this
epennerAtGoogle 2014/03/10 18:54:07 Would something like this work? Unless we want mor
reveman 2014/03/10 19:02:14 It would work but I prefer if we only branch once
}
@CalledByNative
@@ -48,6 +48,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);

Powered by Google App Engine
This is Rietveld 408576698