vaapi-build-fix.patch 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From 5b2ff215473e0526b5b24aeff4ad90d369b21c75 Mon Sep 17 00:00:00 2001
  2. From: Julien Isorce <julien.isorce@chromium.org>
  3. Date: Wed, 05 Feb 2020 17:59:59 +0000
  4. Subject: [PATCH] Fix vaapi with GLX
  5. The signature of ui's gl::GLImageGLX has changed a little bit
  6. since "mplement GpuMemoryBuffers for EGL and GLX":
  7. https://chromium-review.googlesource.com/c/chromium/src/+/1984712
  8. Bug: 1031269
  9. Test: build with use_vaapi=true and run with --use-gl=desktop, see
  10. Change-Id: I80b07294b9abdfa8233aaf79f7d9ec4c58117090
  11. https: //chromium.googlesource.com/chromium/src.git/+/refs/heads/master/docs/gpu/vaapi.md#vaapi-on-linux
  12. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036494
  13. Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
  14. Reviewed-by: Miguel Casas <mcasas@chromium.org>
  15. Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
  16. Cr-Commit-Position: refs/heads/master@{#738595}
  17. ---
  18. diff --git a/media/gpu/vaapi/vaapi_picture_tfp.cc b/media/gpu/vaapi/vaapi_picture_tfp.cc
  19. index 227c31b..b42620d 100644
  20. --- a/media/gpu/vaapi/vaapi_picture_tfp.cc
  21. +++ b/media/gpu/vaapi/vaapi_picture_tfp.cc
  22. @@ -57,7 +57,7 @@
  23. if (make_context_current_cb_ && !make_context_current_cb_.Run())
  24. return false;
  25. - glx_image_ = new gl::GLImageGLX(size_, GL_RGB);
  26. + glx_image_ = new gl::GLImageGLX(size_, gfx::BufferFormat::BGRX_8888);
  27. if (!glx_image_->Initialize(x_pixmap_)) {
  28. // x_pixmap_ will be freed in the destructor.
  29. DLOG(ERROR) << "Failed creating a GLX Pixmap for TFP";
  30. --- a/media/mojo/services/gpu_mojo_media_client.cc 2020-04-02 21:11:34.000000000 -0700
  31. +++ b/media/mojo/services/gpu_mojo_media_client.cc 2020-04-09 00:44:58.871366432 -0700
  32. @@ -158,6 +158,7 @@
  33. *d3d11_supported_configs_;
  34. #elif BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
  35. +#if defined(OS_CHROMEOS)
  36. if (base::FeatureList::IsEnabled(kChromeosVideoDecoder)) {
  37. if (!cros_supported_configs_) {
  38. cros_supported_configs_ =
  39. @@ -167,6 +168,7 @@
  40. *cros_supported_configs_;
  41. return supported_config_map;
  42. }
  43. +#endif //defined(OS_CHROMEOS)
  44. #endif
  45. auto& default_configs =