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

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

Issue 604903005: content: Move IOSurface backed GpuMemoryBuffer allocation to GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include CoreFoundation.h Created 6 years, 3 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/common/gpu/client/gpu_memory_buffer_impl_mac.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc b/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
index ee701bd5be566034b65506edcedb4fbd61de8fc0..489ddd9015e2a255048297f5594d789c7181a1af 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
@@ -15,6 +15,13 @@ void GpuMemoryBufferImpl::Create(const gfx::Size& size,
unsigned usage,
int client_id,
const CreationCallback& callback) {
+ if (GpuMemoryBufferImplIOSurface::IsConfigurationSupported(internalformat,
+ usage)) {
+ GpuMemoryBufferImplIOSurface::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 (GpuMemoryBufferImplIOSurface::IsConfigurationSupported(internalformat,
+ usage)) {
+ GpuMemoryBufferImplIOSurface::AllocateForChildProcess(
+ size, internalformat, usage, child_client_id, callback);
+ return;
+ }
+
if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
size, internalformat, usage)) {
GpuMemoryBufferImplSharedMemory::AllocateForChildProcess(

Powered by Google App Engine
This is Rietveld 408576698