This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch ecore-evas-drm-gl-rotation-info
in repository efl.
View the commit online.
commit e5bfbe5cc00c46817d9a9eb57afa5bfba7188186
Author: Cedric BAIL <[email protected]>
AuthorDate: Wed Dec 2 15:13:23 2026 -0600
ecore_evas/drm: set the rotation through the info of the engine in use
_drm_rotation_do() wrote the new rotation through Evas_Engine_Info_Drm
even when the canvas runs the gl_drm engine, whose info is
Evas_Engine_Info_GL_Drm. The two structs only agree on where
info.rotation lives by coincidence on LP64 (offset 28 in both). On a
32-bit build it is at offset 20 in the software one and 16 in the GL
one, where offset 20 is info.depth: rotating a GL DRM canvas set the
depth to 90, 180 or 270, which sends the engine down its recreate path,
and left the output unrotated.
Pick the struct from ee->driver, which holds "gl_drm" when the canvas
setup was asked for GL, as _ecore_evas_new_internal() does with its gl
argument.
No test: the function needs a live KMS device behind the engine info,
and on LP64, the only ABI the test suites are built for, the old and
the new code write the same byte. Offsets checked by compiling both
struct layouts with -m32 and -m64 (sw/gl rotation 20/16 and 28/28).
Co-Authored-By: Claude Fable 5.2 <[email protected]>
---
src/modules/ecore_evas/engines/drm/ecore_evas_drm.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index a1ece1305a..ab7d2ec4f3 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -245,20 +245,25 @@ _drm_free(Ecore_Evas *ee)
static void
_drm_rotation_do(Ecore_Evas *ee, int rotation, int resize)
{
- Evas_Engine_Info_Drm *einfo;
+ Evas_Engine_Info *einfo;
int diff;
- einfo = (Evas_Engine_Info_Drm *)evas_engine_info_get(ee->evas);
+ einfo = evas_engine_info_get(ee->evas);
if (!einfo) return;
diff = ee->rotation - rotation;
if (diff < 0) diff = -diff;
- einfo->info.rotation = rotation;
+#ifdef BUILD_ECORE_EVAS_GL_DRM
+ if (!strcmp(ee->driver, "gl_drm"))
+ ((Evas_Engine_Info_GL_Drm *)einfo)->info.rotation = rotation;
+ else
+#endif
+ ((Evas_Engine_Info_Drm *)einfo)->info.rotation = rotation;
if (diff != 180)
{
- if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
+ if (!evas_engine_info_set(ee->evas, einfo))
ERR("evas_engine_info_set() for engine '%s' failed", ee->driver);
if (!resize)
@@ -311,7 +316,7 @@ _drm_rotation_do(Ecore_Evas *ee, int rotation, int resize)
}
else
{
- if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
+ if (!evas_engine_info_set(ee->evas, einfo))
ERR("evas_engine_info_set() for engine '%s' failed", ee->driver);
ee->rotation = rotation;
if (ee->func.fn_resize) ee->func.fn_resize(ee);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.