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

Unified Diff: content/browser/gpu/gpu_process_host.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/browser/gpu/gpu_process_host.h ('k') | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7c181a8396dd928e93bb7e95d762c9c701776266..be7db476b0bd1524ac6e51a8884a709403fbd2e3 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -651,30 +651,40 @@ void GpuProcessHost::CreateViewCommandBuffer(
}
void GpuProcessHost::CreateGpuMemoryBuffer(
- const gfx::GpuMemoryBufferHandle& handle,
+ gfx::GpuMemoryBufferType type,
+ gfx::GpuMemoryBufferId id,
const gfx::Size& size,
gfx::GpuMemoryBuffer::Format format,
gfx::GpuMemoryBuffer::Usage usage,
+ int client_id,
const CreateGpuMemoryBufferCallback& callback) {
TRACE_EVENT0("gpu", "GpuProcessHost::CreateGpuMemoryBuffer");
DCHECK(CalledOnValidThread());
- if (Send(new GpuMsg_CreateGpuMemoryBuffer(handle, size, format, usage))) {
+ GpuMsg_CreateGpuMemoryBuffer_Params params;
+ params.type = type;
+ params.id = id;
+ params.size = size;
+ params.format = format;
+ params.usage = usage;
+ params.client_id = client_id;
+ if (Send(new GpuMsg_CreateGpuMemoryBuffer(params))) {
create_gpu_memory_buffer_requests_.push(callback);
} else {
callback.Run(gfx::GpuMemoryBufferHandle());
}
}
-void GpuProcessHost::DestroyGpuMemoryBuffer(
- const gfx::GpuMemoryBufferHandle& handle,
- int sync_point) {
+void GpuProcessHost::DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferType type,
+ gfx::GpuMemoryBufferId id,
+ int client_id,
+ int sync_point) {
TRACE_EVENT0("gpu", "GpuProcessHost::DestroyGpuMemoryBuffer");
DCHECK(CalledOnValidThread());
- Send(new GpuMsg_DestroyGpuMemoryBuffer(handle, sync_point));
+ Send(new GpuMsg_DestroyGpuMemoryBuffer(type, id, client_id, sync_point));
}
void GpuProcessHost::OnInitialized(bool result, const gpu::GPUInfo& gpu_info) {
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698