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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory_surface_texture.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_surface_texture.h
diff --git a/content/common/gpu/gpu_memory_buffer_factory_surface_texture.h b/content/common/gpu/gpu_memory_buffer_factory_surface_texture.h
index 24679b06c574a702497e9e4958f3e4d8d4f52f24..daec5b7a7bb9c82371c20018bc3a9e3053ade036 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_surface_texture.h
+++ b/content/common/gpu/gpu_memory_buffer_factory_surface_texture.h
@@ -8,6 +8,7 @@
#include "base/containers/hash_tables.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"
@@ -58,6 +59,7 @@ class GpuMemoryBufferFactorySurfaceTexture : public GpuMemoryBufferFactory,
scoped_refptr<gfx::SurfaceTexture>> SurfaceTextureMap;
SurfaceTextureMap surface_textures_;
base::Lock surface_textures_lock_;
+ base::ThreadChecker thread_checker_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698