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

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

Issue 1831513003: Pull gpu service/client shared memory buffer code to GpuMemoryBufferSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed ifdef mixup Created 4 years, 9 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/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "gpu/ipc/common/surface_handle.h" 14 #include "gpu/ipc/common/surface_handle.h"
15 #include "ui/gfx/geometry/size.h" 15 #include "ui/gfx/geometry/size.h"
16 #include "ui/gfx/gpu_memory_buffer.h" 16 #include "ui/gfx/gpu_memory_buffer.h"
17 17
18 namespace gpu { 18 namespace gpu {
19 class ImageFactory; 19 class ImageFactory;
20 } 20 }
21 21
22 namespace content { 22 namespace content {
23 23
24 class CONTENT_EXPORT GpuMemoryBufferFactory { 24 class CONTENT_EXPORT GpuMemoryBufferFactory {
25 public: 25 public:
26 virtual ~GpuMemoryBufferFactory() {} 26 virtual ~GpuMemoryBufferFactory() {}
27 27
28 // Returns the native GPU memory buffer factory type. Returns EMPTY_BUFFER
29 // type if native buffers are not supported.
30 static gfx::GpuMemoryBufferType GetNativeType();
31
32 // Creates a new factory instance for native GPU memory buffers. 28 // Creates a new factory instance for native GPU memory buffers.
33 static scoped_ptr<GpuMemoryBufferFactory> CreateNativeType(); 29 static scoped_ptr<GpuMemoryBufferFactory> CreateNativeType();
34 30
35 // Creates a new GPU memory buffer instance. A valid handle is returned on 31 // Creates a new GPU memory buffer instance. A valid handle is returned on
36 // success. It can be called on any thread. 32 // success. It can be called on any thread.
37 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( 33 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer(
38 gfx::GpuMemoryBufferId id, 34 gfx::GpuMemoryBufferId id,
39 const gfx::Size& size, 35 const gfx::Size& size,
40 gfx::BufferFormat format, 36 gfx::BufferFormat format,
41 gfx::BufferUsage usage, 37 gfx::BufferUsage usage,
(...skipping 20 matching lines...) Expand all
62 protected: 58 protected:
63 GpuMemoryBufferFactory() {} 59 GpuMemoryBufferFactory() {}
64 60
65 private: 61 private:
66 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory); 62 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory);
67 }; 63 };
68 64
69 } // namespace content 65 } // namespace content
70 66
71 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ 67 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698