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

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

Issue 1280513002: Add GenericSharedMemoryId and use w/ GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trackpools
Patch Set: Feedback Created 5 years, 4 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_memory_buffer_factory_io_surface.cc
diff --git a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
index eeec46039404502fccf79b4e59ea3d3154d6dc90..b6602605c5362a97906757e5ef0a7ea092a346ce 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
@@ -125,7 +125,7 @@ GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
if (!io_surface)
return gfx::GpuMemoryBufferHandle();
- if (!IOSurfaceManager::GetInstance()->RegisterIOSurface(id, client_id,
+ if (!IOSurfaceManager::GetInstance()->RegisterIOSurface(id.id, client_id,
io_surface)) {
return gfx::GpuMemoryBufferHandle();
}
@@ -133,7 +133,7 @@ GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
{
base::AutoLock lock(io_surfaces_lock_);
- IOSurfaceMapKey key(id, client_id);
+ IOSurfaceMapKey key(id.id, client_id);
DCHECK(io_surfaces_.find(key) == io_surfaces_.end());
io_surfaces_[key] = io_surface;
}
@@ -150,12 +150,12 @@ void GpuMemoryBufferFactoryIOSurface::DestroyGpuMemoryBuffer(
{
base::AutoLock lock(io_surfaces_lock_);
- IOSurfaceMapKey key(id, client_id);
+ IOSurfaceMapKey key(id.id, client_id);
DCHECK(io_surfaces_.find(key) != io_surfaces_.end());
io_surfaces_.erase(key);
}
- IOSurfaceManager::GetInstance()->UnregisterIOSurface(id, client_id);
+ IOSurfaceManager::GetInstance()->UnregisterIOSurface(id.id, client_id);
}
gpu::ImageFactory* GpuMemoryBufferFactoryIOSurface::AsImageFactory() {
@@ -172,7 +172,7 @@ GpuMemoryBufferFactoryIOSurface::CreateImageForGpuMemoryBuffer(
base::AutoLock lock(io_surfaces_lock_);
DCHECK_EQ(handle.type, gfx::IO_SURFACE_BUFFER);
- IOSurfaceMapKey key(handle.id, client_id);
+ IOSurfaceMapKey key(handle.id.id, client_id);
IOSurfaceMap::iterator it = io_surfaces_.find(key);
if (it == io_surfaces_.end())
return scoped_refptr<gfx::GLImage>();

Powered by Google App Engine
This is Rietveld 408576698