Home | History | Annotate | Download | only in video

Lines Matching refs:screen

304 	if (this->screen->pitch == 0) {
305 x += this->screen->offset / this->screen->format->BytesPerPixel;
306 y += this->screen->offset;
308 x += (this->screen->offset % this->screen->pitch) /
309 this->screen->format->BytesPerPixel;
310 y += (this->screen->offset / this->screen->pitch);
371 static void SDL_DrawCursorFast(SDL_Surface *screen, SDL_Rect *area)
380 switch (screen->format->BytesPerPixel) {
387 pixels8[0] = (Uint8)SDL_MapRGB(screen->format, 255, 255, 255);
388 pixels8[1] = (Uint8)SDL_MapRGB(screen->format, 0, 0, 0);
391 dst = (Uint8 *)screen->pixels +
392 (SDL_cursor->area.y+area->y)*screen->pitch +
394 dstskip = screen->pitch-area->w;
418 dst = (Uint16 *)screen->pixels +
419 (SDL_cursor->area.y+area->y)*screen->pitch/2 +
421 dstskip = (screen->pitch/2)-area->w;
445 dst = (Uint8 *)screen->pixels +
446 (SDL_cursor->area.y+area->y)*screen->pitch +
448 dstskip = screen->pitch-area->w*3;
472 dst = (Uint32 *)screen->pixels +
473 (SDL_cursor->area.y+area->y)*screen->pitch/4 +
475 dstskip = (screen->pitch/4)-area->w;
497 static void SDL_DrawCursorSlow(SDL_Surface *screen, SDL_Rect *area)
509 dstbpp = screen->format->BytesPerPixel;
510 dst = (Uint8 *)screen->pixels +
511 (SDL_cursor->area.y+area->y)*screen->pitch +
513 dstskip = screen->pitch-SDL_cursor->area.w*dstbpp;
517 if ( screen->format->BytesPerPixel == 1 ) {
519 pixels8[0] = (Uint8)SDL_MapRGB(screen->format, 255, 255, 255);
520 pixels8[1] = (Uint8)SDL_MapRGB(screen->format, 0, 0, 0);
566 static void SDL_ConvertCursorSave(SDL_Surface *screen, int w, int h)
572 if ( screen->map->dst != SDL_VideoSurface ) {
585 info.aux_data = screen->map->sw_data->aux_data;
586 info.src = screen->format;
587 info.table = screen->map->table;
589 RunBlit = screen->map->sw_data->blit;
595 void SDL_DrawCursorNoLock(SDL_Surface *screen)
599 /* Get the mouse rectangle, clipped to the screen */
610 screenbpp = screen->format->BytesPerPixel;
611 if ( (screen == SDL_VideoSurface) ||
612 FORMAT_EQUAL(screen->format, SDL_VideoSurface->format) ) {
617 src = (Uint8 *)screen->pixels + area.y * screen->pitch +
626 src += screen->pitch;
634 SDL_DrawCursorFast(screen, &area);
636 SDL_DrawCursorSlow(screen, &area);
640 void SDL_DrawCursor(SDL_Surface *screen)
642 /* Lock the screen if necessary */
643 if ( screen == NULL ) {
646 if ( SDL_MUSTLOCK(screen) ) {
647 if ( SDL_LockSurface(screen) < 0 ) {
652 SDL_DrawCursorNoLock(screen);
654 /* Unlock the screen and update if necessary */
655 if ( SDL_MUSTLOCK(screen) ) {
656 SDL_UnlockSurface(screen);
658 if ( (screen == SDL_VideoSurface) &&
659 ((screen->flags & SDL_HWSURFACE) != SDL_HWSURFACE) ) {
673 screen)
677 /* Get the mouse rectangle, clipped to the screen */
688 screenbpp = screen->format->BytesPerPixel;
689 if ( (screen == SDL_VideoSurface) ||
690 FORMAT_EQUAL(screen->format, SDL_VideoSurface->format) ) {
695 dst = (Uint8 *)screen->pixels + area.y * screen->pitch +
704 dst += screen->pitch;
709 SDL_ConvertCursorSave(screen, area.w, area.h);
714 void SDL_EraseCursor(SDL_Surface *screen)
716 /* Lock the screen if necessary */
717 if ( screen == NULL ) {
720 if ( SDL_MUSTLOCK(screen) ) {
721 if ( SDL_LockSurface(screen) < 0 ) {
726 SDL_EraseCursorNoLock(screen);
728 /* Unlock the screen and update if necessary */
729 if ( SDL_MUSTLOCK(screen) ) {
730 SDL_UnlockSurface(screen);
732 if ( (screen == SDL_VideoSurface) &&
733 ((screen->flags & SDL_HWSURFACE) != SDL_HWSURFACE) ) {