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

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

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.h
diff --git a/content/common/gpu/gpu_memory_buffer_factory_io_surface.h b/content/common/gpu/gpu_memory_buffer_factory_io_surface.h
index eac05adb58a37e96011373fa49563e5ec9dbe204..8a07faab48254613c93b2a80c9613a4975690ba8 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.h
+++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.h
@@ -11,6 +11,7 @@
#include "base/mac/scoped_cftyperef.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
+#include "base/threading/thread_checker.h"
#include "content/common/gpu/gpu_memory_buffer_factory.h"
#include "gpu/command_buffer/service/image_factory.h"
#include "ui/gfx/geometry/size.h"
@@ -60,6 +61,7 @@ class GpuMemoryBufferFactoryIOSurface : public GpuMemoryBufferFactory,
IOSurfaceMap;
IOSurfaceMap io_surfaces_;
base::Lock io_surfaces_lock_;
+ base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactoryIOSurface);
};

Powered by Google App Engine
This is Rietveld 408576698