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

Unified Diff: content/common/gpu/gpu_channel_manager.cc

Issue 685983005: gpu: Associate all GpuMemoryBuffers with unique IDs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more ozone build fix Created 6 years, 1 month 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
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_memory_buffer_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83530e19cdcce3da5ef3a94e4c929cdd03dd68d0..a073e20151edce4dc033a6d9e54bf3c0196b214a 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -54,19 +54,21 @@ class GpuChannelManagerMessageFilter : public IPC::MessageFilter {
protected:
~GpuChannelManagerMessageFilter() override {}
- void OnCreateGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
- const gfx::Size& size,
- gfx::GpuMemoryBuffer::Format format,
- gfx::GpuMemoryBuffer::Usage usage) {
+ void OnCreateGpuMemoryBuffer(
+ const GpuMsg_CreateGpuMemoryBuffer_Params& params) {
TRACE_EVENT2("gpu",
"GpuChannelManagerMessageFilter::OnCreateGpuMemoryBuffer",
- "primary_id",
- handle.global_id.primary_id,
- "secondary_id",
- handle.global_id.secondary_id);
+ "id",
+ params.id,
+ "client_id",
+ params.client_id);
sender_->Send(new GpuHostMsg_GpuMemoryBufferCreated(
- gpu_memory_buffer_factory_->CreateGpuMemoryBuffer(
- handle, size, format, usage)));
+ gpu_memory_buffer_factory_->CreateGpuMemoryBuffer(params.type,
+ params.id,
+ params.size,
+ params.format,
+ params.usage,
+ params.client_id)));
}
IPC::Sender* sender_;
@@ -235,31 +237,42 @@ void GpuChannelManager::OnCreateViewCommandBuffer(
Send(new GpuHostMsg_CommandBufferCreated(result));
}
+
void GpuChannelManager::DestroyGpuMemoryBuffer(
- const gfx::GpuMemoryBufferHandle& handle) {
+ gfx::GpuMemoryBufferType type,
+ gfx::GpuMemoryBufferId id,
+ int client_id) {
io_message_loop_->PostTask(
FROM_HERE,
base::Bind(&GpuChannelManager::DestroyGpuMemoryBufferOnIO,
base::Unretained(this),
- handle));
+ type,
+ id,
+ client_id));
}
void GpuChannelManager::DestroyGpuMemoryBufferOnIO(
- const gfx::GpuMemoryBufferHandle& handle) {
- gpu_memory_buffer_factory_->DestroyGpuMemoryBuffer(handle);
+ gfx::GpuMemoryBufferType type,
+ gfx::GpuMemoryBufferId id,
+ int client_id) {
+ gpu_memory_buffer_factory_->DestroyGpuMemoryBuffer(type, id, client_id);
}
void GpuChannelManager::OnDestroyGpuMemoryBuffer(
- const gfx::GpuMemoryBufferHandle& handle,
+ gfx::GpuMemoryBufferType type,
+ gfx::GpuMemoryBufferId id,
+ int client_id,
int32 sync_point) {
if (!sync_point) {
- DestroyGpuMemoryBuffer(handle);
+ DestroyGpuMemoryBuffer(type, id, client_id);
} else {
sync_point_manager()->AddSyncPointCallback(
sync_point,
base::Bind(&GpuChannelManager::DestroyGpuMemoryBuffer,
base::Unretained(this),
- handle));
+ type,
+ id,
+ client_id));
}
}
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_memory_buffer_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698