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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory.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: rephrase comment in gpu_channel_manager.cc 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
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | ui/gl/gl_image_egl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_memory_buffer_factory.h
diff --git a/content/common/gpu/gpu_memory_buffer_factory.h b/content/common/gpu/gpu_memory_buffer_factory.h
index 467944b63faff04f5a9c2be3cfb0923bddfe86ab..5eb0dfce1a93775074ca79fb72d16d38acee522a 100644
--- a/content/common/gpu/gpu_memory_buffer_factory.h
+++ b/content/common/gpu/gpu_memory_buffer_factory.h
@@ -31,7 +31,6 @@ class CONTENT_EXPORT GpuMemoryBufferFactory {
gfx::GpuMemoryBuffer::Usage usage;
};
- GpuMemoryBufferFactory() {}
virtual ~GpuMemoryBufferFactory() {}
// Gets system supported GPU memory buffer factory types. Preferred type at
@@ -47,7 +46,7 @@ class CONTENT_EXPORT GpuMemoryBufferFactory {
std::vector<Configuration>* configurations) = 0;
// Creates a new GPU memory buffer instance. A valid handle is returned on
- // success.
+ // success. It can be called on any thread.
virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer(
gfx::GpuMemoryBufferId id,
const gfx::Size& size,
@@ -57,12 +56,16 @@ class CONTENT_EXPORT GpuMemoryBufferFactory {
gfx::PluginWindowHandle surface_handle) = 0;
// Destroys GPU memory buffer identified by |id|.
+ // It can be called on any thread.
virtual void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
int client_id) = 0;
// Type-checking downcast routine.
virtual gpu::ImageFactory* AsImageFactory() = 0;
+ protected:
+ GpuMemoryBufferFactory() {}
+
private:
DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory);
};
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | ui/gl/gl_image_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698