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

Side by Side Diff: content/common/gpu/gpu_memory_buffer_factory.h

Issue 1139903005: Add PERSISTENT_MAP usage for GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: persistentmap: . Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 17 matching lines...) Expand all
28 public: 28 public:
29 struct Configuration { 29 struct Configuration {
30 gfx::GpuMemoryBuffer::Format format; 30 gfx::GpuMemoryBuffer::Format format;
31 gfx::GpuMemoryBuffer::Usage usage; 31 gfx::GpuMemoryBuffer::Usage usage;
32 }; 32 };
33 33
34 virtual ~GpuMemoryBufferFactory() {} 34 virtual ~GpuMemoryBufferFactory() {}
35 35
36 // Gets system supported GPU memory buffer factory types. Preferred type at 36 // Gets system supported GPU memory buffer factory types. Preferred type at
37 // the front of vector. 37 // the front of vector.
38 static void GetSupportedTypes(std::vector<gfx::GpuMemoryBufferType>* types); 38 static void GetSupportedTypes(gfx::GpuMemoryBuffer::Usage usage,
39 std::vector<gfx::GpuMemoryBufferType>* types);
reveman 2015/05/19 16:12:12 I'd rather not change this function. It might be r
39 40
40 // Creates a new factory instance for |type|. 41 // Creates a new factory instance for |type|.
41 static scoped_ptr<GpuMemoryBufferFactory> Create( 42 static scoped_ptr<GpuMemoryBufferFactory> Create(
42 gfx::GpuMemoryBufferType type); 43 gfx::GpuMemoryBufferType type);
43 44
44 // Gets supported format/usage configurations. 45 // Gets supported format/usage configurations.
45 virtual void GetSupportedGpuMemoryBufferConfigurations( 46 virtual void GetSupportedGpuMemoryBufferConfigurations(
46 std::vector<Configuration>* configurations) = 0; 47 std::vector<Configuration>* configurations) = 0;
47 48
48 // Creates a new GPU memory buffer instance. A valid handle is returned on 49 // Creates a new GPU memory buffer instance. A valid handle is returned on
(...skipping 17 matching lines...) Expand all
66 protected: 67 protected:
67 GpuMemoryBufferFactory() {} 68 GpuMemoryBufferFactory() {}
68 69
69 private: 70 private:
70 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory); 71 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory);
71 }; 72 };
72 73
73 } // namespace content 74 } // namespace content
74 75
75 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ 76 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698