summaryrefslogtreecommitdiffstats
path: root/gfx/layers/wr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /gfx/layers/wr
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.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.cpp15
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