Home | History | Annotate | Download | only in video

Lines Matching refs:surface

232 /* Figure out which of many blit routines to set up on a surface */
233 int SDL_CalculateBlit(SDL_Surface *surface)
238 if ( (surface->flags & SDL_RLEACCEL) == SDL_RLEACCEL ) {
239 SDL_UnRLESurface(surface, 1);
241 surface->map->sw_blit = NULL;
244 surface->flags &= ~SDL_HWACCEL;
245 if ( surface->map->identity ) {
248 if ( (surface->flags & SDL_HWSURFACE) == SDL_HWSURFACE ) {
250 if ( surface->map->dst->flags & SDL_HWSURFACE ) {
255 if (hw_blit_ok && (surface->flags & SDL_SRCCOLORKEY)) {
258 if ( hw_blit_ok && (surface->flags & SDL_SRCALPHA) ) {
263 if ( surface->map->dst->flags & SDL_HWSURFACE ) {
268 if (hw_blit_ok && (surface->flags & SDL_SRCCOLORKEY)) {
271 if ( hw_blit_ok && (surface->flags & SDL_SRCALPHA) ) {
278 video->CheckHWBlit(this, surface, surface->map->dst);
283 if (((surface->flags & SDL_HWSURFACE) == SDL_HWSURFACE )&&(current_video->displayformatalphapixel))
285 if ( (surface->flags & SDL_SRCALPHA) )
289 video->CheckHWBlit(this, surface, surface->map->dst);
293 /* Get the blit function index, based on surface mode */
296 blit_index |= (!!(surface->flags & SDL_SRCCOLORKEY)) << 0;
297 if ( surface->flags & SDL_SRCALPHA
298 && (surface->format->alpha != SDL_ALPHA_OPAQUE
299 || surface->format->Amask) ) {
304 if ( surface->map->identity && blit_index == 0 ) {
305 surface->map->sw_data->blit = SDL_BlitCopy;
307 /* Handle overlapping blits on the same surface */
308 if ( surface == surface->map->dst ) {
309 surface->map->sw_data->blit = SDL_BlitCopyOverlap;
312 if ( surface->format->BitsPerPixel < 8 ) {
313 surface->map->sw_data->blit =
314 SDL_CalculateBlit0(surface, blit_index);
316 switch ( surface->format->BytesPerPixel ) {
318 surface->map->sw_data->blit =
319 SDL_CalculateBlit1(surface, blit_index);
324 surface->map->sw_data->blit =
325 SDL_CalculateBlitN(surface, blit_index);
328 surface->map->sw_data->blit = NULL;
334 if ( surface->map->sw_data->blit == NULL ) {
335 SDL_InvalidateMap(surface->map);
341 if(surface->flags & SDL_RLEACCELOK
342 && (surface->flags & SDL_HWACCEL) != SDL_HWACCEL) {
344 if(surface->map->identity
346 || (blit_index == 3 && !surface->format->Amask))) {
347 if ( SDL_RLESurface(surface) == 0 )
348 surface->map->sw_blit = SDL_RLEBlit;
349 } else if(blit_index == 2 && surface->format->Amask) {
350 if ( SDL_RLESurface(surface) == 0 )
351 surface->map->sw_blit = SDL_RLEAlphaBlit;
355 if ( surface->map->sw_blit == NULL ) {
356 surface->map->sw_blit = SDL_SoftBlit;