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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_android.cc

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
« no previous file with comments | « content/common/child_process_messages.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/gpu_memory_buffer_impl_android.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_android.cc b/content/common/gpu/client/gpu_memory_buffer_impl_android.cc
index b19efb4b7e8196f21719e0aa21b4fc2287edef91..f7298a75e24eaa16246f3075a91ffc3bae664abb 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_android.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_android.cc
@@ -15,6 +15,13 @@ void GpuMemoryBufferImpl::Create(const gfx::Size& size,
unsigned usage,
int client_id,
const CreationCallback& callback) {
+ if (GpuMemoryBufferImplSurfaceTexture::IsConfigurationSupported(
+ internalformat, usage)) {
+ GpuMemoryBufferImplSurfaceTexture::Create(
+ size, internalformat, usage, client_id, callback);
+ return;
+ }
+
if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
size, internalformat, usage)) {
GpuMemoryBufferImplSharedMemory::Create(
@@ -33,6 +40,13 @@ void GpuMemoryBufferImpl::AllocateForChildProcess(
base::ProcessHandle child_process,
int child_client_id,
const AllocationCallback& callback) {
+ if (GpuMemoryBufferImplSurfaceTexture::IsConfigurationSupported(
+ internalformat, usage)) {
+ GpuMemoryBufferImplSurfaceTexture::AllocateForChildProcess(
+ size, internalformat, usage, child_client_id, callback);
+ return;
+ }
+
if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
size, internalformat, usage)) {
GpuMemoryBufferImplSharedMemory::AllocateForChildProcess(
« no previous file with comments | « content/common/child_process_messages.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698