diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /gfx/layers/wr | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/wr')
-rw-r--r-- | gfx/layers/wr/WebRenderImageHost.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gfx/layers/wr/WebRenderImageHost.cpp b/gfx/layers/wr/WebRenderImageHost.cpp index 5016bc30f8..3febc5872b 100644 --- a/gfx/layers/wr/WebRenderImageHost.cpp +++ b/gfx/layers/wr/WebRenderImageHost.cpp @@ -18,6 +18,7 @@ #include "mozilla/layers/RemoteTextureMap.h" #include "mozilla/layers/WebRenderBridgeParent.h" #include "mozilla/layers/WebRenderTextureHost.h" +#include "mozilla/ProfilerMarkers.h" #include "mozilla/StaticPrefs_webgl.h" #include "nsAString.h" #include "nsDebug.h" // for NS_WARNING, NS_ASSERTION @@ -311,12 +312,15 @@ TextureHost* WebRenderImageHost::GetAsTextureHostForComposite( // Convert YUV BufferTextureHost to TextureHostWrapperD3D11 if possible if (texture->AsBufferTextureHost()) { auto identifier = aAsyncImageManager->GetTextureFactoryIdentifier(); - const bool convertToNV12 = + const bool tryConvertToNV12 = StaticPrefs::gfx_video_convert_yuv_to_nv12_image_host_win() && identifier.mSupportsD3D11NV12 && KnowsCompositor::SupportsD3D11(identifier) && texture->GetFormat() == gfx::SurfaceFormat::YUV; - if (convertToNV12) { + if (tryConvertToNV12) { + PROFILER_MARKER_TEXT("WebRenderImageHost", GRAPHICS, {}, + "Try ConvertToNV12"_ns); + if (!mTextureAllocator) { mTextureAllocator = new TextureWrapperD3D11Allocator(); } @@ -326,6 +330,13 @@ TextureHost* WebRenderImageHost::GetAsTextureHostForComposite( if (textureWrapper) { texture = textureWrapper; } + } else if (profiler_thread_is_being_profiled_for_markers() && + StaticPrefs::gfx_video_convert_yuv_to_nv12_image_host_win() && + texture->GetFormat() == gfx::SurfaceFormat::YUV) { + nsPrintfCString str("No ConvertToNV12 D3D11 %d NV12 %d", + KnowsCompositor::SupportsD3D11(identifier), + identifier.mSupportsD3D11NV12); + PROFILER_MARKER_TEXT("WebRenderImageHost", GRAPHICS, {}, str); } } #endif |