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

Side by Side Diff: content/browser/android/child_process_launcher_android.cc

Issue 1889703002: Android Java Surfaces can now be looked up via GpuSurfaceTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/browser/android/child_process_launcher_android.h" 5 #include "content/browser/android/child_process_launcher_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 DCHECK(env); 239 DCHECK(env);
240 Java_ChildProcessLauncher_registerViewSurface(env, surface_id, j_surface); 240 Java_ChildProcessLauncher_registerViewSurface(env, surface_id, j_surface);
241 } 241 }
242 242
243 void UnregisterViewSurface(int surface_id) { 243 void UnregisterViewSurface(int surface_id) {
244 JNIEnv* env = AttachCurrentThread(); 244 JNIEnv* env = AttachCurrentThread();
245 DCHECK(env); 245 DCHECK(env);
246 Java_ChildProcessLauncher_unregisterViewSurface(env, surface_id); 246 Java_ChildProcessLauncher_unregisterViewSurface(env, surface_id);
247 } 247 }
248 248
249 gfx::ScopedJavaSurface GetViewSurface(int surface_id) {
250 JNIEnv* env = AttachCurrentThread();
251 DCHECK(env);
252 return gfx::ScopedJavaSurface::AcquireExternalSurface(
253 Java_ChildProcessLauncher_getViewSurface(env, surface_id).obj());
254 }
255
249 void CreateSurfaceTextureSurface(int surface_texture_id, 256 void CreateSurfaceTextureSurface(int surface_texture_id,
250 int client_id, 257 int client_id,
251 gfx::SurfaceTexture* surface_texture) { 258 gfx::SurfaceTexture* surface_texture) {
252 JNIEnv* env = AttachCurrentThread(); 259 JNIEnv* env = AttachCurrentThread();
253 DCHECK(env); 260 DCHECK(env);
254 Java_ChildProcessLauncher_createSurfaceTextureSurface( 261 Java_ChildProcessLauncher_createSurfaceTextureSurface(
255 env, 262 env,
256 surface_texture_id, 263 surface_texture_id,
257 client_id, 264 client_id,
258 surface_texture->j_surface_texture().obj()); 265 surface_texture->j_surface_texture().obj());
(...skipping 18 matching lines...) Expand all
277 jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) { 284 jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) {
278 return base::CommandLine::ForCurrentProcess()->HasSwitch( 285 return base::CommandLine::ForCurrentProcess()->HasSwitch(
279 switches::kSingleProcess); 286 switches::kSingleProcess);
280 } 287 }
281 288
282 bool RegisterChildProcessLauncher(JNIEnv* env) { 289 bool RegisterChildProcessLauncher(JNIEnv* env) {
283 return RegisterNativesImpl(env); 290 return RegisterNativesImpl(env);
284 } 291 }
285 292
286 } // namespace content 293 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/child_process_launcher_android.h ('k') | content/browser/gpu/gpu_surface_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698