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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java

Issue 685983005: gpu: Associate all GpuMemoryBuffers with unique IDs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more ozone build fix Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.graphics.SurfaceTexture; 8 import android.graphics.SurfaceTexture;
9 import android.os.RemoteException; 9 import android.os.RemoteException;
10 import android.util.Log; 10 import android.util.Log;
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 int surfaceTextureId, int clientId) { 538 int surfaceTextureId, int clientId) {
539 if (callbackType != CALLBACK_FOR_GPU_PROCESS) { 539 if (callbackType != CALLBACK_FOR_GPU_PROCESS) {
540 Log.e(TAG, "Illegal callback for non-GPU process."); 540 Log.e(TAG, "Illegal callback for non-GPU process.");
541 return; 541 return;
542 } 542 }
543 543
544 ChildProcessLauncher.unregisterSurfaceTextureSurface(surfaceText ureId, clientId); 544 ChildProcessLauncher.unregisterSurfaceTextureSurface(surfaceText ureId, clientId);
545 } 545 }
546 546
547 @Override 547 @Override
548 public SurfaceWrapper getSurfaceTextureSurface(int surfaceTextureId, int clientId) { 548 public SurfaceWrapper getSurfaceTextureSurface(int surfaceTextureId) {
549 if (callbackType != CALLBACK_FOR_RENDERER_PROCESS) { 549 if (callbackType != CALLBACK_FOR_RENDERER_PROCESS) {
550 Log.e(TAG, "Illegal callback for non-renderer process."); 550 Log.e(TAG, "Illegal callback for non-renderer process.");
551 return null; 551 return null;
552 } 552 }
553 553
554 if (clientId != childProcessId) { 554 return ChildProcessLauncher.getSurfaceTextureSurface(surfaceText ureId,
555 Log.e(TAG, "Illegal secondaryId for renderer process."); 555 childProcessId);
556 return null;
557 }
558
559 return ChildProcessLauncher.getSurfaceTextureSurface(surfaceText ureId, clientId);
560 } 556 }
561 }; 557 };
562 } 558 }
563 559
564 static void logPidWarning(int pid, String message) { 560 static void logPidWarning(int pid, String message) {
565 // This class is effectively a no-op in single process mode, so don't lo g warnings there. 561 // This class is effectively a no-op in single process mode, so don't lo g warnings there.
566 if (pid > 0 && !nativeIsSingleProcess()) { 562 if (pid > 0 && !nativeIsSingleProcess()) {
567 Log.w(TAG, message + ", pid=" + pid); 563 Log.w(TAG, message + ", pid=" + pid);
568 } 564 }
569 } 565 }
(...skipping 30 matching lines...) Expand all
600 } 596 }
601 597
602 return true; 598 return true;
603 } 599 }
604 600
605 private static native void nativeOnChildProcessStarted(long clientContext, i nt pid); 601 private static native void nativeOnChildProcessStarted(long clientContext, i nt pid);
606 private static native void nativeEstablishSurfacePeer( 602 private static native void nativeEstablishSurfacePeer(
607 int pid, Surface surface, int primaryID, int secondaryID); 603 int pid, Surface surface, int primaryID, int secondaryID);
608 private static native boolean nativeIsSingleProcess(); 604 private static native boolean nativeIsSingleProcess();
609 } 605 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698