Merge pull request #92364 from bruvzg/rd_fix

Fix build with `vulkan=no` and `d3d12=no` after #91505.
This commit is contained in:
Rémi Verschelde 2024-05-25 20:34:03 +02:00 committed by GitHub
commit be56cab58c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View File

@ -5201,10 +5201,11 @@ bool DisplayServerX11::is_window_transparency_available() const {
if (XGetSelectionOwner(x11_display, net_wm_cm) == None) { if (XGetSelectionOwner(x11_display, net_wm_cm) == None) {
return false; return false;
} }
#if defined(RD_ENABLED)
if (rendering_device && !rendering_device->is_composite_alpha_supported()) { if (rendering_device && !rendering_device->is_composite_alpha_supported()) {
return false; return false;
} }
#endif
return OS::get_singleton()->is_layered_allowed(); return OS::get_singleton()->is_layered_allowed();
} }

View File

@ -3315,9 +3315,11 @@ void DisplayServerMacOS::delete_status_indicator(IndicatorID p_id) {
} }
bool DisplayServerMacOS::is_window_transparency_available() const { bool DisplayServerMacOS::is_window_transparency_available() const {
#if defined(RD_ENABLED)
if (rendering_device && !rendering_device->is_composite_alpha_supported()) { if (rendering_device && !rendering_device->is_composite_alpha_supported()) {
return false; return false;
} }
#endif
return OS::get_singleton()->is_layered_allowed(); return OS::get_singleton()->is_layered_allowed();
} }

View File

@ -3408,9 +3408,11 @@ bool DisplayServerWindows::is_window_transparency_available() const {
return false; return false;
} }
} }
#if defined(RD_ENABLED)
if (rendering_device && !rendering_device->is_composite_alpha_supported()) { if (rendering_device && !rendering_device->is_composite_alpha_supported()) {
return false; return false;
} }
#endif
return OS::get_singleton()->is_layered_allowed(); return OS::get_singleton()->is_layered_allowed();
} }