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

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: 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_memory_buffer_factory_host_impl.h ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1719d037de86ce1cf89404757ac441f619803865..e57bd0c728c924373e8279e1464aeef98d5c2ec7 100644
--- a/content/browser/gpu/gpu_memory_buffer_factory_host_impl.cc
+++ b/content/browser/gpu/gpu_memory_buffer_factory_host_impl.cc
@@ -19,28 +19,12 @@ GpuMemoryBufferFactoryHostImpl::~GpuMemoryBufferFactoryHostImpl() {
}
void GpuMemoryBufferFactoryHostImpl::CreateGpuMemoryBuffer(
- const gfx::GpuMemoryBufferHandle& handle,
- const gfx::Size& size,
- gfx::GpuMemoryBuffer::Format format,
- gfx::GpuMemoryBuffer::Usage usage,
- const CreateGpuMemoryBufferCallback& callback) {
- BrowserThread::PostTask(
- BrowserThread::IO,
- FROM_HERE,
- base::Bind(&GpuMemoryBufferFactoryHostImpl::CreateGpuMemoryBufferOnIO,
- base::Unretained(this),
- handle,
- size,
- format,
- usage,
- callback));
-}
-
-void GpuMemoryBufferFactoryHostImpl::CreateGpuMemoryBufferOnIO(
- 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));
@@ -54,29 +38,37 @@ void GpuMemoryBufferFactoryHostImpl::CreateGpuMemoryBufferOnIO(
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) {
BrowserThread::PostTask(
BrowserThread::IO,
FROM_HERE,
base::Bind(&GpuMemoryBufferFactoryHostImpl::DestroyGpuMemoryBufferOnIO,
base::Unretained(this),
- handle,
+ type,
+ id,
+ client_id,
sync_point));
}
void GpuMemoryBufferFactoryHostImpl::DestroyGpuMemoryBufferOnIO(
- const gfx::GpuMemoryBufferHandle& handle,
+ gfx::GpuMemoryBufferType type,
+ gfx::GpuMemoryBufferId id,
+ int client_id,
int32 sync_point) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -84,7 +76,7 @@ void GpuMemoryBufferFactoryHostImpl::DestroyGpuMemoryBufferOnIO(
if (!host)
return;
- host->DestroyGpuMemoryBuffer(handle, sync_point);
+ host->DestroyGpuMemoryBuffer(type, id, client_id, sync_point);
}
void GpuMemoryBufferFactoryHostImpl::OnGpuMemoryBufferCreated(
« no previous file with comments | « content/browser/gpu/gpu_memory_buffer_factory_host_impl.h ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698