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

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

Issue 685983005: gpu: Associate all GpuMemoryBuffers with unique IDs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/browser/gpu/gpu_memory_buffer_factory_host_impl.cc
diff --git a/content/browser/gpu/gpu_memory_buffer_factory_host_impl.cc b/content/browser/gpu/gpu_memory_buffer_factory_host_impl.cc
index 10112cbf013ed22c7228c66e656245e5bbed8932..f577282ec6ac1c6febca56a92099785aab427221 100644
--- a/content/browser/gpu/gpu_memory_buffer_factory_host_impl.cc
+++ b/content/browser/gpu/gpu_memory_buffer_factory_host_impl.cc
@@ -19,10 +19,12 @@ GpuMemoryBufferFactoryHostImpl::~GpuMemoryBufferFactoryHostImpl() {
}
void GpuMemoryBufferFactoryHostImpl::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) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -36,17 +38,21 @@ void GpuMemoryBufferFactoryHostImpl::CreateGpuMemoryBuffer(
create_gpu_memory_buffer_requests_[request_id] = callback;
host->CreateGpuMemoryBuffer(
- handle,
+ type,
+ id,
size,
format,
usage,
+ client_id,
base::Bind(&GpuMemoryBufferFactoryHostImpl::OnGpuMemoryBufferCreated,
base::Unretained(this),
request_id));
}
void GpuMemoryBufferFactoryHostImpl::DestroyGpuMemoryBuffer(
- const gfx::GpuMemoryBufferHandle& handle,
+ gfx::GpuMemoryBufferType type,
+ gfx::GpuMemoryBufferId id,
+ int client_id,
int32 sync_point) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -54,7 +60,7 @@ void GpuMemoryBufferFactoryHostImpl::DestroyGpuMemoryBuffer(
if (!host)
return;
- host->DestroyGpuMemoryBuffer(handle, sync_point);
+ host->DestroyGpuMemoryBuffer(type, id, client_id, sync_point);
}
void GpuMemoryBufferFactoryHostImpl::OnGpuMemoryBufferCreated(

Powered by Google App Engine
This is Rietveld 408576698