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

Unified Diff: ui/gfx/mojo/buffer_types_struct_traits.h

Issue 2801683002: gfx: introduce GpuMemoryBufferAttrib to communicate format modifiers
Patch Set: purge enum BufferFormatModifier and use uint64_t modifiers 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/mojo/buffer_types.typemap ('k') | ui/gfx/mojo/buffer_types_struct_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/mojo/buffer_types_struct_traits.h
diff --git a/ui/gfx/mojo/buffer_types_struct_traits.h b/ui/gfx/mojo/buffer_types_struct_traits.h
index 1c8275260b150dbc8ac0bfca47ed371a7d79720f..b65dee4fd73f12f66aad5807ca11cc998086fccf 100644
--- a/ui/gfx/mojo/buffer_types_struct_traits.h
+++ b/ui/gfx/mojo/buffer_types_struct_traits.h
@@ -284,6 +284,19 @@ struct StructTraits<gfx::mojom::GpuMemoryBufferHandleDataView,
gfx::GpuMemoryBufferHandle* handle);
};
+template <>
+struct StructTraits<gfx::mojom::GpuMemoryBufferAttribDataView,
+ gfx::GpuMemoryBufferAttrib> {
+ static gfx::BufferFormat format(const gfx::GpuMemoryBufferAttrib attrib) {
+ return attrib.format;
+ }
+ static uint64_t modifier(const gfx::GpuMemoryBufferAttrib attrib) {
+ return attrib.modifier;
+ }
+ static bool Read(gfx::mojom::GpuMemoryBufferAttribDataView attrib,
+ gfx::GpuMemoryBufferAttrib* out);
+};
+
} // namespace mojo
#endif // UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_
« no previous file with comments | « ui/gfx/mojo/buffer_types.typemap ('k') | ui/gfx/mojo/buffer_types_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698