comparison src/video/x11/SDL_x11render.c @ 4614:a17de6a8f796

Code cleanup.
author Sunny Sachanandani <sunnysachanandani@gmail.com>
date Thu, 22 Jul 2010 12:08:33 +0530
parents 56b888179f95
children 789483a20081
comparison
equal deleted inserted replaced
4613:56b888179f95 4614:a17de6a8f796
998 if (renderdata->use_xrender) { 998 if (renderdata->use_xrender) {
999 data->blend_op = PictOpSrc; 999 data->blend_op = PictOpSrc;
1000 return 0; 1000 return 0;
1001 } 1001 }
1002 case SDL_BLENDMODE_MOD: 1002 case SDL_BLENDMODE_MOD:
1003 if (renderdata->use_xrender) {
1004 data->blend_op = PictOpOver;
1005 return 0;
1006 }
1007 case SDL_BLENDMODE_MASK: 1003 case SDL_BLENDMODE_MASK:
1008 case SDL_BLENDMODE_BLEND: 1004 case SDL_BLENDMODE_BLEND:
1009 if (renderdata->use_xrender) { 1005 if (renderdata->use_xrender) {
1010 data->blend_op = PictOpOver; 1006 data->blend_op = PictOpOver;
1011 return 0; 1007 return 0;
1763 XSync(data->display, False); 1759 XSync(data->display, False);
1764 } 1760 }
1765 Picture mask; 1761 Picture mask;
1766 XRenderPictureAttributes attr; 1762 XRenderPictureAttributes attr;
1767 const SDL_Rect *mrect; 1763 const SDL_Rect *mrect;
1768 if(texture->blendMode == SDL_BLENDMODE_NONE) { 1764 if(texture->blendMode == SDL_BLENDMODE_NONE)
1765 {
1769 mask = None; 1766 mask = None;
1770 mrect = srcrect; 1767 mrect = srcrect;
1771 } 1768 }
1772 else if (texture->blendMode == SDL_BLENDMODE_MOD) { 1769 else if (texture->blendMode == SDL_BLENDMODE_MOD)
1770 {
1773 mask = data->stencil_pict; 1771 mask = data->stencil_pict;
1774 mrect = dstrect; 1772 mrect = dstrect;
1775 } 1773 }
1776 else { 1774 else
1775 {
1777 mask = texturedata->picture; 1776 mask = texturedata->picture;
1778 mrect = srcrect; 1777 mrect = srcrect;
1779 } 1778 }
1780 if(srcrect->w == dstrect->w && srcrect->h == dstrect->h) { 1779 if(srcrect->w == dstrect->w && srcrect->h == dstrect->h) {
1781 if (texture->blendMode == SDL_BLENDMODE_MOD) { 1780 if (texture->blendMode == SDL_BLENDMODE_MOD) {