| Age | Commit message (Collapse) | Author |
|
This commit addresses cppcheck warnings about constructors with single
arguments that are not marked as explicit (noExplicitConstructor).
Single-argument constructors can perform implicit type conversions which
may lead to unexpected behavior and bugs. Marking them as explicit prevents
these implicit conversions and makes the code more predictable.
Changes made:
- kmscube/cube-egl.h: Added explicit keyword to EglState constructor
- kmscube/cube-gbm.cpp: Added explicit keyword to GbmDevice constructor
These changes improve type safety by requiring explicit construction calls
and preventing unintended implicit conversions.
|
|
This commit addresses cppcheck warnings about local variables that shadow
outer function names (shadowFunction). Variable shadowing can make code
confusing and error-prone as it's unclear which variable is being referenced.
Changes made:
- kmscube/cube-egl.cpp: Renamed 'config' to 'cfg' in loop to avoid shadowing
the config() member function
- kmscube/cube-gbm.cpp: Renamed 'width' and 'height' local variables to
'bo_width' and 'bo_height' to avoid shadowing width() and height() member
functions
These changes improve code clarity and eliminate potential confusion about
variable scope and naming.
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Implement matching GBM buffer format to EGL NATIVE_VISUAL_ID.
eglChooseConfig cannot match on NATIVE_VISUAL_ID, but GBM/EGL
requires matching formats. Similar logic is implemented in
kmscube code in match_config_to_visual.
X11, Wayland and Null cube demos remain unchanged.
Tested on Raspi-4 and VirtualBox/Ubuntu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|