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

Side by Side Diff: ui/gfx/gpu_memory_buffer.h

Issue 1062853002: Add gfx::GpuMemoryBuffer::YUV_420 and GpuMemoryBufferImplSharedMemory support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 UI_GFX_GPU_MEMORY_BUFFER_H_ 5 #ifndef UI_GFX_GPU_MEMORY_BUFFER_H_
6 #define UI_GFX_GPU_MEMORY_BUFFER_H_ 6 #define UI_GFX_GPU_MEMORY_BUFFER_H_
7 7
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "ui/gfx/gfx_export.h" 10 #include "ui/gfx/gfx_export.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // client's address space. 44 // client's address space.
45 enum Format { 45 enum Format {
46 ATC, 46 ATC,
47 ATCIA, 47 ATCIA,
48 DXT1, 48 DXT1,
49 DXT5, 49 DXT5,
50 ETC1, 50 ETC1,
51 RGBA_8888, 51 RGBA_8888,
52 RGBX_8888, 52 RGBX_8888,
53 BGRA_8888, 53 BGRA_8888,
54 YUV_420,
54 55
55 FORMAT_LAST = BGRA_8888 56 FORMAT_LAST = YUV_420
56 }; 57 };
57 58
58 // The usage mode affects how a buffer can be used. Only buffers created with 59 // The usage mode affects how a buffer can be used. Only buffers created with
59 // MAP can be mapped into the client's address space and accessed by the CPU. 60 // MAP can be mapped into the client's address space and accessed by the CPU.
60 enum Usage { MAP, SCANOUT, USAGE_LAST = SCANOUT }; 61 enum Usage { MAP, SCANOUT, USAGE_LAST = SCANOUT };
61 62
62 virtual ~GpuMemoryBuffer() {} 63 virtual ~GpuMemoryBuffer() {}
63 64
64 // Maps each plane of the buffer into the client's address space so it can be 65 // Maps each plane of the buffer into the client's address space so it can be
65 // written to by the CPU. A pointer to plane K is stored at index K-1 of the 66 // written to by the CPU. A pointer to plane K is stored at index K-1 of the
(...skipping 19 matching lines...) Expand all
85 // Returns a platform specific handle for this buffer. 86 // Returns a platform specific handle for this buffer.
86 virtual GpuMemoryBufferHandle GetHandle() const = 0; 87 virtual GpuMemoryBufferHandle GetHandle() const = 0;
87 88
88 // Type-checking downcast routine. 89 // Type-checking downcast routine.
89 virtual ClientBuffer AsClientBuffer() = 0; 90 virtual ClientBuffer AsClientBuffer() = 0;
90 }; 91 };
91 92
92 } // namespace gfx 93 } // namespace gfx
93 94
94 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ 95 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698