@@ -3454,6 +3454,14 @@ impl Renderer {
34543454 let _gm = self . gpu_profiler . start_marker ( "framebuffer" ) ;
34553455 let _timer = self . gpu_profiler . start_timer ( GPU_TAG_COMPOSITE ) ;
34563456
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+
34573465 let mut input_layers: Vec < CompositorInputLayer > = Vec :: new ( ) ;
34583466 let mut swapchain_layers = Vec :: new ( ) ;
34593467 let cap = composite_state. tiles . len ( ) ;
@@ -3501,7 +3509,7 @@ impl Renderer {
35013509 match tile. kind {
35023510 TileKind :: Opaque | TileKind :: Alpha => {
35033511 // 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) ;
35053513 }
35063514 TileKind :: Clear => {
35073515 // Clear tiles are specific to how we render the window buttons on
@@ -3590,7 +3598,11 @@ impl Renderer {
35903598 if let Some ( new_layer_kind) = new_layer_kind {
35913599 let ( offset, clip_rect, is_opaque) = match usage {
35923600 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+ )
35943606 }
35953607 CompositorSurfaceUsage :: External { .. } => {
35963608 let rect = composite_state. get_device_rect (
0 commit comments