Lines Matching full:surface
12 #include "android/skin/surface.h"
20 #define D(...) VERBOSE_PRINT(surface,__VA_ARGS__)
28 SDL_Surface* surface;
40 if (s->surface) {
41 SDL_FreeSurface(s->surface);
42 s->surface = NULL;
48 skin_surface_ref( SkinSurface* surface )
50 if (surface)
51 surface->refcount += 1;
52 return surface;
136 _skin_surface_create( SDL_Surface* surface,
143 s->surface = surface;
148 SDL_FreeSurface(surface);
150 D( "not enough memory to allocate new skin surface !" );
159 SDL_Surface* surface;
161 surface = _sdl_surface_create_rgb( w, h, 32, SDL_HWSURFACE );
162 if (surface == NULL) {
163 surface = _sdl_surface_create_rgb( w, h, 32, SDL_SWSURFACE );
164 if (surface == NULL) {
165 D( "could not create fast %dx%d ARGB32 surface: %s",
170 return _skin_surface_create( surface, NULL );
177 SDL_Surface* surface;
179 surface = _sdl_surface_create_rgb( w, h, 32, SDL_SWSURFACE );
180 if (surface == NULL) {
181 D( "could not create slow %dx%d ARGB32 surface: %s",
185 return _skin_surface_create( surface, NULL );
197 SDL_Surface* surface;
204 D( "not enough memory to create %dx%d ARGB32 surface",
211 surface = _sdl_surface_create_rgb_from( w, h, pitch,
214 if (surface == NULL) {
215 D( "could not create %dx%d slow ARGB32 surface: %s",
219 return _skin_surface_create( surface, pixcopy );
228 if (!s || !s->surface) {
229 D( "error: trying to lock stale surface %p", s );
232 if ( SDL_LockSurface( s->surface ) != 0 ) {
233 D( "could not lock surface %p: %s", s, SDL_GetError() );
236 pix->w = s->surface->w;
237 pix->h = s->surface->h;
238 pix->pitch = s->surface->pitch;
239 pix->pixels = s->surface->pixels;
243 /* unlock a slow surface that was previously locked */
247 if (s && s->surface)
248 SDL_UnlockSurface( s->surface );
256 if (s && s->surface) {
257 return SDL_MapRGBA( s->surface->format,
303 delta = (x + w) - dst->surface->w;
311 delta = (y + h) - dst->surface->h;
323 if ( !SDL_LockSurface(dst->surface) )
326 blit->dst_lock = dst->surface;
327 blit->dst_pitch = dst->surface->pitch;
328 blit->dst_line = dst->surface->pixels + y*blit->dst_pitch;
362 delta = (x + w) - dst->surface->w;
366 delta = (sx + w) - src->surface->w;
380 delta = (y + h) - dst->surface->h;
384 delta = (sy + h) - src->surface->h;
397 if ( !SDL_LockSurface(dst->surface) )
400 blit->dst_lock = dst->surface;
401 blit->dst_pitch = dst->surface->pitch;
402 blit->dst_line = (uint8_t*) dst->surface->pixels + y*blit->dst_pitch;
404 if ( !SDL_LockSurface(src->surface) ) {
405 SDL_UnlockSurface(dst->surface);
409 blit->src_lock = src->surface;
410 blit->src_pitch = src->surface->pitch;
411 blit->src_line = (uint8_t*) src->surface->pixels + sy*blit->src_pitch;