| 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 01fc786970736c39ede146f1b5e023215a84dd89..73413970de2ea2195ec3edfc92b829256f9c8641 100644
|
| --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| @@ -296,17 +296,21 @@ bool BrowserGpuChannelHostFactory::CreateViewCommandBuffer(
|
| }
|
|
|
| void BrowserGpuChannelHostFactory::CreateImageOnIO(
|
| - gfx::PluginWindowHandle window,
|
| + const gfx::GpuMemoryBufferHandle& handle,
|
| + const gfx::Size& size,
|
| + unsigned internalformat,
|
| int32 image_id,
|
| const CreateImageCallback& callback) {
|
| GpuProcessHost* host = GpuProcessHost::FromID(gpu_host_id_);
|
| if (!host) {
|
| - ImageCreatedOnIO(callback, gfx::Size());
|
| + ImageCreatedOnIO(callback, false);
|
| return;
|
| }
|
|
|
| host->CreateImage(
|
| - window,
|
| + handle,
|
| + size,
|
| + internalformat,
|
| gpu_client_id_,
|
| image_id,
|
| base::Bind(&BrowserGpuChannelHostFactory::ImageCreatedOnIO, callback));
|
| @@ -314,29 +318,33 @@ void BrowserGpuChannelHostFactory::CreateImageOnIO(
|
|
|
| // static
|
| void BrowserGpuChannelHostFactory::ImageCreatedOnIO(
|
| - const CreateImageCallback& callback, const gfx::Size size) {
|
| + const CreateImageCallback& callback, bool succeeded) {
|
| BrowserThread::PostTask(
|
| BrowserThread::UI,
|
| FROM_HERE,
|
| base::Bind(&BrowserGpuChannelHostFactory::OnImageCreated,
|
| - callback, size));
|
| + callback, succeeded));
|
| }
|
|
|
| // static
|
| void BrowserGpuChannelHostFactory::OnImageCreated(
|
| - const CreateImageCallback& callback, const gfx::Size size) {
|
| - callback.Run(size);
|
| + const CreateImageCallback& callback, bool succeeded) {
|
| + callback.Run(succeeded);
|
| }
|
|
|
| void BrowserGpuChannelHostFactory::CreateImage(
|
| - gfx::PluginWindowHandle window,
|
| + const gfx::GpuMemoryBufferHandle& handle,
|
| + const gfx::Size& size,
|
| + unsigned internalformat,
|
| int32 image_id,
|
| const CreateImageCallback& callback) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| GetIOLoopProxy()->PostTask(FROM_HERE, base::Bind(
|
| &BrowserGpuChannelHostFactory::CreateImageOnIO,
|
| base::Unretained(this),
|
| - window,
|
| + handle,
|
| + size,
|
| + internalformat,
|
| image_id,
|
| callback));
|
| }
|
|
|