| 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 604c1b4927388f956c415939b023ce24b242932c..b6135497b5a56bf168efe1bbfd1ecf7628bcb314 100644
|
| --- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
|
| +++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
|
| @@ -104,6 +104,7 @@ GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
|
| gfx::GpuMemoryBuffer::Usage usage,
|
| int client_id,
|
| gfx::PluginWindowHandle surface_handle) {
|
| + DCHECK(thread_checker_.CalledOnValidThread());
|
| base::ScopedCFTypeRef<CFMutableDictionaryRef> properties;
|
| properties.reset(CFDictionaryCreateMutable(kCFAllocatorDefault,
|
| 0,
|
| @@ -121,13 +122,9 @@ GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
|
| if (!io_surface)
|
| return gfx::GpuMemoryBufferHandle();
|
|
|
| - {
|
| - base::AutoLock lock(io_surfaces_lock_);
|
| -
|
| - IOSurfaceMapKey key(id, client_id);
|
| - DCHECK(io_surfaces_.find(key) == io_surfaces_.end());
|
| - io_surfaces_[key] = io_surface;
|
| - }
|
| + IOSurfaceMapKey key(id, client_id);
|
| + DCHECK(io_surfaces_.find(key) == io_surfaces_.end());
|
| + io_surfaces_[key] = io_surface;
|
|
|
| gfx::GpuMemoryBufferHandle handle;
|
| handle.type = gfx::IO_SURFACE_BUFFER;
|
| @@ -139,8 +136,7 @@ GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
|
| void GpuMemoryBufferFactoryIOSurface::DestroyGpuMemoryBuffer(
|
| gfx::GpuMemoryBufferId id,
|
| int client_id) {
|
| - base::AutoLock lock(io_surfaces_lock_);
|
| -
|
| + DCHECK(thread_checker_.CalledOnValidThread());
|
| IOSurfaceMapKey key(id, client_id);
|
| IOSurfaceMap::iterator it = io_surfaces_.find(key);
|
| if (it != io_surfaces_.end())
|
| @@ -158,8 +154,7 @@ GpuMemoryBufferFactoryIOSurface::CreateImageForGpuMemoryBuffer(
|
| gfx::GpuMemoryBuffer::Format format,
|
| unsigned internalformat,
|
| int client_id) {
|
| - base::AutoLock lock(io_surfaces_lock_);
|
| -
|
| + DCHECK(thread_checker_.CalledOnValidThread());
|
| DCHECK_EQ(handle.type, gfx::IO_SURFACE_BUFFER);
|
| IOSurfaceMapKey key(handle.id, client_id);
|
| IOSurfaceMap::iterator it = io_surfaces_.find(key);
|
|
|