revert the removal of MwLLBeginDraw/EndDraw, turns out the newer system still doesn't please weston and likely other compositors
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoI_xD 2026-03-19 16:05:44 -07:00
commit 04eb28b617
8 changed files with 45 additions and 4 deletions

View file

@ -190,6 +190,8 @@ MWDECL void (*MwLLDestroy)(MwLL handle);
MWDECL void (*MwLLPolygon)(MwLL handle, MwPoint* points, int points_count, MwLLColor color); MWDECL void (*MwLLPolygon)(MwLL handle, MwPoint* points, int points_count, MwLLColor color);
MWDECL void (*MwLLLine)(MwLL handle, MwPoint* points, MwLLColor color); MWDECL void (*MwLLLine)(MwLL handle, MwPoint* points, MwLLColor color);
MWDECL void (*MwLLBeginDraw)(MwLL handle);
MWDECL void (*MwLLEndDraw)(MwLL handle);
MWDECL MwLLColor (*MwLLAllocColor)(MwLL handle, int r, int g, int b); MWDECL MwLLColor (*MwLLAllocColor)(MwLL handle, int r, int g, int b);
MWDECL void (*MwLLColorUpdate)(MwLL handle, MwLLColor c, int r, int g, int b); MWDECL void (*MwLLColorUpdate)(MwLL handle, MwLLColor c, int r, int g, int b);

View file

@ -8,8 +8,10 @@
MwLLCreate = MwLLCreateImpl; \ MwLLCreate = MwLLCreateImpl; \
MwLLDestroy = MwLLDestroyImpl; \ MwLLDestroy = MwLLDestroyImpl; \
\ \
MwLLPolygon = MwLLPolygonImpl; \ MwLLPolygon = MwLLPolygonImpl; \
MwLLLine = MwLLLineImpl; \ MwLLLine = MwLLLineImpl; \
MwLLBeginDraw = MwLLBeginDrawImpl; \
MwLLEndDraw = MwLLEndDrawImpl; \
\ \
MwLLAllocColor = MwLLAllocColorImpl; \ MwLLAllocColor = MwLLAllocColorImpl; \
MwLLColorUpdate = MwLLColorUpdateImpl; \ MwLLColorUpdate = MwLLColorUpdateImpl; \

View file

@ -1001,6 +1001,14 @@ static void MwLLDestroyImpl(MwLL handle) {
free(handle); free(handle);
} }
static void MwLLBeginDrawImpl(MwLL handle) {
(void)handle;
}
static void MwLLEndDrawImpl(MwLL handle) {
(void)handle;
}
static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count,
MwLLColor color) { MwLLColor color) {
MilskoCocoa* h = handle->cocoa.real; MilskoCocoa* h = handle->cocoa.real;

View file

@ -310,6 +310,14 @@ static void MwLLDestroyImpl(MwLL handle) {
free(handle); free(handle);
} }
static void MwLLBeginDrawImpl(MwLL handle) {
(void)handle;
}
static void MwLLEndDrawImpl(MwLL handle) {
(void)handle;
}
static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) { static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) {
POINT* p = malloc(sizeof(*p) * points_count); POINT* p = malloc(sizeof(*p) * points_count);
HPEN pen = CreatePen(PS_NULL, 0, RGB(0, 0, 0)); HPEN pen = CreatePen(PS_NULL, 0, RGB(0, 0, 0));

View file

@ -1531,6 +1531,14 @@ refresh:
MwLLDispatch(handle, draw, NULL); MwLLDispatch(handle, draw, NULL);
} }
static void MwLLBeginDrawImpl(MwLL handle) {
(void)handle;
}
static void MwLLEndDrawImpl(MwLL handle) {
update_buffer(&handle->wayland.framebuffer);
}
static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) { static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) {
int i; int i;
cairo_set_source_rgb(handle->wayland.cairo, color->common.red / 255.0, color->common.green / 255.0, color->common.blue / 255.0); cairo_set_source_rgb(handle->wayland.cairo, color->common.red / 255.0, color->common.green / 255.0, color->common.blue / 255.0);

View file

@ -261,8 +261,15 @@ static void MwLLDestroyImpl(MwLL handle) {
free(handle); free(handle);
} }
static void static void MwLLBeginDrawImpl(MwLL handle) {
MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) { (void)handle;
}
static void MwLLEndDrawImpl(MwLL handle) {
(void)handle;
}
static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) {
int i; int i;
XPoint* p = malloc(sizeof(*p) * points_count); XPoint* p = malloc(sizeof(*p) * points_count);

View file

@ -6,11 +6,14 @@ static void lldrawhandler(MwLL handle, void* data) {
MwWidget h = (MwWidget)handle->common.user; MwWidget h = (MwWidget)handle->common.user;
(void)data; (void)data;
MwLLBeginDraw(handle);
h->bgcolor = NULL; h->bgcolor = NULL;
MwDispatch(h, draw); MwDispatch(h, draw);
if(h->draw_inject != NULL) h->draw_inject(h); if(h->draw_inject != NULL) h->draw_inject(h);
MwDispatchUserHandler(h, MwNdrawHandler, NULL); MwDispatchUserHandler(h, MwNdrawHandler, NULL);
MwLLEndDraw(handle);
} }
static void lluphandler(MwLL handle, void* data) { static void lluphandler(MwLL handle, void* data) {

View file

@ -6,6 +6,9 @@ void (*MwLLDestroy)(MwLL handle) = NULL;
void (*MwLLPolygon)(MwLL handle, MwPoint* points, int points_count, MwLLColor color) = NULL; void (*MwLLPolygon)(MwLL handle, MwPoint* points, int points_count, MwLLColor color) = NULL;
void (*MwLLLine)(MwLL handle, MwPoint* points, MwLLColor color) = NULL; void (*MwLLLine)(MwLL handle, MwPoint* points, MwLLColor color) = NULL;
void (*MwLLBeginDraw)(MwLL handle) = NULL;
void (*MwLLEndDraw)(MwLL handle) = NULL;
MwLLColor (*MwLLAllocColor)(MwLL handle, int r, int g, int b) = NULL; MwLLColor (*MwLLAllocColor)(MwLL handle, int r, int g, int b) = NULL;
void (*MwLLColorUpdate)(MwLL handle, MwLLColor c, int r, int g, int b) = NULL; void (*MwLLColorUpdate)(MwLL handle, MwLLColor c, int r, int g, int b) = NULL;
void (*MwLLFreeColor)(MwLLColor color) = NULL; void (*MwLLFreeColor)(MwLLColor color) = NULL;