Index: content/browser/gpu/browser_gpu_channel_host_factory.cc |
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc |
index a006f1efba1591d4b559b214a4975af22dbc52b9..33a9b6e8a026a414c062bf7f3e242d19c3593a9e 100644 |
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc |
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc |
@@ -11,7 +11,7 @@ |
#include "content/browser/gpu/gpu_process_host.h" |
#include "content/browser/gpu/gpu_surface_tracker.h" |
#include "content/common/child_process_host_impl.h" |
-#include "content/common/gpu/client/gpu_memory_buffer_impl_shm.h" |
+#include "content/common/gpu/client/gpu_memory_buffer_impl.h" |
#include "content/common/gpu/gpu_messages.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/gpu_data_manager.h" |
@@ -383,18 +383,8 @@ scoped_ptr<gfx::GpuMemoryBuffer> |
if (!GpuMemoryBufferImpl::IsFormatValid(internalformat)) |
return scoped_ptr<gfx::GpuMemoryBuffer>(); |
- size_t size = width * height * |
- GpuMemoryBufferImpl::BytesPerPixel(internalformat); |
- scoped_ptr<base::SharedMemory> shm(new base::SharedMemory()); |
- if (!shm->CreateAnonymous(size)) |
- return scoped_ptr<gfx::GpuMemoryBuffer>(); |
- |
- scoped_ptr<GpuMemoryBufferImplShm> buffer( |
- new GpuMemoryBufferImplShm(gfx::Size(width, height), internalformat)); |
- if (!buffer->InitializeFromSharedMemory(shm.Pass())) |
- return scoped_ptr<gfx::GpuMemoryBuffer>(); |
- |
- return buffer.PassAs<gfx::GpuMemoryBuffer>(); |
+ return GpuMemoryBufferImpl::Create(gfx::Size(width, height), internalformat) |
+ .PassAs<gfx::GpuMemoryBuffer>(); |
} |
// static |