Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Unified Diff: content/browser/gpu/browser_gpu_channel_host_factory.cc

Issue 331723003: gpu: Remove Create/DeleteImage IPC by adding an X11_PIXMAP_BUFFER GpuMemoryBuffer type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));
}

Powered by Google App Engine
This is Rietveld 408576698