@@ -3454,6 +3454,14 @@ impl Renderer {
3454
3454
let _gm = self . gpu_profiler . start_marker ( "framebuffer" ) ;
3455
3455
let _timer = self . gpu_profiler . start_timer ( GPU_TAG_COMPOSITE ) ;
3456
3456
3457
+ let window_is_opaque = match self . compositor_config . layer_compositor ( ) {
3458
+ Some ( ref compositor) => {
3459
+ let props = compositor. get_window_properties ( ) ;
3460
+ props. is_opaque
3461
+ }
3462
+ None => true ,
3463
+ } ;
3464
+
3457
3465
let mut input_layers: Vec < CompositorInputLayer > = Vec :: new ( ) ;
3458
3466
let mut swapchain_layers = Vec :: new ( ) ;
3459
3467
let cap = composite_state. tiles . len ( ) ;
@@ -3501,7 +3509,7 @@ impl Renderer {
3501
3509
match tile. kind {
3502
3510
TileKind :: Opaque | TileKind :: Alpha => {
3503
3511
// Store (index of tile, index of layer) so we can segment them below
3504
- occlusion. add ( & rect, is_opaque, idx) ; // (idx, input_layers.len() - 1));
3512
+ occlusion. add ( & rect, is_opaque, idx) ;
3505
3513
}
3506
3514
TileKind :: Clear => {
3507
3515
// Clear tiles are specific to how we render the window buttons on
@@ -3590,7 +3598,11 @@ impl Renderer {
3590
3598
if let Some ( new_layer_kind) = new_layer_kind {
3591
3599
let ( offset, clip_rect, is_opaque) = match usage {
3592
3600
CompositorSurfaceUsage :: Content => {
3593
- ( DeviceIntPoint :: zero ( ) , device_size. into ( ) , input_layers. is_empty ( ) )
3601
+ (
3602
+ DeviceIntPoint :: zero ( ) ,
3603
+ device_size. into ( ) ,
3604
+ input_layers. is_empty ( ) && window_is_opaque,
3605
+ )
3594
3606
}
3595
3607
CompositorSurfaceUsage :: External { .. } => {
3596
3608
let rect = composite_state. get_device_rect (
0 commit comments