From 69654a3a7c721b770b5d744f0ee3585919d31654 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Mon, 15 Jun 2026 02:31:27 +0200 Subject: [PATCH] Compositor: Use GPU bitmap stores with Direct3D The compositor already used a GPU surface with bitmap readback when a Vulkan Skia context existed but no native shared surface path was available. The new Windows Direct3D backend has the same constraint for now: it can render with Skia on the GPU, while publication still uses shareable bitmaps. --- Services/Compositor/BackingStoreManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Services/Compositor/BackingStoreManager.cpp b/Services/Compositor/BackingStoreManager.cpp index 2c6e7ae472..b78d1d0efb 100644 --- a/Services/Compositor/BackingStoreManager.cpp +++ b/Services/Compositor/BackingStoreManager.cpp @@ -22,7 +22,7 @@ struct BackingStorePair { RefPtr back; }; -#ifdef USE_VULKAN +#if defined(USE_DIRECTX) || defined(USE_VULKAN) static NonnullRefPtr create_gpu_painting_surface_with_bitmap_flush(Gfx::IntSize size, Gfx::SharedImageBuffer& buffer, RefPtr const& skia_backend_context) { auto surface = Gfx::PaintingSurface::create_with_size(size, Gfx::BitmapFormat::BGRA8888, Gfx::AlphaType::Premultiplied, skia_backend_context); @@ -44,7 +44,7 @@ static BackingStorePair create_shareable_bitmap_backing_stores([[maybe_unused]] }; } #else -# ifdef USE_VULKAN +# if defined(USE_DIRECTX) || defined(USE_VULKAN) if (skia_backend_context) { return { .front = create_gpu_painting_surface_with_bitmap_flush(size, front_buffer, skia_backend_context),