| Index: content/common/gpu/gpu_channel.cc
|
| diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
|
| index 6262ed5e071c478ebf16be0d95bac09b16e175de..7a90379476c9716e7e38e65b1f1ba9e5177b9879 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) {
|
|
|