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 |