Repository navigation
Eslider blend fix - #1355
Merged
Merged
Eslider blend fix#1355
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
premultipliesOverwrites()method toINativeWindowProviderand implemented it inGbquadWindowProviderto 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]m_premultiply_overwritesmember togEGLDC, 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:
eSliderpainting 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:
ScrollLabelskinning 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:
runScreenTest, ensures the "Loading skin" notification is closed before reloading the skin, avoiding UI glitches. (lib/python/StartEnigma.pylib/python/StartEnigma.pyL374-R378)