Skip to content

Eslider blend fix - #1355

Merged
Huevos merged 2 commits into
OpenViX:Developerfrom
DimitarCC:eslider-blend-fix
Oct 4, 2026
Merged

Huevos merged 2 commits into
OpenViX:Developerfrom
DimitarCC:eslider-blend-fix

Conversation

@DimitarCC

Copy link
Copy Markdown
Contributor

This pull request introduces important fixes and improvements to how alpha blending and premultiplied color are handled in the graphics pipeline, particularly for raw-overwrite draws and widget rendering. The changes ensure correct blending behavior on platforms using premultiplied framebuffers, prevent visual artifacts (such as white halos or incorrect backgrounds), and improve skinning logic for transparency. The most significant changes are grouped below:

Graphics Pipeline & Premultiplied Color Handling:

  • Introduced the premultipliesOverwrites() method to INativeWindowProvider and implemented it in GbquadWindowProvider to signal when raw-overwrite draws must write premultiplied color, preventing white artifacts from fully transparent colors. (lib/gdi/egl/inative_window_provider.h [1] lib/gdi/egl/platform/gbquad/gbquad_window_provider.cpp [2] lib/gdi/egl/platform/gbquad/gbquad_window_provider.h [3]
  • Added the m_premultiply_overwrites member to gEGLDC, set during initialization, and updated all relevant draw paths (drawFlatRects, executeRectangle, executeLine) to premultiply RGB by alpha when required. (lib/gdi/egl/gegldc.h [1] lib/gdi/egl/gegldc.cpp [2] [3] [4] [5]

Widget & Painter Alpha Blend Fixes:

  • Improved eSlider painting logic to avoid painting opaque backgrounds under alpha-blended sliders and to use correct blend modes for pixmaps and rectangles, ensuring consistent appearance with transparency. (lib/gui/eslider.cpp [1] [2] [3] [4]

Skinning & Transparency Handling:

  • Enhanced ScrollLabel skinning so that when transparency is enabled, the scrollbar track does not paint the label's background color, preventing it from obscuring underlying content. (lib/python/Components/ScrollLabel.py [1] [2] [3]

Other Fixes:

  • In runScreenTest, ensures the "Loading skin" notification is closed before reloading the skin, avoiding UI glitches. (lib/python/StartEnigma.py lib/python/StartEnigma.pyL374-R378)

Ensure correct premultiplied alpha handling in the EGL renderer
(`gEGLDC`) to prevent artifacts when drawing flat colors, rectangles,
and lines with transparency. The framebuffer expects premultiplied
alpha, so raw-overwrite colors are now adjusted. This also aligns
rectangle drawing with the CPU path's blending semantics where needed.

Refine `eSlider`'s paint logic to properly handle its own alpha-blended
backgrounds and filled areas, avoiding opaque overlays where blending
is expected.

Prevent a transparent `ScrollLabel` from applying its background color
to its scrollbar track, which would otherwise obscure content behind it.

Adjust skin reload order in `StartEnigma.py` to ensure the "Loading
skin" notification is dismissed *before* the new skin initializes,
preventing potential display issues during the transition.
@Huevos
Huevos merged commit 2eb2deb into OpenViX:Developer Oct 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants