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

Side by Side Diff: gpu/command_buffer/client/gpu_memory_buffer_manager.h

Issue 1269503007: Unify graphics buffer format & usage enums for GpuMemoryBuffer & SurfaceFactoryOzone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add header to BUILD.gn Created 5 years, 4 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 GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "gpu/gpu_export.h" 9 #include "gpu/gpu_export.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
11 #include "ui/gfx/gpu_memory_buffer.h" 11 #include "ui/gfx/gpu_memory_buffer.h"
12 12
13 namespace gpu { 13 namespace gpu {
14 14
15 class GPU_EXPORT GpuMemoryBufferManager { 15 class GPU_EXPORT GpuMemoryBufferManager {
16 public: 16 public:
17 GpuMemoryBufferManager(); 17 GpuMemoryBufferManager();
18 18
19 // Allocates a GpuMemoryBuffer that can be shared with another process. 19 // Allocates a GpuMemoryBuffer that can be shared with another process.
20 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 20 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
21 const gfx::Size& size, 21 const gfx::Size& size,
22 gfx::GpuMemoryBuffer::Format format, 22 gfx::BufferFormat format,
23 gfx::GpuMemoryBuffer::Usage usage) = 0; 23 gfx::BufferUsage usage) = 0;
24 24
25 // Returns a GpuMemoryBuffer instance given a ClientBuffer. Returns NULL on 25 // Returns a GpuMemoryBuffer instance given a ClientBuffer. Returns NULL on
26 // failure. 26 // failure.
27 virtual gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( 27 virtual gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
28 ClientBuffer buffer) = 0; 28 ClientBuffer buffer) = 0;
29 29
30 // Associates destruction sync point with |buffer|. 30 // Associates destruction sync point with |buffer|.
31 virtual void SetDestructionSyncPoint(gfx::GpuMemoryBuffer* buffer, 31 virtual void SetDestructionSyncPoint(gfx::GpuMemoryBuffer* buffer,
32 uint32 sync_point) = 0; 32 uint32 sync_point) = 0;
33 33
34 protected: 34 protected:
35 virtual ~GpuMemoryBufferManager(); 35 virtual ~GpuMemoryBufferManager();
36 }; 36 };
37 37
38 } // namespace gpu 38 } // namespace gpu
39 39
40 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_ 40 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/renderer_gpu_video_accelerator_factories.cc ('k') | gpu/command_buffer/service/image_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698