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

Unified Diff: ui/ozone/platform/drm/common/drm_util.cc

Issue 2920793005: gpu: support R16 GPUMemoryBuffer (Closed)
Patch Set: Fix reveman's comment Created 3 years, 6 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/gl/test/gl_image_test_support.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/common/drm_util.cc
diff --git a/ui/ozone/platform/drm/common/drm_util.cc b/ui/ozone/platform/drm/common/drm_util.cc
index 7d35a2a6c252fc4925ce6c3e6e0850518d80b138..02017de0ab78fd53a6bbdaca4bad0e4ab5157aff 100644
--- a/ui/ozone/platform/drm/common/drm_util.cc
+++ b/ui/ozone/platform/drm/common/drm_util.cc
@@ -17,6 +17,11 @@
#include "base/memory/ptr_util.h"
#include "ui/display/util/edid_parser.h"
+#if !defined(DRM_FORMAT_R16)
+// TODO(riju): after libdrm has this definition, remove it.
reveman 2017/06/20 18:45:38 nit: add a bug number here
riju_ 2017/06/21 07:53:19 Done.
+#define DRM_FORMAT_R16 fourcc_code('R', '1', '6', ' ')
+#endif
+
namespace ui {
namespace {
@@ -363,6 +368,8 @@ int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format) {
switch (format) {
case gfx::BufferFormat::R_8:
return DRM_FORMAT_R8;
+ case gfx::BufferFormat::R_16:
+ return DRM_FORMAT_R16;
case gfx::BufferFormat::RG_88:
return DRM_FORMAT_GR88;
case gfx::BufferFormat::RGBA_8888:
« no previous file with comments | « ui/gl/test/gl_image_test_support.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698