| Index: content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java
|
| index 15ea813ccb7fc07b5b647eacae1ea507bee576c2..c403192c66c8e65f99d23f2489a3d39a88f29640 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java
|
| @@ -8,12 +8,10 @@ import android.content.ComponentName;
|
| import android.content.Context;
|
| import android.content.pm.ApplicationInfo;
|
| import android.content.pm.PackageManager;
|
| -import android.graphics.SurfaceTexture;
|
| import android.os.Bundle;
|
| import android.os.ParcelFileDescriptor;
|
| import android.os.RemoteException;
|
| import android.text.TextUtils;
|
| -import android.util.Pair;
|
| import android.view.Surface;
|
|
|
| import org.chromium.base.CommandLine;
|
| @@ -490,10 +488,6 @@ public class ChildProcessLauncher {
|
| // Manages oom bindings used to bind chind services.
|
| private static BindingManager sBindingManager = BindingManagerImpl.createBindingManager();
|
|
|
| - // Map from surface texture id to Surface.
|
| - private static Map<Pair<Integer, Integer>, Surface> sSurfaceTextureSurfaceMap =
|
| - new ConcurrentHashMap<Pair<Integer, Integer>, Surface>();
|
| -
|
| // Whether the main application is currently brought to the foreground.
|
| private static boolean sApplicationInForeground = true;
|
|
|
| @@ -508,46 +502,6 @@ public class ChildProcessLauncher {
|
| return sBindingManager.isOomProtected(pid);
|
| }
|
|
|
| - private static void registerSurfaceTextureSurface(
|
| - int surfaceTextureId, int clientId, Surface surface) {
|
| - Pair<Integer, Integer> key = new Pair<Integer, Integer>(surfaceTextureId, clientId);
|
| - sSurfaceTextureSurfaceMap.put(key, surface);
|
| - }
|
| -
|
| - private static void unregisterSurfaceTextureSurface(int surfaceTextureId, int clientId) {
|
| - Pair<Integer, Integer> key = new Pair<Integer, Integer>(surfaceTextureId, clientId);
|
| - Surface surface = sSurfaceTextureSurfaceMap.remove(key);
|
| - if (surface == null) return;
|
| -
|
| - assert surface.isValid();
|
| - surface.release();
|
| - }
|
| -
|
| - @CalledByNative
|
| - private static void createSurfaceTextureSurface(
|
| - int surfaceTextureId, int clientId, SurfaceTexture surfaceTexture) {
|
| - registerSurfaceTextureSurface(surfaceTextureId, clientId, new Surface(surfaceTexture));
|
| - }
|
| -
|
| - @CalledByNative
|
| - private static void destroySurfaceTextureSurface(int surfaceTextureId, int clientId) {
|
| - unregisterSurfaceTextureSurface(surfaceTextureId, clientId);
|
| - }
|
| -
|
| - @CalledByNative
|
| - private static SurfaceWrapper getSurfaceTextureSurface(
|
| - int surfaceTextureId, int clientId) {
|
| - Pair<Integer, Integer> key = new Pair<Integer, Integer>(surfaceTextureId, clientId);
|
| -
|
| - Surface surface = sSurfaceTextureSurfaceMap.get(key);
|
| - if (surface == null) {
|
| - Log.e(TAG, "Invalid Id for surface texture.");
|
| - return null;
|
| - }
|
| - assert surface.isValid();
|
| - return new SurfaceWrapper(surface);
|
| - }
|
| -
|
| /**
|
| * Sets the visibility of the child process when it changes or when it is determined for the
|
| * first time.
|
| @@ -868,40 +822,6 @@ public class ChildProcessLauncher {
|
| }
|
| return new SurfaceWrapper(surface);
|
| }
|
| -
|
| - @Override
|
| - public void registerSurfaceTextureSurface(
|
| - int surfaceTextureId, int clientId, Surface surface) {
|
| - if (callbackType != CALLBACK_FOR_GPU_PROCESS) {
|
| - Log.e(TAG, "Illegal callback for non-GPU process.");
|
| - return;
|
| - }
|
| -
|
| - ChildProcessLauncher.registerSurfaceTextureSurface(surfaceTextureId, clientId,
|
| - surface);
|
| - }
|
| -
|
| - @Override
|
| - public void unregisterSurfaceTextureSurface(
|
| - int surfaceTextureId, int clientId) {
|
| - if (callbackType != CALLBACK_FOR_GPU_PROCESS) {
|
| - Log.e(TAG, "Illegal callback for non-GPU process.");
|
| - return;
|
| - }
|
| -
|
| - ChildProcessLauncher.unregisterSurfaceTextureSurface(surfaceTextureId, clientId);
|
| - }
|
| -
|
| - @Override
|
| - public SurfaceWrapper getSurfaceTextureSurface(int surfaceTextureId) {
|
| - if (callbackType != CALLBACK_FOR_RENDERER_PROCESS) {
|
| - Log.e(TAG, "Illegal callback for non-renderer process.");
|
| - return null;
|
| - }
|
| -
|
| - return ChildProcessLauncher.getSurfaceTextureSurface(surfaceTextureId,
|
| - childProcessId);
|
| - }
|
| };
|
| }
|
|
|
|
|