Advertisement
Guest User

Untitled

a guest
Sep 7th, 2021
4,733
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.75 KB | None | 0 0
  1. diff --git a/ui/gfx/linux/gbm_wrapper.cc b/ui/gfx/linux/gbm_wrapper.cc
  2. index 3d076ac83e..040b904d50 100644
  3. --- a/ui/gfx/linux/gbm_wrapper.cc
  4. +++ b/ui/gfx/linux/gbm_wrapper.cc
  5. @@ -324,8 +324,12 @@ class Device final : public ui::GbmDevice {
  6.      struct gbm_bo* bo = gbm_bo_create_with_modifiers(
  7.          device_, size.width(), size.height(), format, modifiers.data(),
  8.          modifiers.size());
  9. -    if (!bo)
  10. -      return nullptr;
  11. +    if (!bo) {
  12. +      // Fallback to bo without modifiers
  13. +         LOG(ERROR) << "Failed to create scanout buffer";
  14. +         LOG(INFO) << "Trying to fallback to standard buffer without modifiers";
  15. +      return CreateBuffer(format, size, flags);
  16. +    }
  17.  
  18.      return CreateBufferForBO(bo, format, size, flags);
  19.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement