@@ -721,12 +721,7 @@ bool EntityPass::RenderElement(Entity& element_entity,
721721 return false ;
722722 }
723723
724- // If the pass context returns a backdrop texture, we need to draw it to the
725- // current pass. We do this because it's faster and takes significantly less
726- // memory than storing/loading large MSAA textures. Also, it's not possible to
727- // blit the non-MSAA resolve texture of the previous pass to MSAA textures
728- // (let alone a transient one).
729- if (result.backdrop_texture ) {
724+ if (result.just_created ) {
730725 // Restore any clips that were recorded before the backdrop filter was
731726 // applied.
732727 auto & replay_entities = clip_replay_->GetReplayEntities ();
@@ -735,7 +730,14 @@ bool EntityPass::RenderElement(Entity& element_entity,
735730 VALIDATION_LOG << " Failed to render entity for clip restore." ;
736731 }
737732 }
733+ }
738734
735+ // If the pass context returns a backdrop texture, we need to draw it to the
736+ // current pass. We do this because it's faster and takes significantly less
737+ // memory than storing/loading large MSAA textures. Also, it's not possible to
738+ // blit the non-MSAA resolve texture of the previous pass to MSAA textures
739+ // (let alone a transient one).
740+ if (result.backdrop_texture ) {
739741 auto size_rect = Rect::MakeSize (result.pass ->GetRenderTargetSize ());
740742 auto msaa_backdrop_contents = TextureContents::MakeRect (size_rect);
741743 msaa_backdrop_contents->SetStencilEnabled (false );
0 commit comments