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

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

Issue 634643002: content: Out-of-process GPU service support for SurfaceTexture backed GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one last build fix Created 6 years, 2 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/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;
« no previous file with comments | « content/content_common.gypi ('k') | content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698