diff --git a/media/gpu/vaapi/BUILD.gn b/media/gpu/vaapi/BUILD.gn
index 70349caa9b5..affea70cb70 100644
--- a/media/gpu/vaapi/BUILD.gn
+++ b/media/gpu/vaapi/BUILD.gn
@@ -14,7 +14,8 @@ assert(use_vaapi)
 generate_stubs("libva_stubs") {
   extra_header = "va_stub_header.fragment"
   sigs = [ "va.sigs" ]
-  if (use_x11) {
+  #if (use_x11) {
+  if (true) {
     sigs += [ "va_x11.sigs" ]
   }
   if (is_linux) {
@@ -111,7 +112,8 @@ source_set("vaapi") {
     ]
   }
 
-  if (use_x11) {
+  #if (use_x11) {
+  if (true) {
     configs += [ "//build/config/linux:x11" ]
     deps += [ "//ui/gfx/x" ]
     sources += [
diff --git a/media/gpu/vaapi/va_stub_header.fragment b/media/gpu/vaapi/va_stub_header.fragment
index bed198484d5..95abad53dc4 100644
--- a/media/gpu/vaapi/va_stub_header.fragment
+++ b/media/gpu/vaapi/va_stub_header.fragment
@@ -5,8 +5,8 @@ extern "C" {
 
 #include <va/va_drm.h>
 #include <va/va.h>
-#if defined(USE_X11)
+//#if defined(USE_X11)
 #include <va/va_x11.h>
-#endif
+//#endif
 
 }
diff --git a/media/gpu/vaapi/vaapi_picture_factory.cc b/media/gpu/vaapi/vaapi_picture_factory.cc
index 5c4d1ac3bc5..1244a7c0985 100644
--- a/media/gpu/vaapi/vaapi_picture_factory.cc
+++ b/media/gpu/vaapi/vaapi_picture_factory.cc
@@ -8,6 +8,7 @@
 #include "media/video/picture.h"
 #include "ui/gl/gl_bindings.h"
 
+#include "media/gpu/vaapi/vaapi_picture_tfp.h"
 #if defined(USE_X11)
 #include "media/gpu/vaapi/vaapi_picture_tfp.h"
 #endif
@@ -21,17 +22,17 @@
 namespace media {
 
 namespace {
-
 const struct {
   gl::GLImplementation gl_impl;
   VaapiPictureFactory::VaapiImplementation va_impl;
-} kVaapiImplementationPairs[] = {{gl::kGLImplementationEGLGLES2,
-                                  VaapiPictureFactory::kVaapiImplementationDrm}
-#if defined(USE_X11)
-                                 ,
+} kVaapiImplementationPairs[] = {
+//                                  {gl::kGLImplementationEGLGLES2,
+//                                  VaapiPictureFactory::kVaapiImplementationDrm}
+//#if defined(USE_X11)
+//                                 ,
                                  {gl::kGLImplementationDesktopGL,
                                   VaapiPictureFactory::kVaapiImplementationX11}
-#endif  // USE_X11
+//#endif  // USE_X11
 };
 
 }  // namespace
@@ -60,6 +61,11 @@ std::unique_ptr<VaapiPicture> VaapiPictureFactory::Create(
           : 0;
 
   std::unique_ptr<VaapiPicture> picture;
+  picture.reset(new VaapiTFPPicture(
+      vaapi_wrapper, make_context_current_cb, bind_image_cb,
+      picture_buffer.id(), picture_buffer.size(), service_texture_id,
+      client_texture_id, picture_buffer.texture_target()));
+  return picture;
 
   // Select DRM(egl) / TFP(glx) at runtime with --use-gl=egl / --use-gl=desktop
   switch (GetVaapiImplementation(gl::GetGLImplementation())) {
@@ -102,7 +108,7 @@ std::unique_ptr<VaapiPicture> VaapiPictureFactory::Create(
 VaapiPictureFactory::VaapiImplementation
 VaapiPictureFactory::GetVaapiImplementation(gl::GLImplementation gl_impl) {
   for (const auto& implementation_pair : kVaapiImplementationPairs) {
-    if (gl_impl == implementation_pair.gl_impl)
+    //if (gl_impl == implementation_pair.gl_impl)
       return implementation_pair.va_impl;
   }
 
@@ -110,6 +116,7 @@ VaapiPictureFactory::GetVaapiImplementation(gl::GLImplementation gl_impl) {
 }
 
 uint32_t VaapiPictureFactory::GetGLTextureTarget() {
+  return GL_TEXTURE_2D;
 #if defined(USE_OZONE)
   return GL_TEXTURE_EXTERNAL_OES;
 #else
@@ -118,6 +125,7 @@ uint32_t VaapiPictureFactory::GetGLTextureTarget() {
 }
 
 gfx::BufferFormat VaapiPictureFactory::GetBufferFormat() {
+  return gfx::BufferFormat::RGBX_8888;
 #if defined(USE_OZONE)
   return gfx::BufferFormat::YUV_420_BIPLANAR;
 #else
diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc
index 247d1adf72d..fc81e1c8ca0 100644
--- a/media/gpu/vaapi/vaapi_wrapper.cc
+++ b/media/gpu/vaapi/vaapi_wrapper.cc
@@ -52,10 +52,10 @@
 #include "ui/gl/gl_bindings.h"
 #include "ui/gl/gl_implementation.h"
 
-#if defined(USE_X11)
+//#if defined(USE_X11)
 #include <va/va_x11.h>
 #include "ui/gfx/x/x11_types.h"  // nogncheck
-#endif
+//#endif
 
 #if defined(USE_OZONE)
 #include "ui/ozone/public/ozone_platform.h"
@@ -64,14 +64,14 @@
 
 using media_gpu_vaapi::kModuleVa;
 using media_gpu_vaapi::kModuleVa_drm;
-#if defined(USE_X11)
+//#if defined(USE_X11)
 using media_gpu_vaapi::kModuleVa_x11;
-#endif
+//#endif
 using media_gpu_vaapi::InitializeStubs;
 using media_gpu_vaapi::IsVaInitialized;
-#if defined(USE_X11)
+//#if defined(USE_X11)
 using media_gpu_vaapi::IsVa_x11Initialized;
-#endif
+//#endif
 using media_gpu_vaapi::IsVa_drmInitialized;
 using media_gpu_vaapi::StubPathMap;
 
@@ -337,9 +337,9 @@ bool VADisplayState::Initialize() {
   base::AutoLock auto_lock(va_lock_);
 
   if (!IsVaInitialized() ||
-#if defined(USE_X11)
+//#if defined(USE_X11)
       !IsVa_x11Initialized() ||
-#endif
+//#endif
       !IsVa_drmInitialized()) {
     return false;
   }
@@ -355,25 +355,29 @@ bool VADisplayState::Initialize() {
 }
 
 bool VADisplayState::InitializeOnce() {
+    // X11 workaround
+    va_display_ = vaGetDisplay(gfx::GetXDisplay());
+    if (!vaDisplayIsValid(va_display_)) {
+    // end x11 workaround
   switch (gl::GetGLImplementation()) {
     case gl::kGLImplementationEGLGLES2:
       va_display_ = vaGetDisplayDRM(drm_fd_.get());
       break;
     case gl::kGLImplementationDesktopGL:
-#if defined(USE_X11)
+//#if defined(USE_X11)
       va_display_ = vaGetDisplay(gfx::GetXDisplay());
       if (vaDisplayIsValid(va_display_))
         break;
-#endif  // USE_X11
+//#endif  // USE_X11
       va_display_ = vaGetDisplayDRM(drm_fd_.get());
       break;
     // Cannot infer platform from GL, try all available displays
     case gl::kGLImplementationNone:
-#if defined(USE_X11)
+//#if defined(USE_X11)
       va_display_ = vaGetDisplay(gfx::GetXDisplay());
       if (vaDisplayIsValid(va_display_))
         break;
-#endif  // USE_X11
+//#endif  // USE_X11
       va_display_ = vaGetDisplayDRM(drm_fd_.get());
       break;
 
@@ -382,6 +386,7 @@ bool VADisplayState::InitializeOnce() {
                    << gl::GetGLImplementationName(gl::GetGLImplementation());
       return false;
   }
+  }
 
   if (!vaDisplayIsValid(va_display_)) {
     LOG(ERROR) << "Could not get a valid VA display";
@@ -1584,7 +1589,7 @@ bool VaapiWrapper::ExecuteAndDestroyPendingBuffers(VASurfaceID va_surface_id) {
   return result;
 }
 
-#if defined(USE_X11)
+//#if defined(USE_X11)
 bool VaapiWrapper::PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
                                         Pixmap x_pixmap,
                                         gfx::Size dest_size) {
@@ -1603,7 +1608,7 @@ bool VaapiWrapper::PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
   VA_SUCCESS_OR_RETURN(va_res, "Failed putting surface to pixmap", false);
   return true;
 }
-#endif  // USE_X11
+//#endif  // USE_X11
 
 std::unique_ptr<ScopedVAImage> VaapiWrapper::CreateVaImage(
     VASurfaceID va_surface_id,
@@ -1862,9 +1867,9 @@ void VaapiWrapper::PreSandboxInitialization() {
 
   paths[kModuleVa].push_back(std::string("libva.so.") + va_suffix);
   paths[kModuleVa_drm].push_back(std::string("libva-drm.so.") + va_suffix);
-#if defined(USE_X11)
+//#if defined(USE_X11)
   paths[kModuleVa_x11].push_back(std::string("libva-x11.so.") + va_suffix);
-#endif
+//#endif
 
   // InitializeStubs dlopen() VA-API libraries
   // libva.so
diff --git a/media/gpu/vaapi/vaapi_wrapper.h b/media/gpu/vaapi/vaapi_wrapper.h
index 4d6c0d0de47..775c7d70879 100644
--- a/media/gpu/vaapi/vaapi_wrapper.h
+++ b/media/gpu/vaapi/vaapi_wrapper.h
@@ -31,9 +31,9 @@
 #include "media/video/video_encode_accelerator.h"
 #include "ui/gfx/geometry/size.h"
 
-#if defined(USE_X11)
+//#if defined(USE_X11)
 #include "ui/gfx/x/x11.h"
-#endif  // USE_X11
+//#endif  // USE_X11
 
 namespace gfx {
 enum class BufferFormat;
@@ -243,13 +243,13 @@ class MEDIA_GPU_EXPORT VaapiWrapper
   // buffers. Return false if Execute() fails.
   bool ExecuteAndDestroyPendingBuffers(VASurfaceID va_surface_id);
 
-#if defined(USE_X11)
+//#if defined(USE_X11)
   // Put data from |va_surface_id| into |x_pixmap| of size
   // |dest_size|, converting/scaling to it.
   bool PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
                             Pixmap x_pixmap,
                             gfx::Size dest_size);
-#endif  // USE_X11
+//#endif  // USE_X11
 
   // Creates a ScopedVAImage from a VASurface |va_surface_id| and map it into
   // memory with the given |format| and |size|. If |format| is not equal to the
