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

Side by Side Diff: content/app/android/child_process_service.cc

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
« no previous file with comments | « no previous file | content/browser/android/browser_surface_texture_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/app/android/child_process_service.h" 5 #include "content/app/android/child_process_service.h"
6 6
7 #include <android/native_window_jni.h> 7 #include <android/native_window_jni.h>
8 #include <cpu-features.h> 8 #include <cpu-features.h>
9 9
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 surface_texture_id, 61 surface_texture_id,
62 client_id, 62 client_id,
63 surface_texture->j_surface_texture().obj()); 63 surface_texture->j_surface_texture().obj());
64 } 64 }
65 virtual void UnregisterSurfaceTexture(int surface_texture_id, 65 virtual void UnregisterSurfaceTexture(int surface_texture_id,
66 int client_id) override { 66 int client_id) override {
67 JNIEnv* env = base::android::AttachCurrentThread(); 67 JNIEnv* env = base::android::AttachCurrentThread();
68 Java_ChildProcessService_destroySurfaceTextureSurface( 68 Java_ChildProcessService_destroySurfaceTextureSurface(
69 env, service_.obj(), surface_texture_id, client_id); 69 env, service_.obj(), surface_texture_id, client_id);
70 } 70 }
71 virtual gfx::AcceleratedWidget AcquireNativeWidget(int surface_texture_id, 71 virtual gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture(
72 int client_id) override { 72 int surface_texture_id) override {
73 JNIEnv* env = base::android::AttachCurrentThread(); 73 JNIEnv* env = base::android::AttachCurrentThread();
74 gfx::ScopedJavaSurface surface( 74 gfx::ScopedJavaSurface surface(
75 Java_ChildProcessService_getSurfaceTextureSurface( 75 Java_ChildProcessService_getSurfaceTextureSurface(env, service_.obj(),
76 env, service_.obj(), surface_texture_id, client_id)); 76 surface_texture_id));
77 77
78 if (surface.j_surface().is_null()) 78 if (surface.j_surface().is_null())
79 return NULL; 79 return NULL;
80 80
81 // Note: This ensures that any local references used by 81 // Note: This ensures that any local references used by
82 // ANativeWindow_fromSurface are released immediately. This is needed as a 82 // ANativeWindow_fromSurface are released immediately. This is needed as a
83 // workaround for https://code.google.com/p/android/issues/detail?id=68174 83 // workaround for https://code.google.com/p/android/issues/detail?id=68174
84 base::android::ScopedJavaLocalFrame scoped_local_reference_frame(env); 84 base::android::ScopedJavaLocalFrame scoped_local_reference_frame(env);
85 ANativeWindow* native_window = 85 ANativeWindow* native_window =
86 ANativeWindow_fromSurface(env, surface.j_surface().obj()); 86 ANativeWindow_fromSurface(env, surface.j_surface().obj());
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 bool RegisterChildProcessService(JNIEnv* env) { 186 bool RegisterChildProcessService(JNIEnv* env) {
187 return RegisterNativesImpl(env); 187 return RegisterNativesImpl(env);
188 } 188 }
189 189
190 void ShutdownMainThread(JNIEnv* env, jobject obj) { 190 void ShutdownMainThread(JNIEnv* env, jobject obj) {
191 ChildThread::ShutdownThread(); 191 ChildThread::ShutdownThread();
192 } 192 }
193 193
194 } // namespace content 194 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/browser_surface_texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698