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

Unified Diff: content/common/gpu/gpu_channel_manager.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/common/gpu/gpu_channel_manager.cc
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 899da86e45f047842ab902387c699c612cdb8844..dc281faefa07e15948d61782e71464d5e27ba8ae 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -183,28 +183,35 @@ void GpuChannelManager::OnCreateViewCommandBuffer(
}
void GpuChannelManager::CreateImage(
- gfx::PluginWindowHandle window, int32 client_id, int32 image_id) {
- gfx::Size size;
-
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ int32 client_id,
+ int32 image_id) {
GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id);
- if (iter != gpu_channels_.end()) {
- iter->second->CreateImage(window, image_id, &size);
- }
-
- Send(new GpuHostMsg_ImageCreated(size));
+ Send(new GpuHostMsg_ImageCreated(
+ iter != gpu_channels_.end()
+ ? iter->second->CreateImage(handle, size, internalformat, image_id)
+ : false));
}
void GpuChannelManager::OnCreateImage(
- gfx::PluginWindowHandle window, int32 client_id, int32 image_id) {
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ int32 client_id,
+ int32 image_id) {
DCHECK(image_id);
if (image_operations_.empty()) {
- CreateImage(window, client_id, image_id);
+ CreateImage(handle, size, internalformat, client_id, image_id);
} else {
image_operations_.push_back(
new ImageOperation(0, base::Bind(&GpuChannelManager::CreateImage,
base::Unretained(this),
- window,
+ handle,
+ size,
+ internalformat,
client_id,
image_id)));
}

Powered by Google App Engine
This is Rietveld 408576698