| Index: content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java b/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
|
| index cd5e675721c825b4cae382a39b2360d4509b1a43..1a10389e00c9664f653d9657390bc0cdf21e5661 100644
|
| --- a/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
|
| +++ b/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
|
| @@ -319,14 +319,47 @@ public class ChildProcessService extends Service {
|
|
|
| @SuppressWarnings("unused")
|
| @CalledByNative
|
| - private Surface getSurfaceTextureSurface(int primaryId, int secondaryId) {
|
| + private void createSurfaceTextureSurface(
|
| + int surfaceTextureId, int clientId, SurfaceTexture surfaceTexture) {
|
| + if (mCallback == null) {
|
| + Log.e(TAG, "No callback interface has been provided.");
|
| + return;
|
| + }
|
| +
|
| + Surface surface = new Surface(surfaceTexture);
|
| + try {
|
| + mCallback.registerSurfaceTextureSurface(surfaceTextureId, clientId, surface);
|
| + } catch (RemoteException e) {
|
| + Log.e(TAG, "Unable to call registerSurfaceTextureSurface: " + e);
|
| + }
|
| + surface.release();
|
| + }
|
| +
|
| + @SuppressWarnings("unused")
|
| + @CalledByNative
|
| + private void destroySurfaceTextureSurface(int surfaceTextureId, int clientId) {
|
| + if (mCallback == null) {
|
| + Log.e(TAG, "No callback interface has been provided.");
|
| + return;
|
| + }
|
| +
|
| + try {
|
| + mCallback.unregisterSurfaceTextureSurface(surfaceTextureId, clientId);
|
| + } catch (RemoteException e) {
|
| + Log.e(TAG, "Unable to call unregisterSurfaceTextureSurface: " + e);
|
| + }
|
| + }
|
| +
|
| + @SuppressWarnings("unused")
|
| + @CalledByNative
|
| + private Surface getSurfaceTextureSurface(int surfaceTextureId, int clientId) {
|
| if (mCallback == null) {
|
| Log.e(TAG, "No callback interface has been provided.");
|
| return null;
|
| }
|
|
|
| try {
|
| - return mCallback.getSurfaceTextureSurface(primaryId, secondaryId).getSurface();
|
| + return mCallback.getSurfaceTextureSurface(surfaceTextureId, clientId).getSurface();
|
| } catch (RemoteException e) {
|
| Log.e(TAG, "Unable to call getSurfaceTextureSurface: " + e);
|
| return null;
|
|
|