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

Unified Diff: ui/gfx/buffer_types.h

Issue 1375663002: Show GpuMemoryBuffer feature in chrome://gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: display a matrix of formats and usages Created 5 years, 2 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 | « content/browser/resources/gpu/info_view.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/buffer_types.h
diff --git a/ui/gfx/buffer_types.h b/ui/gfx/buffer_types.h
index b25f3dfcd4bee7986cecac3673868fed91abeb53..82f95fa57eb50c3ae6758d18f00250828cc31fad 100644
--- a/ui/gfx/buffer_types.h
+++ b/ui/gfx/buffer_types.h
@@ -34,6 +34,32 @@ enum class BufferFormat {
// contents.
enum class BufferUsage { MAP, PERSISTENT_MAP, SCANOUT, LAST = SCANOUT };
+inline const char* BufferFormatToString(BufferFormat format) {
+ switch (format) {
+ case BufferFormat::ATC: return "ATC";
+ case BufferFormat::ATCIA: return "ATCIA";
+ case BufferFormat::DXT1: return "DXT1";
+ case BufferFormat::DXT5: return "DXT5";
+ case BufferFormat::ETC1: return "ETC1";
+ case BufferFormat::R_8: return "R_8";
+ case BufferFormat::RGBA_4444: return "RGBA_4444";
+ case BufferFormat::RGBA_8888: return "RGBA_8888";
+ case BufferFormat::BGRX_8888: return "BGRX_8888";
+ case BufferFormat::BGRA_8888: return "BGRA_8888";
+ case BufferFormat::YUV_420: return "YUV_420";
+ case BufferFormat::YUV_420_BIPLANAR: return "YUV_420_BIPLANAR";
+ case BufferFormat::UYVY_422: return "UYVY_422";
+ }
+}
+
+inline const char* BufferUsageToString(BufferUsage usage) {
+ switch (usage) {
+ case BufferUsage::MAP: return "MAP";
+ case BufferUsage::PERSISTENT_MAP: return "PERSISTENT_MAP";
+ case BufferUsage::SCANOUT: return "SCANOUT";
+ }
+}
+
vignatti (out of this project) 2015/10/26 20:55:49 reveman@ do you think it's worth doing this global
reveman 2015/10/26 21:09:20 I'd keep it local for now and we can move it hear
} // namespace gfx
#endif // UI_GFX_BUFFER_TYPES_H_
« no previous file with comments | « content/browser/resources/gpu/info_view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698