summaryrefslogtreecommitdiff
path: root/kmscube
AgeCommit message (Collapse)Author
2026-04-30Drop libfmtTomi Valkeinen
We can use std::format() and a custom print() wrapper with C++20. When moving to C++23, we can drop the wrapper. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2025-12-18fix: Initialize uninitialized member variablesTomi Valkeinen
This commit addresses cppcheck warnings about member variables that are not properly initialized in constructors (uninitMemberVar). Uninitialized member variables can lead to undefined behavior and unpredictable program execution, making this a critical bug fix. Changes made: - kmscube/cube-gles2.cpp: Initialize m_width and m_height to 0 in GlScene constructor to prevent undefined behavior when these values are used - utils/kmstest.cpp: Initialize m_frame_num and m_flip_count to 0 in FlipState constructor to ensure proper frame counting behavior These fixes prevent potential crashes and ensure deterministic behavior by providing proper initial values for all member variables.
2025-12-18fix: Add explicit keyword to single-argument constructorsTomi Valkeinen
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.
2025-12-18fix: Resolve variable shadowing warningsTomi Valkeinen
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.
2025-12-18fix: Replace C-style casts with C++ castsTomi Valkeinen
This commit addresses cppcheck warnings about C-style casts (cstyleCast) by replacing them with appropriate C++ casts. C-style casts are considered dangerous because they can perform unsafe conversions without compile-time type checking, while C++ casts are more explicit and type-safe. Changes made: - static_cast for safe type conversions (e.g., void* to struct*) - reinterpret_cast for pointer type conversions (e.g., uint8_t* to char*) - Combined static_cast and reinterpret_cast for integer-to-pointer conversions Fixed files: - kmscube/cube-gles2.cpp: GLvoid* casts for OpenGL vertex attribute pointers - kmscube/cube-wl.cpp: Wayland interface pointer casts - kmscube/cube-x11.cpp: X11 window handle conversion - utils/fbtest.cpp: mmap return value cast - utils/kmstest.cpp: Framebuffer pointer arithmetic - utils/kmsview.cpp: Framebuffer memory mapping cast
2025-04-22Fix a few clang warningsTomi Valkeinen
2025-03-26Use the fourcc helpersTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2024-12-09Implement native visual matchingKaido Kert
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
2024-11-29Make gbm binary respect numframesKaido Kert
2023-02-24meson: Add summaryTomi Valkeinen
Add summary print for meson configuration. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2022-12-20Fix dependency to kms++utils in kmscube and utilsTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2022-12-04Fix clang-tidy warningsTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2020-12-16Remove CMake supportTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
2020-10-09Bulk format of all filesTomi Valkeinen
2020-09-14Add meson buildTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2020-09-14Rename esTransform.c to .cppTomi Valkeinen
This was the only C file in the project, so now we're "pure" c++. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-10-10kmscube: update drm resource allocationTomi Valkeinen
2017-10-10kmscube: drop non-atomic supportTomi Valkeinen
2017-10-03kmscube: compile fixTomi Valkeinen
2017-02-10ExtFb: pass params in vectorsTomi Valkeinen
2016-12-09kmscube: improve egl config printsTomi Valkeinen
2016-11-26kmscube: fix X11 fullscreenTomi Valkeinen
2016-06-17kmscube: use drmModeAddFB2 version of ExtFBTomi Valkeinen
2016-06-11kms++util: split to subdirsTomi Valkeinen
2016-06-11kms++: organize into subdirsTomi Valkeinen
2016-05-23Reorganize libkms++utils headerTomi Valkeinen
2016-05-23File/dir renamesTomi Valkeinen
2016-04-25kmscube: remove unused fieldTomi Valkeinen
2016-04-25kmscube: fix wrong uses of class FramebufferTomi Valkeinen
2016-04-22kmscube: check errorsTomi Valkeinen
2016-04-20kmscube: improve the x11 mainloopTomi Valkeinen
2016-04-19kmscube: hackingTomi Valkeinen
2016-04-19kmscube: fix resource leaks & freeingTomi Valkeinen
2016-04-19kmscube: quick hack for fullscreenTomi Valkeinen
2016-04-16kmscube: waylandTomi Valkeinen
2016-04-16add -Wextra & fix warningsTomi Valkeinen
2016-04-16kmscube: split into partsTomi Valkeinen
2016-04-16kmscube: support XTomi Valkeinen
2016-04-16kmscube: disable planeTomi Valkeinen
2016-04-11kmscube: check for free bufsTomi Valkeinen
2016-04-08kmscube: support null eglTomi Valkeinen
2016-04-08kmscube: big restructureTomi Valkeinen
2016-04-08kmscube: separate swap_buffersTomi Valkeinen
2016-03-24kmscube: clean up esUtilTomi Valkeinen
2016-02-15kmscube: fix atomic FB_ID set for crtcTomi Valkeinen
2015-11-18Add kmscubeTomi Valkeinen