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

Unified Diff: content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java

Issue 2268173002: Add StreamTexture resgistration for the Browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java
diff --git a/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java b/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java
index b84485566fa9e92af90307b1c458fe45a186211a..4d8f59988048809cc32649cf402a18de982f801b 100644
--- a/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java
+++ b/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java
@@ -419,6 +419,39 @@ public class ChildProcessServiceImpl {
@SuppressWarnings("unused")
@CalledByNative
+ private void createBrowserSurfaceTextureSurface(
+ int surfaceTextureId, SurfaceTexture surfaceTexture) {
+ if (mCallback == null) {
+ Log.e(TAG, "No callback interface has been provided.");
+ return;
+ }
+
+ Surface surface = new Surface(surfaceTexture);
+ try {
+ mCallback.registerBrowserSurfaceTextureSurface(surfaceTextureId, surface);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Unable to call registerBrowserSurfaceTextureSurface: %s", e);
+ }
+ surface.release();
+ }
+
+ @SuppressWarnings("unused")
+ @CalledByNative
+ private void destroyBrowserSurfaceTextureSurface(int surfaceTextureId) {
+ if (mCallback == null) {
+ Log.e(TAG, "No callback interface has been provided.");
+ return;
+ }
+
+ try {
+ mCallback.unregisterBrowserSurfaceTextureSurface(surfaceTextureId);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Unable to call unregisterBrowserSurfaceTextureSurface: %s", e);
+ }
+ }
+
+ @SuppressWarnings("unused")
+ @CalledByNative
private Surface getSurfaceTextureSurface(int surfaceTextureId) {
if (mCallback == null) {
Log.e(TAG, "No callback interface has been provided.");

Powered by Google App Engine
This is Rietveld 408576698