use MSG_WINCOMPOSITED to reset the dirty information of a shared surface of a window

This commit is contained in:
Vincent Wei
2023-09-01 12:25:04 +08:00
parent fbebc94718
commit ce53f2c703
11 changed files with 83 additions and 58 deletions
+6 -9
View File
@@ -1886,7 +1886,7 @@ MG_EXPORT const char *GUIAPI GetSharedSurfaceInfo (HSURF surf, int *fd,
/**
* \fn BOOL GUIAPI LockSharedSurface (HSURF surf,
* unsigned *dirty_age, int *nr_dirty_rects, const RECT **dirty_rects)
* \brief Locks the shared surface.
* \brief Locks the shared surface for read.
*
* This function lock the given shared surface \a surf and returns
* the dirty age.
@@ -1911,25 +1911,22 @@ MG_EXPORT BOOL GUIAPI LockSharedSurface (HSURF surf,
unsigned *dirty_age, int *nr_dirty_rects, const RECT **dirty_rects);
/**
* \fn BOOL GUIAPI UnlockSharedSurface (HSURF surf, BOOL clear_dirty)
* \brief Unlocks the shared surface and clears the dirty information.
* \fn BOOL GUIAPI UnlockSharedSurface (HSURF surf)
* \brief Unlocks the shared surface.
*
* This function unlocks the shared surface \a surf, and clears its dirty
* information if \a clear_dirty is TRUE.
* This function unlocks the given shared surface \a surf.
*
* \param surf The handle to the shared surface.
* \param clear_dirty A boolean value indicates whether to clear the dirty
* information of the shared surface.
*
* \return TRUE on success; otherwise failure.
*
* \note This function only available when _MGSCHEMA_COMPOSITING is defined.
*
* \sa LockSharedSurfaceIfDirty
* \sa LockSharedSurface
*
* Since 5.2.0
*/
MG_EXPORT BOOL GUIAPI UnlockSharedSurface (HSURF surf, BOOL clear_dirty);
MG_EXPORT BOOL GUIAPI UnlockSharedSurface (HSURF surf);
/**
* \fn BOOL GUIAPI DetachFromSharedSurface (HSURF surf)
+7 -3
View File
@@ -2990,18 +2990,22 @@ typedef struct _WINMASKINFO {
if the client moved to a new layer */
#define MSG_LAYERCHANGED 0x0149
/* Since 5.2.0; the server send this message to the client
if a window has been composited to the screen. */
#define MSG_WINCOMPOSITED 0x014A
#endif /* defined _MGRM_PROCESSES */
/* Since 5.0.0: for managing message thread */
#define MSG_MANAGE_MSGTHREAD 0x014A
#define MSG_MANAGE_MSGTHREAD 0x014B
#define MSGTHREAD_SIGNIN 0x00
#define MSGTHREAD_SIGNOUT 0x01
/* Since 5.0.0: for calculating the default position */
#define MSG_CALC_POSITION 0x014B
#define MSG_CALC_POSITION 0x014C
/* Since 5.0.6: for waking up the client */
#define MSG_WAKEUP_CLIENT 0x014C
#define MSG_WAKEUP_CLIENT 0x014D
/**
* \def MSG_DOESNEEDIME