mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-05 17:59:58 +08:00
remove code about semaphhore for shared surface
This commit is contained in:
@@ -1889,7 +1889,7 @@ MG_EXPORT const char *GUIAPI GetSharedSurfaceInfo (HSURF surf, int *fd,
|
||||
* \brief Locks the shared surface for read.
|
||||
*
|
||||
* This function lock the given shared surface \a surf and returns
|
||||
* the dirty age.
|
||||
* the dirty information.
|
||||
*
|
||||
* \param surf The handle to the shared surface.
|
||||
* \param dirty_age The pointer to a buffer of unsigned integer to
|
||||
@@ -1899,7 +1899,7 @@ MG_EXPORT const char *GUIAPI GetSharedSurfaceInfo (HSURF surf, int *fd,
|
||||
* \param dirty_rects The pointer to a buffer of (const RECT *) for the array
|
||||
* of dirty rectangles; nullable.
|
||||
*
|
||||
* \return 1 for locked; 0 for not locked; -1 for failure.
|
||||
* \return TRUE for locked; FALSE for failure.
|
||||
*
|
||||
* \note This function only available when _MGSCHEMA_COMPOSITING is defined.
|
||||
*
|
||||
|
||||
@@ -2018,7 +2018,7 @@ const CompositorOps* __ex_compositor_get (const char* name,
|
||||
*
|
||||
* \sa RegisterRequestHandler
|
||||
*/
|
||||
#define MAX_SYS_REQID 0x0024
|
||||
#define MAX_SYS_REQID 0x0023
|
||||
|
||||
/**
|
||||
* \def MAX_REQID
|
||||
|
||||
@@ -117,10 +117,22 @@
|
||||
#define REQID_LOADCURSOR_PNG 0x001D
|
||||
// Load cursor from in-memory PNG
|
||||
#define REQID_LOADCURSOR_PNG_MEM 0x001E
|
||||
|
||||
#if 0 // Deprecated since 5.2.0
|
||||
// allocate semaphore for shared surface
|
||||
#define REQID_ALLOC_SURF_SEM 0x001F
|
||||
// free semaphore of shared surface
|
||||
#define REQID_FREE_SURF_SEM 0x0020
|
||||
#endif
|
||||
|
||||
/* Since 5.2.0 */
|
||||
// Operate a shared surface to register/revoke the name and set the fd
|
||||
#define REQID_OPERATENAMEDSSURF 0x001F
|
||||
#define ID_NAMEDSSURFOP_REGISTER 1
|
||||
#define ID_NAMEDSSURFOP_SET 2
|
||||
#define ID_NAMEDSSURFOP_REVOKE 3
|
||||
|
||||
#define REQID_RESERVED 0x0020
|
||||
|
||||
// Move the current client to another layer
|
||||
#define REQID_MOVETOLAYER 0x0021
|
||||
@@ -130,14 +142,7 @@
|
||||
// Authenticate client
|
||||
#define REQID_AUTHCLIENT 0x0023
|
||||
|
||||
/* Since 5.2.0 */
|
||||
// Operate a shared surface to register/revoke the name and set the fd
|
||||
#define REQID_OPERATENAMEDSSURF 0x0024
|
||||
#define ID_NAMEDSSURFOP_REGISTER 1
|
||||
#define ID_NAMEDSSURFOP_SET 2
|
||||
#define ID_NAMEDSSURFOP_REVOKE 3
|
||||
|
||||
#define REQID_SYS_LAST REQID_OPERATENAMEDSSURF
|
||||
#define REQID_SYS_LAST REQID_AUTHCLIENT
|
||||
|
||||
/*
|
||||
* XXX: To fellows who need to add a new REQID,
|
||||
|
||||
@@ -120,10 +120,11 @@ void mg_TerminateMisc (void);
|
||||
BOOL mg_InitSystemRes (void);
|
||||
void mg_TerminateSystemRes (void);
|
||||
|
||||
/* Deprecated since 5.2.0
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
int __mg_alloc_sem_for_shared_surf (void);
|
||||
int __mg_free_sem_for_shared_surf (int sem_num);
|
||||
#endif /* _MGSCHEMA_COMPOSITING */
|
||||
#endif _MGSCHEMA_COMPOSITING */
|
||||
|
||||
size_t __mg_lookfor_unused_slot (unsigned char* bitmap, size_t len_bmp, int set);
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ typedef struct tagG_RES {
|
||||
|
||||
int nr_layers;
|
||||
int semid_layer;
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
#if 0 && defined(_MGSCHEMA_COMPOSITING) // deprecated since 5.2.0
|
||||
int semid_shared_surf; /* the id of semaphore set for shared surfaces */
|
||||
#endif
|
||||
|
||||
@@ -208,7 +208,7 @@ typedef G_RES* PG_RES;
|
||||
#define SHAREDRES_NR_LAYSERS (((PG_RES)mgSharedRes)->nr_layers)
|
||||
#define SHAREDRES_SEMID_LAYER (((PG_RES)mgSharedRes)->semid_layer)
|
||||
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
#if 0 && defined(_MGSCHEMA_COMPOSITING) // Deprecated since 5.2.0
|
||||
# define SHAREDRES_SEMID_SHARED_SURF (((PG_RES)mgSharedRes)->semid_shared_surf)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ BOOL GUIAPI ServerDeleteLayer (MG_Layer* layer)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
#if 0 // Deprecated since 5.2.0 def _MGSCHEMA_COMPOSITING
|
||||
|
||||
static SemSetManager* _ssm_shared_surf;
|
||||
|
||||
@@ -395,6 +395,7 @@ int __mg_init_layers ()
|
||||
|
||||
memset (sem_usage, 0xFF, sizeof (sem_usage));
|
||||
|
||||
#if 0 // Deprecated since 5.2.0
|
||||
#ifdef _MGSCHEMA_COMPOSITING
|
||||
if ((sem_key = get_sem_key_for_shared_surf ()) == -1) {
|
||||
return -1;
|
||||
@@ -415,6 +416,7 @@ int __mg_init_layers ()
|
||||
__mg_alloc_mutual_sem (_ssm_shared_surf, NULL);
|
||||
|
||||
on_exit (__mg_delete_sem_set_manager, _ssm_shared_surf);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if ((sem_key = get_sem_key_for_layers ()) == -1) {
|
||||
|
||||
@@ -277,6 +277,7 @@ ret:
|
||||
return ServerSendReply (clifd, &hcsr, sizeof (HCURSOR));
|
||||
}
|
||||
|
||||
#if 0 // Deprecated since 5.2.0
|
||||
static void my_release_sem_for_shared_surf (void* res)
|
||||
{
|
||||
int sem_num = (int)(intptr_t)res;
|
||||
@@ -312,6 +313,7 @@ static int free_sem_for_shared_surf (int cli, int clifd, void* buff, size_t len)
|
||||
|
||||
return ServerSendReply (clifd, &ret_value, sizeof (int));
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* IS_COMPOSITING_SCHEMA */
|
||||
|
||||
@@ -1053,8 +1055,12 @@ static struct req_request {
|
||||
#if IS_COMPOSITING_SCHEMA
|
||||
{ load_cursor_png_file, 0 }, // REQID_LOADCURSOR_PNG
|
||||
{ load_cursor_png_mem, 0 }, // REQID_LOADCURSOR_PNG_MEM
|
||||
{ operate_nssurface, 1 }, // REQID_OPERATENSSURF
|
||||
{ NULL, 0 },
|
||||
#if 0 // Deprecated since 5.2.0
|
||||
{ alloc_sem_for_shared_surf, 0 }, // REQID_ALLOC_SURF_SEM
|
||||
{ free_sem_for_shared_surf, 0 }, // REQID_FREE_SURF_SEM
|
||||
#endif
|
||||
#else
|
||||
{ NULL, 0 },
|
||||
{ NULL, 0 },
|
||||
@@ -1064,11 +1070,6 @@ static struct req_request {
|
||||
{ move_to_layer, 0 }, // REQID_MOVETOLAYER
|
||||
{ calc_position, 0 }, // REQID_CALCPOSITION
|
||||
{ authenticate_client, 0 }, // REQID_AUTHCLIENT
|
||||
#if IS_COMPOSITING_SCHEMA
|
||||
{ operate_nssurface, 1 }, // REQID_OPERATENSSURF
|
||||
#else
|
||||
{ NULL, 0 },
|
||||
#endif
|
||||
};
|
||||
|
||||
BOOL GUIAPI RegisterRequestHandler (int req_id, REQ_HANDLER your_handler)
|
||||
|
||||
Reference in New Issue
Block a user