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

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

Issue 1389133002: content: Use type-parameterized tests for GpuMemoryBuffer implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add blankline Created 5 years, 2 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.h
diff --git a/content/common/gpu/gpu_memory_buffer_factory.h b/content/common/gpu/gpu_memory_buffer_factory.h
index 1269c960f203f0cd3c69896eb9c282c274b0f7f5..7edb0e44318d2e5e4e6b0dbd053f6eac1fd0d556 100644
--- a/content/common/gpu/gpu_memory_buffer_factory.h
+++ b/content/common/gpu/gpu_memory_buffer_factory.h
@@ -26,24 +26,14 @@ namespace content {
class CONTENT_EXPORT GpuMemoryBufferFactory {
public:
- struct Configuration {
- gfx::BufferFormat format;
- gfx::BufferUsage usage;
- };
-
virtual ~GpuMemoryBufferFactory() {}
- // Gets system supported GPU memory buffer factory types. Preferred type at
- // the front of vector.
- static void GetSupportedTypes(std::vector<gfx::GpuMemoryBufferType>* types);
-
- // Creates a new factory instance for |type|.
- static scoped_ptr<GpuMemoryBufferFactory> Create(
- gfx::GpuMemoryBufferType type);
+ // Returns the native GPU memory buffer factory type. Returns EMPTY_BUFFER
+ // type if native buffers are not supported.
+ static gfx::GpuMemoryBufferType GetNativeType();
- // Gets supported format/usage configurations.
- virtual void GetSupportedGpuMemoryBufferConfigurations(
- std::vector<Configuration>* configurations) = 0;
+ // Creates a new factory instance for native GPU memory buffers.
+ static scoped_ptr<GpuMemoryBufferFactory> CreateNativeType();
// Creates a new GPU memory buffer instance. A valid handle is returned on
// success. It can be called on any thread.
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl_unittest.cc ('k') | content/common/gpu/gpu_memory_buffer_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698