WayfireWM / WayfireWM/wayfire

Blur optimizations (round N+1)

Open
#1,089 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement low-priority
Dominant language
C++
Stars
3.1k
Forks
237
Avg merge
1h 43m
Merged PRs (30d)
1

Description

Blur is still less than optimal, because it is a transformer. This means:

  • If the view has a subsurface (for example, using SSD), the view's contents need to be copied to an auxiliary buffer which is then passed on to blur, which mixes it with the blurred background.
  • If a view has another transformer (for example wobbly, wrot), the view is rendered to an auxiliary buffer from the other transformer and again composited by blur

We can change how blur works to make it faster:

  • Introduce new signals, view-render-begin, view-render-end. It might need a bit of a reorganization in core.
  • On view-render-begin, if a blurred view starts rendering, clear the alpha channel of the framebuffer and read background contents (both concern only the view bbox region). The first part is hopefully very fast, the second one is necessary anyway.
  • Blur the copy (necessary anyway)
  • view renders as usual (no extra copies for blur)
  • on view-render-end, render the blurred background on top of the view, and use GL_EXT_shader_framebuffer_fetch to read the view's contents from the framebuffer and blend directly. (also a necessary step)

Downsides:

  • This will require the GL_EXT_shader_framebuffer_fetch extension. I don't know how widely supported it is.
  • This needs to be tested, it might be that we hit a slow path in some drivers and performance could be worse.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing blur transformer and core rendering lifecycle, focusing on where view rendering begins and ends. Assess the proposed view-render-begin and view-render-end signals, framebuffer-fetch requirement, auxiliary-buffer removal, and driver performance; done requires validated rendering behavior and performance testing.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.