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

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

Issue 1050923003: zero-copy: Clarify to allocate/destroy GpuMemoryBuffer on any thread and use it on the main thread o (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just add thread check Created 5 years, 8 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 604c1b4927388f956c415939b023ce24b242932c..6d54be4c2ef55a7857e0f1788adcc36c7d40b759 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
@@ -159,7 +159,7 @@ GpuMemoryBufferFactoryIOSurface::CreateImageForGpuMemoryBuffer(
unsigned internalformat,
int client_id) {
base::AutoLock lock(io_surfaces_lock_);
-
+ DCHECK(thread_checker_.CalledOnValidThread());
reveman 2015/04/07 13:07:05 I don't think we want a thread checker here as tha
dshwang 2015/04/07 14:04:26 We allow CreateGpuMemoryBuffer() to be called on a
reveman 2015/04/07 14:22:00 Sorry I misread this change. Yes, image creation
DCHECK_EQ(handle.type, gfx::IO_SURFACE_BUFFER);
IOSurfaceMapKey key(handle.id, client_id);
IOSurfaceMap::iterator it = io_surfaces_.find(key);

Powered by Google App Engine
This is Rietveld 408576698