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

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

Issue 1422563002: [Ozone] Enables overlay render format setting path and by default use UYVY (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 eb98ea0044ccb972fab9e9357dda4bf1c2f93137..00d43337baa862c54daf040dca7ade2d647acc63 100644
--- a/ui/ozone/platform/drm/common/drm_util.cc
+++ b/ui/ozone/platform/drm/common/drm_util.cc
@@ -277,10 +277,25 @@ int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format) {
return DRM_FORMAT_ARGB8888;
case gfx::BufferFormat::BGRX_8888:
return DRM_FORMAT_XRGB8888;
+ case gfx::BufferFormat::UYVY_422:
+ return DRM_FORMAT_UYVY;
default:
NOTREACHED();
return 0;
}
}
+gfx::BufferFormat GetBufferFormatFromFourCCFormat(int format) {
+ switch (format) {
+ case DRM_FORMAT_ARGB8888:
+ return gfx::BufferFormat::BGRA_8888;
+ case DRM_FORMAT_XRGB8888:
+ return gfx::BufferFormat::BGRX_8888;
+ case DRM_FORMAT_UYVY:
+ return gfx::BufferFormat::UYVY_422;
+ default:
+ NOTREACHED();
+ return gfx::BufferFormat::LAST;
spang 2015/11/10 15:46:18 same here, although this is not supposed to be rea
william.xie1 2015/11/10 16:07:56 Done.
+ }
+}
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698