paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/src/font pgfont.cpp,1.3.6.1,1.3.6.2


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/font pgfont.cpp,1.3.6.1,1.3.6.2
Date: Mon, 17 Jun 2002 04:02:01 -0400

Update of /cvsroot/paragui/paragui/src/font
In directory subversions:/tmp/cvs-serv1058/src/font

Modified Files:
      Tag: devel-1-0
        pgfont.cpp 
Log Message:
added surface locking for text rendering and gradient drawing.
cached surfaces will be hw surfaces if possible.



Index: pgfont.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/font/pgfont.cpp,v
retrieving revision 1.3.6.1
retrieving revision 1.3.6.2
diff -C2 -r1.3.6.1 -r1.3.6.2
*** pgfont.cpp  6 Jun 2002 22:10:46 -0000       1.3.6.1
--- pgfont.cpp  17 Jun 2002 08:01:57 -0000      1.3.6.2
***************
*** 146,150 ****
        Uint32 src_pitch = Bitmap->pitch;
        register Uint8* src_pixels = Bitmap->buffer + x0 + y0*Bitmap->pitch;
!       register Uint8* dst_pixels = (Uint8*)pixels + (PosX+x0)*bpp + 
(PosY+y0)*pitch + Surface->offset;
        Uint8* line;
  
--- 146,150 ----
        Uint32 src_pitch = Bitmap->pitch;
        register Uint8* src_pixels = Bitmap->buffer + x0 + y0*Bitmap->pitch;
!       register Uint8* dst_pixels = (Uint8*)pixels + (PosX+x0)*bpp + 
(PosY+y0)*pitch /*+ Surface->offset*/;
        Uint8* line;
  
***************
*** 487,490 ****
--- 487,494 ----
        FT_Vector  delta;
  
+       if(SDL_MUSTLOCK(Surface)) {
+               SDL_LockSurface(Surface);
+       }               
+ 
        //Go thu text and draw characters
        for (unsigned char *c = (unsigned char*) Text;*c != 0; c++) {
***************
*** 553,556 ****
--- 557,564 ----
        }
  
+       if(SDL_MUSTLOCK(Surface)) {
+               SDL_UnlockSurface(Surface);
+       }               
+       
        return true;
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]