| Index: content/common/gpu/gpu_channel.cc
|
| diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
|
| index 727bb89492b14ae3ecfe9fe0f72b3d368a0a4183..3a128f6930a581edad7e0c27ada46917fda59fba 100644
|
| --- a/content/common/gpu/gpu_channel.cc
|
| +++ b/content/common/gpu/gpu_channel.cc
|
| @@ -578,28 +578,29 @@ GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32 route_id) {
|
| return stubs_.Lookup(route_id);
|
| }
|
|
|
| -void GpuChannel::CreateImage(
|
| - gfx::PluginWindowHandle window,
|
| - int32 image_id,
|
| - gfx::Size* size) {
|
| +bool GpuChannel::CreateImage(
|
| + const gfx::GpuMemoryBufferHandle& handle,
|
| + const gfx::Size& size,
|
| + unsigned internalformat,
|
| + int32 image_id) {
|
| TRACE_EVENT1("gpu",
|
| "GpuChannel::CreateImage",
|
| "image_id",
|
| image_id);
|
|
|
| - *size = gfx::Size();
|
| -
|
| if (image_manager_->LookupImage(image_id)) {
|
| LOG(ERROR) << "CreateImage failed, image_id already in use.";
|
| - return;
|
| + return false;
|
| }
|
|
|
| - scoped_refptr<gfx::GLImage> image = gfx::GLImage::CreateGLImage(window);
|
| + scoped_refptr<gfx::GLImage> image =
|
| + gfx::GLImage::CreateGLImageForGpuMemoryBuffer(
|
| + handle, size, internalformat);
|
| if (!image.get())
|
| - return;
|
| + return false;
|
|
|
| image_manager_->AddImage(image.get(), image_id);
|
| - *size = image->GetSize();
|
| + return true;
|
| }
|
|
|
| void GpuChannel::DeleteImage(int32 image_id) {
|
|
|