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

Unified Diff: gpu/command_buffer/service/feature_info.cc

Issue 2648633005: cros: Support YUYV format for GPU memory buffer video frames
Patch Set: Created 3 years, 11 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
Index: gpu/command_buffer/service/feature_info.cc
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index 45062e16dc8d43531a6d3be0da9c39860fd0e2e7..4016afc06e1c8b3e23d4d4a161842c84aa0a4f47 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -22,6 +22,10 @@
#include "ui/gl/gl_switches.h"
#include "ui/gl/gl_version_info.h"
+#if defined(OS_CHROMEOS)
+#include "ui/gl/gl_surface_egl.h"
+#endif
+
#if !defined(OS_MACOSX)
#include "ui/gl/gl_fence_egl.h"
#endif
@@ -1021,9 +1025,24 @@ void FeatureInfo::InitializeFeatures() {
validators_.g_l_state.AddValue(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES);
}
+ if (extensions.Contains("GL_APPLE_ycbcr_422")) {
+ AddExtensionString("GL_CHROMIUM_ycbcr_422_image");
+ feature_flags_.chromium_image_ycbcr_422 = true;
+ }
+
if (extensions.Contains("GL_OES_EGL_image_external")) {
AddExtensionString("GL_OES_EGL_image_external");
feature_flags_.oes_egl_image_external = true;
+#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
+ // TODO(dshwang): when ARM support YUYV, remove ARCH_CPU_X86_FAMILY check.
marcheu1 2017/01/21 00:25:18 Som ARM platforms already support YUYV, please don
dshwang 2017/01/23 23:13:42 Ok, remove the X86 check. and the code is protecte
+ // crbug.com/683347
+ bool has_dma_buf_import =
+ gl::GLSurfaceEGL::HasEGLExtension("EGL_EXT_image_dma_buf_import");
marcheu1 2017/01/21 00:25:18 we might not need to test this, dma_buf_import is
dshwang 2017/01/23 23:13:42 In ChromeOS, GLImageOzoneNativePixmap binds YUYV d
+ if (has_dma_buf_import) {
+ AddExtensionString("GL_CHROMIUM_ycbcr_422_image");
marcheu1 2017/01/21 00:25:18 I think it's incorrect to prevent allocation of im
dshwang 2017/01/23 23:13:42 gbm already provides the ability to tell if alloca
+ feature_flags_.chromium_image_ycbcr_422 = true;
+ }
+#endif
}
if (extensions.Contains("GL_NV_EGL_stream_consumer_external")) {
AddExtensionString("GL_NV_EGL_stream_consumer_external");
@@ -1120,11 +1139,6 @@ void FeatureInfo::InitializeFeatures() {
}
#endif
- if (extensions.Contains("GL_APPLE_ycbcr_422")) {
- AddExtensionString("GL_CHROMIUM_ycbcr_422_image");
- feature_flags_.chromium_image_ycbcr_422 = true;
- }
-
// TODO(gman): Add support for these extensions.
// GL_OES_depth32

Powered by Google App Engine
This is Rietveld 408576698