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 5ac4a0667e139fd38dd91170d0df7d3ed1031777..191f0f6ff27223de2cbcb99d41b83f0129f1612e 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.h" |
+#include "content/common/gpu/client/gpu_memory_buffer_impl_shm.h" |
#include "content/common/gpu/gpu_messages.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/common/content_client.h" |
@@ -380,11 +380,12 @@ scoped_ptr<gfx::GpuMemoryBuffer> |
if (!shm->CreateAnonymous(size)) |
return scoped_ptr<gfx::GpuMemoryBuffer>(); |
- return make_scoped_ptr<gfx::GpuMemoryBuffer>( |
- new GpuMemoryBufferImpl(shm.Pass(), |
- width, |
- height, |
- internalformat)); |
+ 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>(); |
} |
// static |