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

Unified Diff: content/browser/gpu/gpu_process_host.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/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 721fa41f529771ebe50e94a76749209923ebd49d..1a3ab91d651683cb0ce21eb70a59152953a98df4 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -648,7 +648,9 @@ void GpuProcessHost::CreateViewCommandBuffer(
}
}
-void GpuProcessHost::CreateImage(gfx::PluginWindowHandle window,
+void GpuProcessHost::CreateImage(const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
int client_id,
int image_id,
const CreateImageCallback& callback) {
@@ -656,10 +658,11 @@ void GpuProcessHost::CreateImage(gfx::PluginWindowHandle window,
DCHECK(CalledOnValidThread());
- if (Send(new GpuMsg_CreateImage(window, client_id, image_id))) {
+ if (Send(new GpuMsg_CreateImage(
+ handle, size, internalformat, client_id, image_id))) {
create_image_requests_.push(callback);
} else {
- callback.Run(gfx::Size());
+ callback.Run(false);
}
}
@@ -763,7 +766,7 @@ void GpuProcessHost::OnDestroyCommandBuffer(int32 surface_id) {
}
}
-void GpuProcessHost::OnImageCreated(const gfx::Size size) {
+void GpuProcessHost::OnImageCreated(bool succeeded) {
TRACE_EVENT0("gpu", "GpuProcessHost::OnImageCreated");
if (create_image_requests_.empty())
@@ -771,7 +774,7 @@ void GpuProcessHost::OnImageCreated(const gfx::Size size) {
CreateImageCallback callback = create_image_requests_.front();
create_image_requests_.pop();
- callback.Run(size);
+ callback.Run(succeeded);
}
void GpuProcessHost::OnGpuMemoryBufferCreated(

Powered by Google App Engine
This is Rietveld 408576698