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

Side by Side Diff: ui/gfx/mojo/buffer_types_struct_traits.h

Issue 2786103003: Add half-float IOSurface GpuMemoryBuffer support (Closed)
Patch Set: Review feedback Created 3 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
« no previous file with comments | « ui/gfx/mojo/buffer_types.mojom ('k') | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_ 5 #ifndef UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_
6 #define UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_ 6 #define UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_
7 7
8 #include "ui/gfx/buffer_types.h" 8 #include "ui/gfx/buffer_types.h"
9 #include "ui/gfx/mojo/buffer_types.mojom.h" 9 #include "ui/gfx/mojo/buffer_types.mojom.h"
10 10
(...skipping 22 matching lines...) Expand all
33 case gfx::BufferFormat::RGBA_4444: 33 case gfx::BufferFormat::RGBA_4444:
34 return gfx::mojom::BufferFormat::RGBA_4444; 34 return gfx::mojom::BufferFormat::RGBA_4444;
35 case gfx::BufferFormat::RGBX_8888: 35 case gfx::BufferFormat::RGBX_8888:
36 return gfx::mojom::BufferFormat::RGBX_8888; 36 return gfx::mojom::BufferFormat::RGBX_8888;
37 case gfx::BufferFormat::RGBA_8888: 37 case gfx::BufferFormat::RGBA_8888:
38 return gfx::mojom::BufferFormat::RGBA_8888; 38 return gfx::mojom::BufferFormat::RGBA_8888;
39 case gfx::BufferFormat::BGRX_8888: 39 case gfx::BufferFormat::BGRX_8888:
40 return gfx::mojom::BufferFormat::BGRX_8888; 40 return gfx::mojom::BufferFormat::BGRX_8888;
41 case gfx::BufferFormat::BGRA_8888: 41 case gfx::BufferFormat::BGRA_8888:
42 return gfx::mojom::BufferFormat::BGRA_8888; 42 return gfx::mojom::BufferFormat::BGRA_8888;
43 case gfx::BufferFormat::RGBA_F16:
44 return gfx::mojom::BufferFormat::RGBA_F16;
43 case gfx::BufferFormat::YVU_420: 45 case gfx::BufferFormat::YVU_420:
44 return gfx::mojom::BufferFormat::YVU_420; 46 return gfx::mojom::BufferFormat::YVU_420;
45 case gfx::BufferFormat::YUV_420_BIPLANAR: 47 case gfx::BufferFormat::YUV_420_BIPLANAR:
46 return gfx::mojom::BufferFormat::YUV_420_BIPLANAR; 48 return gfx::mojom::BufferFormat::YUV_420_BIPLANAR;
47 case gfx::BufferFormat::UYVY_422: 49 case gfx::BufferFormat::UYVY_422:
48 return gfx::mojom::BufferFormat::UYVY_422; 50 return gfx::mojom::BufferFormat::UYVY_422;
49 } 51 }
50 NOTREACHED(); 52 NOTREACHED();
51 return gfx::mojom::BufferFormat::LAST; 53 return gfx::mojom::BufferFormat::LAST;
52 } 54 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 return true; 88 return true;
87 case gfx::mojom::BufferFormat::RGBA_8888: 89 case gfx::mojom::BufferFormat::RGBA_8888:
88 *out = gfx::BufferFormat::RGBA_8888; 90 *out = gfx::BufferFormat::RGBA_8888;
89 return true; 91 return true;
90 case gfx::mojom::BufferFormat::BGRX_8888: 92 case gfx::mojom::BufferFormat::BGRX_8888:
91 *out = gfx::BufferFormat::BGRX_8888; 93 *out = gfx::BufferFormat::BGRX_8888;
92 return true; 94 return true;
93 case gfx::mojom::BufferFormat::BGRA_8888: 95 case gfx::mojom::BufferFormat::BGRA_8888:
94 *out = gfx::BufferFormat::BGRA_8888; 96 *out = gfx::BufferFormat::BGRA_8888;
95 return true; 97 return true;
98 case gfx::mojom::BufferFormat::RGBA_F16:
99 *out = gfx::BufferFormat::RGBA_F16;
100 return true;
96 case gfx::mojom::BufferFormat::YVU_420: 101 case gfx::mojom::BufferFormat::YVU_420:
97 *out = gfx::BufferFormat::YVU_420; 102 *out = gfx::BufferFormat::YVU_420;
98 return true; 103 return true;
99 case gfx::mojom::BufferFormat::YUV_420_BIPLANAR: 104 case gfx::mojom::BufferFormat::YUV_420_BIPLANAR:
100 *out = gfx::BufferFormat::YUV_420_BIPLANAR; 105 *out = gfx::BufferFormat::YUV_420_BIPLANAR;
101 return true; 106 return true;
102 case gfx::mojom::BufferFormat::UYVY_422: 107 case gfx::mojom::BufferFormat::UYVY_422:
103 *out = gfx::BufferFormat::UYVY_422; 108 *out = gfx::BufferFormat::UYVY_422;
104 } 109 }
105 NOTREACHED(); 110 NOTREACHED();
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 static const gfx::NativePixmapHandle& native_pixmap_handle( 280 static const gfx::NativePixmapHandle& native_pixmap_handle(
276 const gfx::GpuMemoryBufferHandle& handle); 281 const gfx::GpuMemoryBufferHandle& handle);
277 static mojo::ScopedHandle mach_port(const gfx::GpuMemoryBufferHandle& handle); 282 static mojo::ScopedHandle mach_port(const gfx::GpuMemoryBufferHandle& handle);
278 static bool Read(gfx::mojom::GpuMemoryBufferHandleDataView data, 283 static bool Read(gfx::mojom::GpuMemoryBufferHandleDataView data,
279 gfx::GpuMemoryBufferHandle* handle); 284 gfx::GpuMemoryBufferHandle* handle);
280 }; 285 };
281 286
282 } // namespace mojo 287 } // namespace mojo
283 288
284 #endif // UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_ 289 #endif // UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « ui/gfx/mojo/buffer_types.mojom ('k') | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698