view src/hermes/HeadMMX.h @ 4140:fc69b552ee32 SDL-1.2

Date: Thu, 28 Feb 2008 22:54:29 +0100 From: Sylvain Beucler Subject: [SDL] SDL window resize and flicker I have a resizable SDL window, and when it's resized, the surface goes black _and_ is flushed to screen before I have a chance to redraw it. This causes flicker. The super-small attached patch fixes this issue by avoiding a SDL_Flip() right after the window resize. What do you think? This SDL_ClearSurface function is only called once in the code, in SDL_SetVideoMode, and as far as I can tell the patch doesn't introduce other changes than getting rid of the flicker.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 29 Feb 2008 13:57:49 +0000
parents d910939febfa
children 782fd950bd46 c121d94672cb 39b9405d3cb6
line wrap: on
line source

/*
   Header definitions for the MMX routines for the HERMES library
   Copyright (c) 1998 Christian Nentwich (c.nentwich@cs.ucl.ac.uk)
   This source code is licensed under the GNU LGPL
  
   Please refer to the file COPYING.LIB contained in the distribution for
   licensing conditions
*/
#include "SDL_config.h"

#ifndef __HERMES_HEAD_MMX__
#define __HERMES_HEAD_MMX__


/* If you cannot stand ifdefs, then please do not look into this file, it's
   going to end your life :) */

#ifdef X86_ASSEMBLER


#ifdef __cplusplus
extern "C" {
#endif

void STACKCALL ConvertMMX(HermesConverterInterface *);

void STACKCALL ClearMMX_32(HermesClearInterface *);
void STACKCALL ClearMMX_24(HermesClearInterface *);
void STACKCALL ClearMMX_16(HermesClearInterface *);
void STACKCALL ClearMMX_8(HermesClearInterface *);

void ConvertMMXpII32_24RGB888();
void ConvertMMXpII32_16RGB565();
void ConvertMMXpII32_16BGR565();
void ConvertMMXpII32_16RGB555();
void ConvertMMXpII32_16BGR565();
void ConvertMMXpII32_16BGR555();

void ConvertMMXp32_16RGB555();

#ifdef __cplusplus
}
#endif



/* Fix the underscore business with ELF compilers */

#if defined(__ELF__) && defined(__GNUC__)
  #ifdef __cplusplus 
  extern "C" {   
  #endif

  extern void _ConvertMMX(HermesConverterInterface *);
  extern void _ConvertMMXpII32_24RGB888();
  extern void _ConvertMMXpII32_16RGB565();
  extern void _ConvertMMXpII32_16BGR565();
  extern void _ConvertMMXpII32_16RGB555();
  extern void _ConvertMMXpII32_16BGR555();

  #define ConvertMMX _ConvertMMX
  #define ConvertMMXpII32_24RGB888 _ConvertMMXpII32_24RGB888
  #define ConvertMMXpII32_16RGB565 _ConvertMMXpII32_16RGB565
  #define ConvertMMXpII32_16BGR565 _ConvertMMXpII32_16BGR565
  #define ConvertMMXpII32_16RGB555 _ConvertMMXpII32_16RGB555
  #define ConvertMMXpII32_16BGR555 _ConvertMMXpII32_16BGR555

  #ifdef __cplusplus
  }
  #endif

#endif /* ELF and GNUC */




/* Make it work with Watcom */
#ifdef __WATCOMC__
#pragma warning 601 9

#pragma aux ConvertMMX "_*" modify [EAX EBX ECX EDX ESI EDI]

#pragma aux ClearMMX_32 "_*" modify [EAX EBX ECX EDX ESI EDI]
#pragma aux ClearMMX_24 "_*" modify [EAX EBX ECX EDX ESI EDI]
#pragma aux ClearMMX_16 "_*" modify [EAX EBX ECX EDX ESI EDI]
#pragma aux ClearMMX_8 "_*" modify [EAX EBX ECX EDX ESI EDI]

#pragma aux ConvertMMXpII32_24RGB888 "_*"
#pragma aux ConvertMMXpII32_16RGB565 "_*"
#pragma aux ConvertMMXpII32_16BGR565 "_*"
#pragma aux ConvertMMXpII32_16RGB555 "_*"
#pragma aux ConvertMMXpII32_16BGR555 "_*"
#pragma aux ConvertMMXp32_16RGB555 "_*"

#endif /* WATCOM */

#endif /* X86_ASSEMBLER */


#endif