diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
commit | a38fc482eeeb2c1929803c233835369dcf1b8781 (patch) | |
tree | 73115efff0a679d5d62e2150a35d135651175ec7 /src/smooth | |
parent | f463818dd9146e11105c0572fb119e757eb47768 (diff) | |
download | android_external_freetype-a38fc482eeeb2c1929803c233835369dcf1b8781.tar.gz android_external_freetype-a38fc482eeeb2c1929803c233835369dcf1b8781.tar.bz2 android_external_freetype-a38fc482eeeb2c1929803c233835369dcf1b8781.zip |
Initial Contribution
Diffstat (limited to 'src/smooth')
-rw-r--r-- | src/smooth/Jamfile | 29 | ||||
-rw-r--r-- | src/smooth/ftgrays.c | 23 | ||||
-rw-r--r-- | src/smooth/module.mk | 27 | ||||
-rw-r--r-- | src/smooth/rules.mk | 69 |
4 files changed, 13 insertions, 135 deletions
diff --git a/src/smooth/Jamfile b/src/smooth/Jamfile deleted file mode 100644 index 8a792df..0000000 --- a/src/smooth/Jamfile +++ /dev/null @@ -1,29 +0,0 @@ -# FreeType 2 src/smooth Jamfile -# -# Copyright 2001 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) smooth ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = ftgrays ftsmooth ; - } - else - { - _sources = smooth ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/smooth Jamfile diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 5a4a544..add1dd2 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -144,10 +144,10 @@ #include "ftsmerrs.h" -#define ErrRaster_Invalid_Mode Smooth_Err_Cannot_Render_Glyph -#define ErrRaster_Invalid_Outline Smooth_Err_Invalid_Outline -#define ErrRaster_Memory_Overflow Smooth_Err_Out_Of_Memory -#define ErrRaster_Invalid_Argument Smooth_Err_Bad_Argument +#define ErrRaster_Invalid_Mode Smooth_Err_Cannot_Render_Glyph +#define ErrRaster_Invalid_Outline Smooth_Err_Invalid_Outline +#define ErrRaster_Memory_Overflow Smooth_Err_Out_Of_Memory +#define ErrRaster_Invalid_Argument Smooth_Err_Bad_Argument #endif /* !_STANDALONE_ */ @@ -1659,7 +1659,7 @@ ras.count_ex = ras.max_ex - ras.min_ex; ras.count_ey = ras.max_ey - ras.min_ey; - /* simple heuristic used to speed-up the bezier decomposition -- see */ + /* simple heuristic used to speed up the bezier decomposition -- see */ /* the code in gray_render_conic() and gray_render_cubic() for more */ /* details */ ras.conic_level = 32; @@ -1796,11 +1796,14 @@ if ( !raster || !raster->buffer || !raster->buffer_size ) return ErrRaster_Invalid_Argument; + if ( !outline ) + return ErrRaster_Invalid_Outline; + /* return immediately if the outline is empty */ if ( outline->n_points == 0 || outline->n_contours <= 0 ) return 0; - if ( !outline || !outline->contours || !outline->points ) + if ( !outline->contours || !outline->points ) return ErrRaster_Invalid_Outline; if ( outline->n_points != @@ -1850,10 +1853,10 @@ gray_init_cells( worker, raster->buffer, raster->buffer_size ); - ras.outline = *outline; - ras.num_cells = 0; - ras.invalid = 1; - ras.band_size = raster->band_size; + ras.outline = *outline; + ras.num_cells = 0; + ras.invalid = 1; + ras.band_size = raster->band_size; ras.num_gray_spans = 0; if ( target_map ) diff --git a/src/smooth/module.mk b/src/smooth/module.mk deleted file mode 100644 index 05ad4ba..0000000 --- a/src/smooth/module.mk +++ /dev/null @@ -1,27 +0,0 @@ -# -# FreeType 2 smooth renderer module definition -# - - -# Copyright 1996-2000, 2006 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - - -FTMODULE_H_COMMANDS += SMOOTH_RENDERER - -define SMOOTH_RENDERER -$(OPEN_DRIVER)ft_smooth_renderer_class$(CLOSE_DRIVER) -$(ECHO_DRIVER)smooth $(ECHO_DRIVER_DESC)anti-aliased bitmap renderer$(ECHO_DRIVER_DONE) -$(OPEN_DRIVER)ft_smooth_lcd_renderer_class$(CLOSE_DRIVER) -$(ECHO_DRIVER)smooth $(ECHO_DRIVER_DESC)anti-aliased bitmap renderer for LCDs$(ECHO_DRIVER_DONE) -$(OPEN_DRIVER)ft_smooth_lcdv_renderer_class$(CLOSE_DRIVER) -$(ECHO_DRIVER)smooth $(ECHO_DRIVER_DESC)anti-aliased bitmap renderer for vertical LCDs$(ECHO_DRIVER_DONE) -endef - -# EOF diff --git a/src/smooth/rules.mk b/src/smooth/rules.mk deleted file mode 100644 index 4f27f01..0000000 --- a/src/smooth/rules.mk +++ /dev/null @@ -1,69 +0,0 @@ -# -# FreeType 2 smooth renderer module build rules -# - - -# Copyright 1996-2000, 2001, 2003 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - - -# smooth driver directory -# -SMOOTH_DIR := $(SRC_DIR)/smooth - -# compilation flags for the driver -# -SMOOTH_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SMOOTH_DIR)) - - -# smooth driver sources (i.e., C files) -# -SMOOTH_DRV_SRC := $(SMOOTH_DIR)/ftgrays.c \ - $(SMOOTH_DIR)/ftsmooth.c - - -# smooth driver headers -# -SMOOTH_DRV_H := $(SMOOTH_DRV_SRC:%c=%h) \ - $(SMOOTH_DIR)/ftsmerrs.h - - -# smooth driver object(s) -# -# SMOOTH_DRV_OBJ_M is used during `multi' builds. -# SMOOTH_DRV_OBJ_S is used during `single' builds. -# -SMOOTH_DRV_OBJ_M := $(SMOOTH_DRV_SRC:$(SMOOTH_DIR)/%.c=$(OBJ_DIR)/%.$O) -SMOOTH_DRV_OBJ_S := $(OBJ_DIR)/smooth.$O - -# smooth driver source file for single build -# -SMOOTH_DRV_SRC_S := $(SMOOTH_DIR)/smooth.c - - -# smooth driver - single object -# -$(SMOOTH_DRV_OBJ_S): $(SMOOTH_DRV_SRC_S) $(SMOOTH_DRV_SRC) \ - $(FREETYPE_H) $(SMOOTH_DRV_H) - $(SMOOTH_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(SMOOTH_DRV_SRC_S)) - - -# smooth driver - multiple objects -# -$(OBJ_DIR)/%.$O: $(SMOOTH_DIR)/%.c $(FREETYPE_H) $(SMOOTH_DRV_H) - $(SMOOTH_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) - - -# update main driver object lists -# -DRV_OBJS_S += $(SMOOTH_DRV_OBJ_S) -DRV_OBJS_M += $(SMOOTH_DRV_OBJ_M) - - -# EOF |