[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2-demos] master 3292461: * graph/gblblit.c (gblender_blit_init)
From: |
Werner Lemberg |
Subject: |
[freetype2-demos] master 3292461: * graph/gblblit.c (gblender_blit_init): Remove dummy fallback. |
Date: |
Wed, 24 Nov 2021 22:37:56 -0500 (EST) |
branch: master
commit 32924617f22e14d0499664356732916d00b4cfa7
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
* graph/gblblit.c (gblender_blit_init): Remove dummy fallback.
---
graph/gblblit.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/graph/gblblit.c b/graph/gblblit.c
index cfad8d1..fcd73db 100644
--- a/graph/gblblit.c
+++ b/graph/gblblit.c
@@ -248,15 +248,6 @@ blit_funcs[GBLENDER_TARGET_MAX] =
};
-static void
-_gblender_blit_dummy( GBlenderBlit blit,
- grColor color )
-{
- (void)blit;
- (void)color;
-}
-
-
static int
gblender_blit_init( GBlenderBlit blit,
int dst_x,
@@ -308,6 +299,7 @@ gblender_blit_init( GBlenderBlit blit,
case gr_pixel_mode_mono: src_format = GBLENDER_SOURCE_MONO;
break;
default:
+ grError = gr_err_bad_source_depth;
return -2;
}
@@ -319,20 +311,13 @@ gblender_blit_init( GBlenderBlit blit,
case gr_pixel_mode_rgb565: dst_format = GBLENDER_TARGET_RGB565; break;
case gr_pixel_mode_rgb555: dst_format = GBLENDER_TARGET_RGB555; break;
default:
+ grError = gr_err_bad_target_depth;
return -2;
}
blit->blender = surface->gblender;
blit->blit_func = blit_funcs[dst_format][src_format];
- if ( blit->blit_func == 0 )
- {
- /* unsupported blit mode
- */
- blit->blit_func = _gblender_blit_dummy;
- return -2;
- }
-
if ( dst_x < 0 )
{
src_width += dst_x;
@@ -358,10 +343,7 @@ gblender_blit_init( GBlenderBlit blit,
/* nothing to blit
*/
if ( src_width <= 0 || src_height <= 0 )
- {
- blit->blit_func = _gblender_blit_dummy;
return -1;
- }
blit->width = src_width;
blit->height = src_height;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2-demos] master 3292461: * graph/gblblit.c (gblender_blit_init): Remove dummy fallback.,
Werner Lemberg <=