diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
commit | def92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch) | |
tree | 2ef34b9ad8bb9a9220e05d60352558b15f513894 /gfx/webrender_bindings | |
parent | Adding debian version 125.0.3-1. (diff) | |
download | firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/webrender_bindings')
-rw-r--r-- | gfx/webrender_bindings/DCLayerTree.cpp | 10 | ||||
-rw-r--r-- | gfx/webrender_bindings/DCLayerTree.h | 5 | ||||
-rw-r--r-- | gfx/webrender_bindings/src/bindings.rs | 4 | ||||
-rw-r--r-- | gfx/webrender_bindings/src/moz2d_renderer.rs | 10 | ||||
-rw-r--r-- | gfx/webrender_bindings/src/program_cache.rs | 2 |
5 files changed, 11 insertions, 20 deletions
diff --git a/gfx/webrender_bindings/DCLayerTree.cpp b/gfx/webrender_bindings/DCLayerTree.cpp index 177979a466..49ca8ee77b 100644 --- a/gfx/webrender_bindings/DCLayerTree.cpp +++ b/gfx/webrender_bindings/DCLayerTree.cpp @@ -70,8 +70,8 @@ UniquePtr<DCLayerTree> DCLayerTree::Create(gl::GLContext* aGL, return nullptr; } - auto layerTree = - MakeUnique<DCLayerTree>(aGL, aEGLConfig, aDevice, aCtx, dCompDevice); + auto layerTree = MakeUnique<DCLayerTree>(aGL, aEGLConfig, aDevice, aCtx, + aHwnd, dCompDevice); if (!layerTree->Initialize(aHwnd, aError)) { return nullptr; } @@ -83,11 +83,12 @@ void DCLayerTree::Shutdown() { DCLayerTree::sGpuOverlayInfo = nullptr; } DCLayerTree::DCLayerTree(gl::GLContext* aGL, EGLConfig aEGLConfig, ID3D11Device* aDevice, ID3D11DeviceContext* aCtx, - IDCompositionDevice2* aCompositionDevice) + HWND aHwnd, IDCompositionDevice2* aCompositionDevice) : mGL(aGL), mEGLConfig(aEGLConfig), mDevice(aDevice), mCtx(aCtx), + mHwnd(aHwnd), mCompositionDevice(aCompositionDevice), mDebugCounter(false), mDebugVisualRedrawRegions(false), @@ -1358,7 +1359,8 @@ bool DCSurfaceVideo::CalculateSwapChainSize(gfx::Matrix& aTransform) { GetVpAutoHDRSupported(vendorId, mDCLayerTree->GetVideoContext(), mDCLayerTree->GetVideoProcessor()); const bool contentIsHDR = false; // XXX for now, only non-HDR is supported. - const bool monitorIsHDR = gfx::DeviceManagerDx::Get()->SystemHDREnabled(); + const bool monitorIsHDR = + gfx::DeviceManagerDx::Get()->WindowHDREnabled(mDCLayerTree->GetHwnd()); const bool powerIsCharging = RenderThread::Get()->GetPowerIsCharging(); bool useVpAutoHDR = gfx::gfxVars::WebRenderOverlayVpAutoHDR() && diff --git a/gfx/webrender_bindings/DCLayerTree.h b/gfx/webrender_bindings/DCLayerTree.h index 6d3a611802..d5ade5781e 100644 --- a/gfx/webrender_bindings/DCLayerTree.h +++ b/gfx/webrender_bindings/DCLayerTree.h @@ -113,7 +113,7 @@ class DCLayerTree { explicit DCLayerTree(gl::GLContext* aGL, EGLConfig aEGLConfig, ID3D11Device* aDevice, ID3D11DeviceContext* aCtx, - IDCompositionDevice2* aCompositionDevice); + HWND aHwnd, IDCompositionDevice2* aCompositionDevice); ~DCLayerTree(); void SetDefaultSwapChain(IDXGISwapChain1* aSwapChain); @@ -159,6 +159,8 @@ class DCLayerTree { DCSurface* GetSurface(wr::NativeSurfaceId aId) const; + HWND GetHwnd() const { return mHwnd; } + // Get or create an FBO with depth buffer suitable for specified dimensions GLuint GetOrCreateFbo(int aWidth, int aHeight); @@ -187,6 +189,7 @@ class DCLayerTree { RefPtr<ID3D11Device> mDevice; RefPtr<ID3D11DeviceContext> mCtx; + HWND mHwnd; RefPtr<IDCompositionDevice2> mCompositionDevice; RefPtr<IDCompositionTarget> mCompositionTarget; diff --git a/gfx/webrender_bindings/src/bindings.rs b/gfx/webrender_bindings/src/bindings.rs index 047791c76b..3fc93fdf13 100644 --- a/gfx/webrender_bindings/src/bindings.rs +++ b/gfx/webrender_bindings/src/bindings.rs @@ -31,15 +31,13 @@ use thin_vec::ThinVec; use euclid::SideOffsets2D; use moz2d_renderer::Moz2dBlobImageHandler; use nsstring::nsAString; -use num_cpus; use program_cache::{remove_disk_cache, WrProgramCache}; -use rayon; use tracy_rs::register_thread_with_profiler; use webrender::sw_compositor::SwCompositor; use webrender::{ api::units::*, api::*, create_webrender_instance, render_api::*, set_profiler_hooks, AsyncPropertySampler, AsyncScreenshotHandle, Compositor, CompositorCapabilities, CompositorConfig, CompositorSurfaceTransform, - DebugFlags, Device, MappableCompositor, MappedTileInfo, NativeSurfaceId, NativeSurfaceInfo, NativeTileId, + Device, MappableCompositor, MappedTileInfo, NativeSurfaceId, NativeSurfaceInfo, NativeTileId, PartialPresentCompositor, PipelineInfo, ProfilerHooks, RecordedFrameHandle, Renderer, RendererStats, SWGLCompositeSurfaceInfo, SceneBuilderHooks, ShaderPrecacheFlags, Shaders, SharedShaders, TextureCacheConfig, UploadMethod, WebRenderOptions, WindowVisibility, ONE_TIME_USAGE_HINT, diff --git a/gfx/webrender_bindings/src/moz2d_renderer.rs b/gfx/webrender_bindings/src/moz2d_renderer.rs index ca1e76f96f..10006319bb 100644 --- a/gfx/webrender_bindings/src/moz2d_renderer.rs +++ b/gfx/webrender_bindings/src/moz2d_renderer.rs @@ -19,7 +19,6 @@ use webrender::api::units::{BlobDirtyRect, BlobToDeviceTranslation, DeviceIntRec use webrender::api::*; use euclid::point2; -use std; use std::collections::btree_map::BTreeMap; use std::collections::hash_map; use std::collections::hash_map::HashMap; @@ -30,9 +29,6 @@ use std::os::raw::c_void; use std::ptr; use std::sync::Arc; -#[cfg(target_os = "windows")] -use dwrote; - #[cfg(any(target_os = "macos", target_os = "ios"))] use core_foundation::string::CFString; #[cfg(any(target_os = "macos", target_os = "ios"))] @@ -182,12 +178,6 @@ struct BlobReader<'a> { begin: usize, } -#[derive(PartialEq, Debug, Eq, Clone, Copy)] -struct IntPoint { - x: i32, - y: i32, -} - /// The metadata for each display item in a blob image (doesn't match the serialized layout). /// /// See BlobReader above for detailed docs of the blob image format. diff --git a/gfx/webrender_bindings/src/program_cache.rs b/gfx/webrender_bindings/src/program_cache.rs index 5db61fc8b5..d5ad21654f 100644 --- a/gfx/webrender_bindings/src/program_cache.rs +++ b/gfx/webrender_bindings/src/program_cache.rs @@ -11,8 +11,6 @@ use std::path::{Path, PathBuf}; use std::rc::Rc; use std::sync::Arc; -use bincode; -use fxhash; use nsstring::nsAString; use rayon::ThreadPool; use webrender::{ProgramBinary, ProgramCache, ProgramCacheObserver, ProgramSourceDigest}; |