Implementation of new API: SyncUpdateDC

This commit is contained in:
Vincent Wei
2018-11-29 12:22:01 +08:00
parent c04c44eefb
commit c643b10bbc
7 changed files with 208 additions and 27 deletions

View File

@@ -78,9 +78,9 @@ void screensaver_hide(void);
#define SIZE_QMSG_HEAP 16
#else
#define DEF_MSGQUEUE_LEN 16 /* default message queue length */
#define SIZE_CLIPRECTHEAP 128
#define SIZE_INVRECTHEAP 128
#define SIZE_QMSG_HEAP 8
#define SIZE_CLIPRECTHEAP 32
#define SIZE_INVRECTHEAP 64
#define SIZE_QMSG_HEAP 16
#endif
#endif

View File

@@ -45,10 +45,6 @@
#include "gdi.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define DISABLE_THREADS
#define GAL_mutex int
@@ -67,6 +63,20 @@ extern "C" {
#define GAL_ALPHA_OPAQUE 255
#define GAL_ALPHA_TRANSPARENT 0
#if defined (__NOUNIX__) || defined (__uClinux__)
#define SIZE_UPDATERECTHEAP 16
#else
#ifndef _MGRM_THREADS
#define SIZE_UPDATERECTHEAP 32
#else
#define SIZE_UPDATERECTHEAP 64
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* Allocate a pixel format structure and fill it according to the given info.
*/
@@ -102,6 +112,11 @@ typedef struct GAL_Surface {
/* clipping information */
GAL_Rect clip_rect; /* Read-only */
#ifdef _MGUSE_SYNC_UPDATE
/* update region */
CLIPRGN update_region; /* Read-only */
#endif
/* info for fast blit mapping to other surfaces */
struct GAL_BlitMap *map; /* Private */
@@ -296,6 +311,11 @@ extern void GAL_UpdateRects
extern void GAL_UpdateRect
(GAL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h);
#ifdef _MGUSE_SYNC_UPDATE
extern BLOCKHEAP __mg_free_update_region_list;
extern BOOL GAL_SyncUpdate (GAL_Surface *screen);
#endif
#if 0
/*
* On hardware that supports double-buffering, this function sets up a flip