mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 02:35:59 +01:00
parent
71da3e00a0
commit
696a5ad4ec
3 changed files with 4 additions and 3 deletions
|
@ -378,7 +378,7 @@ namespace Aquamarine {
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
Hyprutils::Memory::CSharedPointer<IAllocator> allocator;
|
Hyprutils::Memory::CSharedPointer<IAllocator> allocator;
|
||||||
Hyprutils::Memory::CSharedPointer<CDRMRenderer> renderer;
|
Hyprutils::Memory::CSharedPointer<CDRMRenderer> renderer; // may be null if creation fails
|
||||||
} rendererState;
|
} rendererState;
|
||||||
|
|
||||||
Hyprutils::Memory::CWeakPointer<CBackend> backend;
|
Hyprutils::Memory::CWeakPointer<CBackend> backend;
|
||||||
|
|
|
@ -192,6 +192,7 @@ Aquamarine::CGBMBuffer::CGBMBuffer(const SAllocatorBufferParams& params, Hypruti
|
||||||
if (params.scanout && swapchain->backendImpl->type() == AQ_BACKEND_DRM) {
|
if (params.scanout && swapchain->backendImpl->type() == AQ_BACKEND_DRM) {
|
||||||
// clear the buffer using the DRM renderer to avoid uninitialized mem
|
// clear the buffer using the DRM renderer to avoid uninitialized mem
|
||||||
auto impl = (CDRMBackend*)swapchain->backendImpl.get();
|
auto impl = (CDRMBackend*)swapchain->backendImpl.get();
|
||||||
|
if (impl->rendererState.renderer)
|
||||||
impl->rendererState.renderer->clearBuffer(this);
|
impl->rendererState.renderer->clearBuffer(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue