Skip to content

Commit f85e6aa

Browse files
committed
BlurEffect: only blit when flushing
the blit here is essentially just discarded when not flushing and just wastes GPU bandwidth Signed-off-by: Xarblu <xarblu@protonmail.com>
1 parent 9680a14 commit f85e6aa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/blur.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,9 @@ void BlurEffect::blur(const RenderTarget &renderTarget, const RenderViewport &vi
10341034
// pixel mismatches during textureCompare...
10351035
// Note that this does not give us more usable data (everything outside the dirtyRegion is garbage
10361036
// not part of this paint), it just makes sure that the data we do get is properly aligned.
1037-
renderInfo.framebuffers[0]->blitFromRenderTarget(renderTarget, viewport, backgroundRect, backgroundRect.translated(-backgroundRect.topLeft()));
1037+
if (!renderInfo.cache.get() || renderInfo.cache.get()->isFlushing) {
1038+
renderInfo.framebuffers[0]->blitFromRenderTarget(renderTarget, viewport, backgroundRect, backgroundRect.translated(-backgroundRect.topLeft()));
1039+
}
10381040
#endif
10391041

10401042
// Upload the geometry: the first 6 vertices are used when downsampling and upsampling offscreen,

0 commit comments

Comments
 (0)