Loading gfx/thebes/gfxPlatformGtk.cpp +2 −0 Changes for gfx/thebes/gfxPlatformGtk.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -227,6 +227,8 @@ void gfxPlatformGtk::InitDmabufConfig() { feature.ForceDisable(FeatureStatus::Failed, "Failed to configure", failureId); } // Make sure we have DMABuf formats available. Unused << GetGlobalDMABufFormats(); } } Loading widget/gtk/DMABufDevice.cpp +0 −79 Changes for widget/gtk/DMABufDevice.cpp: 0 added lines, 79 removed lines. Original line number Diff line number Diff line Loading @@ -31,11 +31,6 @@ using namespace mozilla::gfx; #ifndef GBM_FORMAT_P010 # define GBM_FORMAT_P010 \ __gbm_fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cr:Cb plane */ #endif namespace mozilla { namespace widget { Loading Loading @@ -182,8 +177,6 @@ DMABufDevice::~DMABufDevice() { void DMABufDevice::Configure() { LOGDMABUF(("DMABufDevice::Configure()")); LoadFormatModifiers(); if (!GbmLib::IsAvailable()) { LOGDMABUF(("GbmLib is not available!")); mFailureId = "FEATURE_FAILURE_NO_LIBGBM"; Loading Loading @@ -237,80 +230,8 @@ bool DMABufDevice::IsDMABufWebGLEnabled() { gfx::gfxVars::UseDMABufWebGL(); } void DMABufDevice::SetModifiersToGfxVars() { RefPtr<DMABufFormats> formats; #ifdef MOZ_WAYLAND if (GdkIsWaylandDisplay()) { formats = WaylandDisplayGet()->GetDMABufFormats(); } #endif if (!formats) { formats = new DMABufFormats(); } formats->EnsureBasicFormats(); DRMFormat* format = formats->GetFormat(GBM_FORMAT_XRGB8888); MOZ_DIAGNOSTIC_ASSERT(format, "Missing GBM_FORMAT_XRGB8888 dmabuf format!"); mFormatRGBX = new DRMFormat(*format); gfxVars::SetDMABufModifiersXRGB(*format->GetModifiers()); format = formats->GetFormat(GBM_FORMAT_ARGB8888); MOZ_DIAGNOSTIC_ASSERT(format, "Missing GBM_FORMAT_ARGB8888 dmabuf format!"); mFormatRGBA = new DRMFormat(*format); gfxVars::SetDMABufModifiersARGB(*format->GetModifiers()); format = formats->GetFormat(GBM_FORMAT_P010); if (format) { mFormatP010 = new DRMFormat(*format); gfxVars::SetDMABufModifiersP010(*format->GetModifiers()); } format = formats->GetFormat(GBM_FORMAT_NV12); if (format) { mFormatNV12 = new DRMFormat(*format); gfxVars::SetDMABufModifiersNV12(*format->GetModifiers()); } } void DMABufDevice::GetModifiersFromGfxVars() { mFormatRGBX = new DRMFormat(GBM_FORMAT_XRGB8888, gfxVars::DMABufModifiersXRGB()); mFormatRGBA = new DRMFormat(GBM_FORMAT_ARGB8888, gfxVars::DMABufModifiersARGB()); mFormatP010 = new DRMFormat(GBM_FORMAT_P010, gfxVars::DMABufModifiersP010()); mFormatNV12 = new DRMFormat(GBM_FORMAT_NV12, gfxVars::DMABufModifiersNV12()); } void DMABufDevice::DisableDMABufWebGL() { sUseWebGLDmabufBackend = false; } RefPtr<DRMFormat> DMABufDevice::GetDRMFormat(int32_t aFOURCCFormat) { switch (aFOURCCFormat) { case GBM_FORMAT_XRGB8888: MOZ_DIAGNOSTIC_ASSERT(mFormatRGBX, "Missing RGBX dmabuf format!"); return mFormatRGBX; case GBM_FORMAT_ARGB8888: MOZ_DIAGNOSTIC_ASSERT(mFormatRGBA, "Missing RGBA dmabuf format!"); return mFormatRGBA; case GBM_FORMAT_P010: return mFormatP010; case GBM_FORMAT_NV12: return mFormatNV12; default: gfxCriticalNoteOnce << "DMABufDevice::GetDRMFormat() unknow format: " << aFOURCCFormat; return nullptr; } } void DMABufDevice::LoadFormatModifiers() { if (XRE_IsParentProcess()) { MOZ_ASSERT(NS_IsMainThread()); SetModifiersToGfxVars(); } else { GetModifiersFromGfxVars(); } } DMABufDevice* GetDMABufDevice() { static StaticAutoPtr<DMABufDevice> sDmaBufDevice; static std::once_flag onceFlag; Loading widget/gtk/DMABufFormats.cpp +100 −0 Changes for widget/gtk/DMABufFormats.cpp: 100 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -13,13 +13,23 @@ #include "DMABufFormats.h" #ifdef MOZ_WAYLAND # include "nsWaylandDisplay.h" # include "WidgetUtilsGtk.h" # include "mozilla/widget/mozwayland.h" # include "mozilla/widget/linux-dmabuf-unstable-v1-client-protocol.h" #endif #include <gbm.h> #include "mozilla/gfx/gfxVars.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/gfx/Logging.h" // for gfxCriticalNote using namespace mozilla::gfx; #ifndef GBM_FORMAT_P010 # define GBM_FORMAT_P010 \ __gbm_fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cr:Cb plane */ #endif // TODO: Provide fallback formats if beedback is not received yet // Get from display? Loading Loading @@ -383,4 +393,94 @@ RefPtr<DMABufFormats> CreateDMABufFeedbackFormats( } #endif void GlobalDMABufFormats::SetModifiersToGfxVars() { RefPtr<DMABufFormats> formats; #ifdef MOZ_WAYLAND if (GdkIsWaylandDisplay()) { formats = WaylandDisplayGet()->GetDMABufFormats(); } #endif if (!formats) { formats = new DMABufFormats(); } formats->EnsureBasicFormats(); DRMFormat* format = formats->GetFormat(GBM_FORMAT_XRGB8888); MOZ_DIAGNOSTIC_ASSERT(format, "Missing GBM_FORMAT_XRGB8888 dmabuf format!"); mFormatRGBX = new DRMFormat(*format); gfxVars::SetDMABufModifiersXRGB(*format->GetModifiers()); format = formats->GetFormat(GBM_FORMAT_ARGB8888); MOZ_DIAGNOSTIC_ASSERT(format, "Missing GBM_FORMAT_ARGB8888 dmabuf format!"); mFormatRGBA = new DRMFormat(*format); gfxVars::SetDMABufModifiersARGB(*format->GetModifiers()); format = formats->GetFormat(GBM_FORMAT_P010); if (format) { mFormatP010 = new DRMFormat(*format); gfxVars::SetDMABufModifiersP010(*format->GetModifiers()); } format = formats->GetFormat(GBM_FORMAT_NV12); if (format) { mFormatNV12 = new DRMFormat(*format); gfxVars::SetDMABufModifiersNV12(*format->GetModifiers()); } } void GlobalDMABufFormats::GetModifiersFromGfxVars() { mFormatRGBX = new DRMFormat(GBM_FORMAT_XRGB8888, gfxVars::DMABufModifiersXRGB()); mFormatRGBA = new DRMFormat(GBM_FORMAT_ARGB8888, gfxVars::DMABufModifiersARGB()); mFormatP010 = new DRMFormat(GBM_FORMAT_P010, gfxVars::DMABufModifiersP010()); mFormatNV12 = new DRMFormat(GBM_FORMAT_NV12, gfxVars::DMABufModifiersNV12()); } DRMFormat* GlobalDMABufFormats::GetDRMFormat(int32_t aFOURCCFormat) { switch (aFOURCCFormat) { case GBM_FORMAT_XRGB8888: MOZ_DIAGNOSTIC_ASSERT(mFormatRGBX, "Missing RGBX dmabuf format!"); return mFormatRGBX; case GBM_FORMAT_ARGB8888: MOZ_DIAGNOSTIC_ASSERT(mFormatRGBA, "Missing RGBA dmabuf format!"); return mFormatRGBA; case GBM_FORMAT_P010: return mFormatP010; case GBM_FORMAT_NV12: return mFormatNV12; default: gfxCriticalNoteOnce << "DMABufDevice::GetDRMFormat() unknow format: " << aFOURCCFormat; return nullptr; } } void GlobalDMABufFormats::LoadFormatModifiers() { if (XRE_IsParentProcess()) { MOZ_ASSERT(NS_IsMainThread()); SetModifiersToGfxVars(); } else { GetModifiersFromGfxVars(); } } GlobalDMABufFormats::GlobalDMABufFormats() { LoadFormatModifiers(); } GlobalDMABufFormats* GetGlobalDMABufFormats() { static StaticAutoPtr<GlobalDMABufFormats> sGlobalDMABufFormats; static std::once_flag onceFlag; std::call_once(onceFlag, [] { sGlobalDMABufFormats = new GlobalDMABufFormats(); if (NS_IsMainThread()) { ClearOnShutdown(&sGlobalDMABufFormats); } else { NS_DispatchToMainThread(NS_NewRunnableFunction( "ClearGlobalDMABufFormats", [] { ClearOnShutdown(&sGlobalDMABufFormats); })); } }); return sGlobalDMABufFormats.get(); } } // namespace mozilla::widget widget/gtk/DMABufFormats.h +22 −0 Changes for widget/gtk/DMABufFormats.h: 22 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -107,6 +107,28 @@ RefPtr<DMABufFormats> CreateDMABufFeedbackFormats( const std::function<void(DMABufFormats*)>& aFormatRefreshCB = nullptr); #endif class GlobalDMABufFormats final { public: DRMFormat* GetDRMFormat(int32_t aFOURCCFormat); GlobalDMABufFormats(); private: void LoadFormatModifiers(); void SetModifiersToGfxVars(); void GetModifiersFromGfxVars(); // Formats passed to RDD process to WebGL process // where we can't get formats/modifiers from Wayland display. // RGBA formats are mandatory, YUV ones are optional. RefPtr<DRMFormat> mFormatRGBA; RefPtr<DRMFormat> mFormatRGBX; RefPtr<DRMFormat> mFormatP010; RefPtr<DRMFormat> mFormatNV12; }; GlobalDMABufFormats* GetGlobalDMABufFormats(); } // namespace mozilla::widget #endif // __MOZ_DMABUF_FORMATS_H__ widget/gtk/DMABufSurface.cpp +2 −7 Changes for widget/gtk/DMABufSurface.cpp: 2 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -712,7 +712,7 @@ bool DMABufSurfaceRGBA::Create(mozilla::gl::GLContext* aGLContext, int aWidth, if (!aFormat) { mFOURCCFormat = aDMABufSurfaceFlags & DMABUF_ALPHA ? GBM_FORMAT_ARGB8888 : GBM_FORMAT_XRGB8888; aFormat = GetDMABufDevice()->GetDRMFormat(mFOURCCFormat); aFormat = GetGlobalDMABufFormats()->GetDRMFormat(mFOURCCFormat); if (!aFormat) { LOGDMABUF("DMABufSurfaceRGBA::Create(): Missing drm format 0x%x!", mFOURCCFormat); Loading Loading @@ -906,10 +906,6 @@ bool DMABufSurfaceRGBA::Create( // TODO: Read Vulkan modifiers from DMABufFormats? mFOURCCFormat = GBM_FORMAT_ARGB8888; RefPtr<DRMFormat> format = GetDMABufDevice()->GetDRMFormat(mFOURCCFormat); if (!format) { return false; } mBufferPlaneCount = aDMABufInfo.plane_count; RefPtr<gfx::FileHandleWrapper> fd = std::move(aFd); Loading Loading @@ -1782,8 +1778,7 @@ bool DMABufSurfaceYUV::UpdateYUVData( return false; } RefPtr<DRMFormat> format = GetDMABufDevice()->GetDRMFormat(mFOURCCFormat); auto format = GetGlobalDMABufFormats()->GetDRMFormat(mFOURCCFormat); for (int i = 0; i < mBufferPlaneCount; i++) { if (!CreateYUVPlane(context, i, format)) { return false; Loading Loading
gfx/thebes/gfxPlatformGtk.cpp +2 −0 Changes for gfx/thebes/gfxPlatformGtk.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -227,6 +227,8 @@ void gfxPlatformGtk::InitDmabufConfig() { feature.ForceDisable(FeatureStatus::Failed, "Failed to configure", failureId); } // Make sure we have DMABuf formats available. Unused << GetGlobalDMABufFormats(); } } Loading
widget/gtk/DMABufDevice.cpp +0 −79 Changes for widget/gtk/DMABufDevice.cpp: 0 added lines, 79 removed lines. Original line number Diff line number Diff line Loading @@ -31,11 +31,6 @@ using namespace mozilla::gfx; #ifndef GBM_FORMAT_P010 # define GBM_FORMAT_P010 \ __gbm_fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cr:Cb plane */ #endif namespace mozilla { namespace widget { Loading Loading @@ -182,8 +177,6 @@ DMABufDevice::~DMABufDevice() { void DMABufDevice::Configure() { LOGDMABUF(("DMABufDevice::Configure()")); LoadFormatModifiers(); if (!GbmLib::IsAvailable()) { LOGDMABUF(("GbmLib is not available!")); mFailureId = "FEATURE_FAILURE_NO_LIBGBM"; Loading Loading @@ -237,80 +230,8 @@ bool DMABufDevice::IsDMABufWebGLEnabled() { gfx::gfxVars::UseDMABufWebGL(); } void DMABufDevice::SetModifiersToGfxVars() { RefPtr<DMABufFormats> formats; #ifdef MOZ_WAYLAND if (GdkIsWaylandDisplay()) { formats = WaylandDisplayGet()->GetDMABufFormats(); } #endif if (!formats) { formats = new DMABufFormats(); } formats->EnsureBasicFormats(); DRMFormat* format = formats->GetFormat(GBM_FORMAT_XRGB8888); MOZ_DIAGNOSTIC_ASSERT(format, "Missing GBM_FORMAT_XRGB8888 dmabuf format!"); mFormatRGBX = new DRMFormat(*format); gfxVars::SetDMABufModifiersXRGB(*format->GetModifiers()); format = formats->GetFormat(GBM_FORMAT_ARGB8888); MOZ_DIAGNOSTIC_ASSERT(format, "Missing GBM_FORMAT_ARGB8888 dmabuf format!"); mFormatRGBA = new DRMFormat(*format); gfxVars::SetDMABufModifiersARGB(*format->GetModifiers()); format = formats->GetFormat(GBM_FORMAT_P010); if (format) { mFormatP010 = new DRMFormat(*format); gfxVars::SetDMABufModifiersP010(*format->GetModifiers()); } format = formats->GetFormat(GBM_FORMAT_NV12); if (format) { mFormatNV12 = new DRMFormat(*format); gfxVars::SetDMABufModifiersNV12(*format->GetModifiers()); } } void DMABufDevice::GetModifiersFromGfxVars() { mFormatRGBX = new DRMFormat(GBM_FORMAT_XRGB8888, gfxVars::DMABufModifiersXRGB()); mFormatRGBA = new DRMFormat(GBM_FORMAT_ARGB8888, gfxVars::DMABufModifiersARGB()); mFormatP010 = new DRMFormat(GBM_FORMAT_P010, gfxVars::DMABufModifiersP010()); mFormatNV12 = new DRMFormat(GBM_FORMAT_NV12, gfxVars::DMABufModifiersNV12()); } void DMABufDevice::DisableDMABufWebGL() { sUseWebGLDmabufBackend = false; } RefPtr<DRMFormat> DMABufDevice::GetDRMFormat(int32_t aFOURCCFormat) { switch (aFOURCCFormat) { case GBM_FORMAT_XRGB8888: MOZ_DIAGNOSTIC_ASSERT(mFormatRGBX, "Missing RGBX dmabuf format!"); return mFormatRGBX; case GBM_FORMAT_ARGB8888: MOZ_DIAGNOSTIC_ASSERT(mFormatRGBA, "Missing RGBA dmabuf format!"); return mFormatRGBA; case GBM_FORMAT_P010: return mFormatP010; case GBM_FORMAT_NV12: return mFormatNV12; default: gfxCriticalNoteOnce << "DMABufDevice::GetDRMFormat() unknow format: " << aFOURCCFormat; return nullptr; } } void DMABufDevice::LoadFormatModifiers() { if (XRE_IsParentProcess()) { MOZ_ASSERT(NS_IsMainThread()); SetModifiersToGfxVars(); } else { GetModifiersFromGfxVars(); } } DMABufDevice* GetDMABufDevice() { static StaticAutoPtr<DMABufDevice> sDmaBufDevice; static std::once_flag onceFlag; Loading
widget/gtk/DMABufFormats.cpp +100 −0 Changes for widget/gtk/DMABufFormats.cpp: 100 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -13,13 +13,23 @@ #include "DMABufFormats.h" #ifdef MOZ_WAYLAND # include "nsWaylandDisplay.h" # include "WidgetUtilsGtk.h" # include "mozilla/widget/mozwayland.h" # include "mozilla/widget/linux-dmabuf-unstable-v1-client-protocol.h" #endif #include <gbm.h> #include "mozilla/gfx/gfxVars.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/gfx/Logging.h" // for gfxCriticalNote using namespace mozilla::gfx; #ifndef GBM_FORMAT_P010 # define GBM_FORMAT_P010 \ __gbm_fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cr:Cb plane */ #endif // TODO: Provide fallback formats if beedback is not received yet // Get from display? Loading Loading @@ -383,4 +393,94 @@ RefPtr<DMABufFormats> CreateDMABufFeedbackFormats( } #endif void GlobalDMABufFormats::SetModifiersToGfxVars() { RefPtr<DMABufFormats> formats; #ifdef MOZ_WAYLAND if (GdkIsWaylandDisplay()) { formats = WaylandDisplayGet()->GetDMABufFormats(); } #endif if (!formats) { formats = new DMABufFormats(); } formats->EnsureBasicFormats(); DRMFormat* format = formats->GetFormat(GBM_FORMAT_XRGB8888); MOZ_DIAGNOSTIC_ASSERT(format, "Missing GBM_FORMAT_XRGB8888 dmabuf format!"); mFormatRGBX = new DRMFormat(*format); gfxVars::SetDMABufModifiersXRGB(*format->GetModifiers()); format = formats->GetFormat(GBM_FORMAT_ARGB8888); MOZ_DIAGNOSTIC_ASSERT(format, "Missing GBM_FORMAT_ARGB8888 dmabuf format!"); mFormatRGBA = new DRMFormat(*format); gfxVars::SetDMABufModifiersARGB(*format->GetModifiers()); format = formats->GetFormat(GBM_FORMAT_P010); if (format) { mFormatP010 = new DRMFormat(*format); gfxVars::SetDMABufModifiersP010(*format->GetModifiers()); } format = formats->GetFormat(GBM_FORMAT_NV12); if (format) { mFormatNV12 = new DRMFormat(*format); gfxVars::SetDMABufModifiersNV12(*format->GetModifiers()); } } void GlobalDMABufFormats::GetModifiersFromGfxVars() { mFormatRGBX = new DRMFormat(GBM_FORMAT_XRGB8888, gfxVars::DMABufModifiersXRGB()); mFormatRGBA = new DRMFormat(GBM_FORMAT_ARGB8888, gfxVars::DMABufModifiersARGB()); mFormatP010 = new DRMFormat(GBM_FORMAT_P010, gfxVars::DMABufModifiersP010()); mFormatNV12 = new DRMFormat(GBM_FORMAT_NV12, gfxVars::DMABufModifiersNV12()); } DRMFormat* GlobalDMABufFormats::GetDRMFormat(int32_t aFOURCCFormat) { switch (aFOURCCFormat) { case GBM_FORMAT_XRGB8888: MOZ_DIAGNOSTIC_ASSERT(mFormatRGBX, "Missing RGBX dmabuf format!"); return mFormatRGBX; case GBM_FORMAT_ARGB8888: MOZ_DIAGNOSTIC_ASSERT(mFormatRGBA, "Missing RGBA dmabuf format!"); return mFormatRGBA; case GBM_FORMAT_P010: return mFormatP010; case GBM_FORMAT_NV12: return mFormatNV12; default: gfxCriticalNoteOnce << "DMABufDevice::GetDRMFormat() unknow format: " << aFOURCCFormat; return nullptr; } } void GlobalDMABufFormats::LoadFormatModifiers() { if (XRE_IsParentProcess()) { MOZ_ASSERT(NS_IsMainThread()); SetModifiersToGfxVars(); } else { GetModifiersFromGfxVars(); } } GlobalDMABufFormats::GlobalDMABufFormats() { LoadFormatModifiers(); } GlobalDMABufFormats* GetGlobalDMABufFormats() { static StaticAutoPtr<GlobalDMABufFormats> sGlobalDMABufFormats; static std::once_flag onceFlag; std::call_once(onceFlag, [] { sGlobalDMABufFormats = new GlobalDMABufFormats(); if (NS_IsMainThread()) { ClearOnShutdown(&sGlobalDMABufFormats); } else { NS_DispatchToMainThread(NS_NewRunnableFunction( "ClearGlobalDMABufFormats", [] { ClearOnShutdown(&sGlobalDMABufFormats); })); } }); return sGlobalDMABufFormats.get(); } } // namespace mozilla::widget
widget/gtk/DMABufFormats.h +22 −0 Changes for widget/gtk/DMABufFormats.h: 22 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -107,6 +107,28 @@ RefPtr<DMABufFormats> CreateDMABufFeedbackFormats( const std::function<void(DMABufFormats*)>& aFormatRefreshCB = nullptr); #endif class GlobalDMABufFormats final { public: DRMFormat* GetDRMFormat(int32_t aFOURCCFormat); GlobalDMABufFormats(); private: void LoadFormatModifiers(); void SetModifiersToGfxVars(); void GetModifiersFromGfxVars(); // Formats passed to RDD process to WebGL process // where we can't get formats/modifiers from Wayland display. // RGBA formats are mandatory, YUV ones are optional. RefPtr<DRMFormat> mFormatRGBA; RefPtr<DRMFormat> mFormatRGBX; RefPtr<DRMFormat> mFormatP010; RefPtr<DRMFormat> mFormatNV12; }; GlobalDMABufFormats* GetGlobalDMABufFormats(); } // namespace mozilla::widget #endif // __MOZ_DMABUF_FORMATS_H__
widget/gtk/DMABufSurface.cpp +2 −7 Changes for widget/gtk/DMABufSurface.cpp: 2 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -712,7 +712,7 @@ bool DMABufSurfaceRGBA::Create(mozilla::gl::GLContext* aGLContext, int aWidth, if (!aFormat) { mFOURCCFormat = aDMABufSurfaceFlags & DMABUF_ALPHA ? GBM_FORMAT_ARGB8888 : GBM_FORMAT_XRGB8888; aFormat = GetDMABufDevice()->GetDRMFormat(mFOURCCFormat); aFormat = GetGlobalDMABufFormats()->GetDRMFormat(mFOURCCFormat); if (!aFormat) { LOGDMABUF("DMABufSurfaceRGBA::Create(): Missing drm format 0x%x!", mFOURCCFormat); Loading Loading @@ -906,10 +906,6 @@ bool DMABufSurfaceRGBA::Create( // TODO: Read Vulkan modifiers from DMABufFormats? mFOURCCFormat = GBM_FORMAT_ARGB8888; RefPtr<DRMFormat> format = GetDMABufDevice()->GetDRMFormat(mFOURCCFormat); if (!format) { return false; } mBufferPlaneCount = aDMABufInfo.plane_count; RefPtr<gfx::FileHandleWrapper> fd = std::move(aFd); Loading Loading @@ -1782,8 +1778,7 @@ bool DMABufSurfaceYUV::UpdateYUVData( return false; } RefPtr<DRMFormat> format = GetDMABufDevice()->GetDRMFormat(mFOURCCFormat); auto format = GetGlobalDMABufFormats()->GetDRMFormat(mFOURCCFormat); for (int i = 0; i < mBufferPlaneCount; i++) { if (!CreateYUVPlane(context, i, format)) { return false; Loading