Prefer RGB formats first, because they use less memory; but fallback to
RGBA formats, as they are formats required by OpenGL.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
If a pixel is perfectly representable as an 8-bit number, don't add
dither. Reduce artifacts where dither is unnecessary.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Add bayer ordered dithering when presenting to screen. Reduce banding
when using a strong blur. Also use 16-bit intermediary textures to
preserve precision in the rendering pipeline.
Related: #602
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
this fixes `WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.` warning while setting up the project
With rounded corners, X11 native border and blur enabled, left and
bottom 2*border_width pixels were not blurred, since mask did not
include border_width, only content width and height.
Create mask image with dimensions that include border width.
Signed-off-by: Evgeniy Baskov <j-basevgser@yandex.ru>
Users with an old EGL version won't be able to use the egl backend. OTOH
we shouldn't prevent them from running picom because of a feature they
won't even use.
Don't assume the existence of EGL 1.5 symbols.
Fixes#945
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
destroy_win_finish doesn't call win_release_images to free the images,
so we need to add a release_mask call there.
Related: #892
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
The intermediate texture used for shadow from mask calculation did not
properly set the min/mag filter to linear, which is required by the blur
methods. Because they use texture interpolation to accelerate
the convolution calculation.
Fixes#916
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Laying the usage message out by hand is tedious, also error prone
because the option names are duplicated at 2 places and have to be
consistent.
Create a struct to hold the option names and help messages, and
do layout programmatically.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
clang does not recognize the fallthrough annotation used in uthash.h, so we
change -Wimplicit-fallthrough to the single argument form currently only
supported by GCC.
We are still detecting implicit fallthroughs with GCC in CI.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This needs the EGL_KHR_image_pixmap and the GL_EXT_EGL_image_storage
extensions, which unfortunately aren't available on NVIDIA cards.
Don't add documentation for these, for now.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>