diff src/video/SDL_RLEaccel.c @ 2222:926294b2bb4e

Emphasized the separation between SDL_Surface and SDL_Texture - SDL_Surface is a system memory representation of pixel data - SDL_Texture is a video memory representation of pixel data The concept of SDL_Surface with SDL_HWSURFACE is no longer used. Separated SDL_Texture types by usage rather than memory type - SDL_TEXTUREACCESS_STATIC is for rarely changed pixel data, can be placed in video memory. - SDL_TEXTUREACCESS_STREAMING is for frequently changing pixel data, usually placed in system memory or AGP memory. Optimized the SDL_compat usage of the OpenGL renderer by only using one copy of the framebuffer instead of two.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 11 Aug 2007 20:54:31 +0000
parents c121d94672cb
children 340942cfda48
line wrap: on
line diff
--- a/src/video/SDL_RLEaccel.c	Sat Aug 11 20:46:24 2007 +0000
+++ b/src/video/SDL_RLEaccel.c	Sat Aug 11 20:54:31 2007 +0000
@@ -1618,7 +1618,7 @@
 #undef ADD_TRANSL_COUNTS
 
     /* Now that we have it encoded, release the original pixels */
-    if (!(surface->flags & SDL_PREALLOC) && !(surface->flags & SDL_HWSURFACE)) {
+    if (!(surface->flags & SDL_PREALLOC)) {
         SDL_free(surface->pixels);
         surface->pixels = NULL;
     }
@@ -1783,7 +1783,7 @@
 #undef ADD_COUNTS
 
     /* Now that we have it encoded, release the original pixels */
-    if (!(surface->flags & SDL_PREALLOC) && !(surface->flags & SDL_HWSURFACE)) {
+    if (!(surface->flags & SDL_PREALLOC)) {
         SDL_free(surface->pixels);
         surface->pixels = NULL;
     }
@@ -1934,8 +1934,7 @@
     if ((surface->flags & SDL_RLEACCEL) == SDL_RLEACCEL) {
         surface->flags &= ~SDL_RLEACCEL;
 
-        if (recode && !(surface->flags & SDL_PREALLOC)
-            && !(surface->flags & SDL_HWSURFACE)) {
+        if (recode && !(surface->flags & SDL_PREALLOC)) {
             if ((surface->flags & SDL_SRCCOLORKEY) == SDL_SRCCOLORKEY) {
                 SDL_Rect full;
                 unsigned alpha_flag;