src/smooth/ftgrays.c


Log

Author Commit Date CI Message
Alexei Podtelezhnikov 4fef1fce 2022-06-10T11:34:56 [smooth] Fix GCC LTO crashes on Windows. Fixes #1164 by using a volatile variable around `setjmp`. It is hard to say how this fixes crashes related to certain link-time optimizations. This does not decrease the rendering performance. * src/smooth/ftgrays.c (gray_convert_glyph_inner): Use volatile `error`.
bruvzg 9acefc4f 2022-06-09T10:51:07 * src/smooth/ftgrays.c [FT_STATIC_RASTER]: Fix compilation.
Werner Lemberg d0cfb4e1 2022-01-11T10:54:10 Update all copyright notices.
Alexander Borsuk 4eb6cb88 2021-12-25T09:23:58 Fix warnings for CMake Unity builds. * src/cache/ftcbasic.c (FT_COMPONENT): Undefine macro before redefinition. * src/smooth/ftgrays.c (TRUNC, FRACT): Ditto.
Werner Lemberg f5ce1824 2021-11-20T07:56:34 [smooth] Fix stand-alone compilation. * src/smooth/ftgrays.c (FT_Trace_Enable, FT_Trace_Disable)[STANDALONE_]: Define.
Werner Lemberg 8c8f51c5 2021-11-19T21:50:22 Avoid undefined left-shifts. We really have to use double casts to avoid issues with C's and C++'s signedness propagation rules in implicit casts. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41178 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41182 * include/freetype/config/public-macros.h (FT_STATIC_CAST, FT_REINTERPRET_CAST): Modify macro to take two arguments. Update all callers. (FT_STATIC_BYTE_CAST): New macro. * include/freetype/freetype.h (FT_ENC_TAG): Use `FT_STATIC_BYTE_CAST`. * include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto. * include/freetype/fttypes.h (FT_MAKE_TAG): Ditto. Use `FT_Tag` for casting. * src/ftraster/ftmisc.h (FT_MAKE_TAG): Removed, no longer needed. (FT_STATIC_BYTE_CAST): New macro. * src/smooth/ftgrays.c (FT_STATIC_CAST): Replace with... (FT_STATIC_BYTE_CAST): ... this.
Werner Lemberg 9079c5d9 2021-11-13T08:53:19 Provide C++ versions for public macros with casts. Many FreeType clients use C++. However `g++ -Wold-style-cast` warns for macros with C-style casts even for system header files; this also affects directories included with `-isystem`. While this could be seen as a problem with g++, the problem is more a philosophical one: Over the time, C and C++ diverged more and more, and some features of C are no longer the 'right' solution in C++. * include/freetype/config/public-macros.h (FT_STATIC_CAST, FT_REINTERPRET_CAST): New macros. * include/freetype/freetype.h (FT_ENC_TAG, FT_LOAD_TARGET_, FT_LOAD_TARGET_MODE): Use `FT_STATIC_CAST`. Correctly handle negative 'signed char' input. * include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto. * include/freetype/fttypes.h (FT_MAKE_TAG, FT_BOOL): Ditto. * include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): Use `FT_REINTERPRET_CAST`. * src/smooth/ftgrays.c (FT_STATIC_CAST)[STANDALONE_]: New macro. [!STANDALONE]: Include `FT_CONFIG_CONFIG_H`. Fixes #1116.
Werner Lemberg 238245cd 2021-11-16T22:07:28 Fix clang++ warnings. * src/*: Initialize some variables to NULL.
Werner Lemberg d31bafcb 2021-11-14T11:02:54 Fix clang warnings. * src/gxvalid/gxvcmmn.h (GXV_SET_ERR_IF_PARANOID): Use 'do' block. * src/gxvalid/gxvmod.c (GXV_TABLE_LOAD, GXV_TABLE_VALIDATE): Ditto. * src/smooth/ftgrays.c (gray_convert_glyph): Add cast. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Remove cast. * src/type1/t1load.c (read_binay_data): Use `FT_ULong` for `size` parameter. (parse_subrs, parse_charstrings, parse_dict): Ditto; also add some casts.
Alexei Podtelezhnikov 0f23ae2e 2021-10-05T16:28:40 * src/smooth/ftgrays.c (FT_DIV_MOD): Limit the ARM workaround.
Alexei Podtelezhnikov 61903609 2021-09-20T22:18:29 Minor.
Alexei Podtelezhnikov 7f8f0c1c 2021-09-02T23:30:31 [smooth, raster, sdf] Clean up initialization calls. * src/raster/ftraster.c (ft_black_init): Removed. (ft_black_new): Clean up. * src/sdf/ftbsdf.c (bsdf_raster_new): Ditto. * src/sdf/ftsdf.c (sdf_raster_new): Ditto. * src/smooth/ftgrays.c (gray_raster_new): Ditto.
Alexei Podtelezhnikov b6c11d49 2021-08-30T07:09:53 [smooth] Reduce shift in multiply-shift optimization. * src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): Reduce shift. Smaller shifts that keep the division operands of FT_UDIVPREP within 32 bits result in slightly faster divisions, which is noticeable in the overall performance. The loss of precision is tolerable until the divisors (the components dx and dy) approach 32 - PIXEL_BITS. With PIXEL_BITS = 8, this corresponds to 65,000 pixels or the bitmap size that we refuse to render anyway. Using `ftbench -p -s60 -t5 -bc timesi.ttf`, Before: 8.52 us/op After: 8.32 us/op
Ben Wagner a842a098 2021-08-26T16:12:22 [smooth] Detect SSE2 with MSVC for x86 MSVC does not set `__SSE2__`. Instead one must check whether `_M_IX86_FP` is defined and greater than or equal to 2. * src/smooth/ftgrays.c (FT_SSE2): New macro. Use it where appropriate.
Alexei Podtelezhnikov 3785393d 2021-08-26T15:31:11 Expand comment (cont'd).
Alexei Podtelezhnikov 686e2a5e 2021-08-25T23:18:43 Expand comment.
Alexei Podtelezhnikov f7f9cb0d 2021-08-24T15:29:06 * src/smooth/ftgrays.c (gray_render_conic): Refactor redundancy.
Alexei Podtelezhnikov d62d583d 2021-08-20T23:40:49 [smooth] Clean up the null cell usage. Put the null cell at the end of the pool and store it explicitly so that we can use it as both the limit and the dumpster. * src/smooth/ftgrays.c (gray_TWorker): Store the last `cell_null` and remove unnecesary fields. (NULL_CELL_PTR, CELL_IS_NULL): Remove in favor of explicit `cell_null`. (gray_dump_cells, gray_set_cell, gray_sweep{,_direct}): Update callers. (gray_convert_glyph_inner): Trace remaining cells (oh well). (gray_convert_glyph): Set up `cell_null` and slightly improve the pool management.
Alexei Podtelezhnikov de3b5c20 2021-08-20T13:51:40 [smooth] Fortify 64-bit algorithm. * src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): s/long/FT_Int64/ and s/unsigned long/FT_UInt64/. (gray_render_line): Adjust a critical variable type.
Alexei Podtelezhnikov 85703839 2021-08-18T23:05:51 Use FT_INT64 instead of FT_LONG64. * include/freetype/config/integer-types.h: Remove synonymous FT_LONG64. * include/freetype/internal/ftcalc.h: s/FT_LONG64/FT_INT64/. * src/base/ftcalc.c: Ditto. * src/base/fttrigon.c: Ditto. * src/smooth/ftgrays.c: Ditto.
Werner Lemberg 18fc64e6 2021-08-07T17:11:57 [smooth] Avoid integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36243 * src/smooth/ftgrays.c(ADD_LONG, SUB_LONG, MUL_LONG, NEG_LONG) [STANDALONE_]: Removed, unused. (ADD_INT) [STANDALONE_]: New macro. (FT_INTEGRATE): Use ADD_INT.
Werner Lemberg 6be8bfe4 2021-08-06T08:31:22 [smooth] Fix left shifts of negative numbers. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36241 * src/smooth/ftgrays.c (LEFT_SHIFT): New macro. (gray_render_conic) [BEZIER_USE_DDA]: Use it.
Werner Lemberg c2fa51d9 2021-07-24T20:32:16 Fix some `cppcheck` warnings. * src/bzip2/ftbzip2.c (ft_bzip2_file_skip_output), src/gzip/ftgzip.c (ft_gzip_file_skip_output): Reduce scope of `delta`. * src/psaux/psintrp.c, src/psaux/psintrp.h (cf2_interpT2CharString): Add `const` to `buf` parameter. * src/raster/ftraster.c (DelOld): Add `const` to `profile` parameter. (Vertical_Sweep_Span): Reduce scope of `target`. (FT_Outline_Get_CBox): Reduce scope of `xMin`, `xMax`, `yMin`, `yMax`. * src/smooth/ftgrays.c (gray_render_conic): Reduce scope of `split`. (gray_sweep, gray_sweep_direct): Reduce scope of `area`. * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Reduce scope of `temp`.
David Turner 357b353c 2021-07-16T11:12:13 * src/smooth/ftgrays.c: Fix compilation if `FT_LONG64` is undefined. The code assumed that if `__SSE2__` is defined, then 64-bit integer types are available. This is not the case apparently for certain multilib compiler targets like 'x86_32.x86' used by Gentoo. This patch fixes the issue by disabling the special code path when 64-bit integer types are not available. Fixes #1071.
Werner Lemberg 552fc97f 2021-07-16T07:49:20 [smooth] Minor fixes. * src/smooth/ftgrays.c (gray_render_conic): Move variable and structure declarations to beginning of function. Inspite of C99 compliance we still do this for the sake of backward compatibility. This also avoids a shadowing declaration of `count`. (gray_convert_glyph_inner): Fix typo.
Werner Lemberg 93771d61 2021-07-16T07:40:56 Formatting and ChangeLog additions for previous commits.
Ben Wagner c37c0873 2021-07-15T11:33:16 Guard inclusion of emmintrin.h Guard inclusion of emmintrin.h with "#ifdef __SSE2__". The gcc version of this header, xmmintrin.h, and mmintrin.h check that the appropriate defines are set before defining anything (are internally guarded). However the clang versions of these includes are not internally guarded. As a result of this, externally guard the inclusion of these headers.
David Turner 56cc2ad4 2021-06-19T10:26:53 [smooth] Implement Bezier quadratic arc flattenning with DDA Benchmarking shows that this provides a very slighty performance boost when rendering fonts with lots of quadratic bezier arcs, compared to the recursive arc splitting, but only when SSE2 is available, or on 64-bit CPUs. On a 2017 Core i5-7300U CPU on Linux/x86_64: ./ftbench -p -s10 -t5 -cb .../DroidSansFallbackFull.ttf Before: 4.033 us/op (best of 5 runs for all numbers) After: 3.876 us/op ./ftbench -p -s60 -t5 -cb .../DroidSansFallbackFull.ttf Before: 13.467 us/op After: 13.385 us/op
David Turner 86b9c934 2021-06-19T11:18:40 [smooth] Minor speedup to smooth rasterizer This speeds up the smooth rasterizer by avoiding a conditional branches in the hot path. Namely: - Define a fixed "null cell" which will be pointed to whenever the current cell is outside of the current target region. This avoids a "ras.cell != NULL" check in the FT_INTEGRATE() macro. - Also use the null cell as a sentinel at the end of all ycells[] linked-lists, by setting its x coordinate to INT_MAX. This avoids a 'if (!cell)' check in gray_set_cell() as well. - Slightly change the worker struct fields to perform a little less operations during rendering. Example results (on a 2013 Corei5-3337U CPU) out/ftbench -p -s10 -t5 -bc /usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf Before: 5.472 us/op After: 5.275 us/op out/ftbench -p -s60 -t5 -bc /usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf Before: 17.988 us/op After: 17.389 us/op
Alexei Podtelezhnikov 1e0cef9e 2021-06-24T00:19:50 [smooth, raster] Fix up and align error codes. FT_Render_Glyph picked up FAILURE or 1 returned from the raster function, which became a confusing error code. Instead, return Raster_Overflow in the unlikely event that banding does not help or another meaningful error. * src/smooth/ftgrays.c (gray_convert_glyph_inner, gray_convert_glyph): Use Raster_Overflow when the rendering pool is exhausted and return it if banding does not help. (gray_raster_render): Use Smooth_Err_Ok. * src/raster/ftraster.c (Render_Single_Pass): Return Raster_Overflow if banding does not help or another error code.
Alexei Podtelezhnikov d8ac180c 2021-06-23T23:32:02 [smooth, raster] Remove synonymous error macros. * src/smooth/ftgays.c [STANDALONE_]: s/ErrRaster_/Smooth_Err_/. (gray_convert_glyph_inner): Updated accordingly. * src/raster/ftraster.c [STANDALONE_]: Do not abbreviate error macros. (New_Profile, End_Profile, Insert_Y_Turn, Line_Up, Bezier_Up, Decompose_Curve, Draw_Sweep, Render_Single_Pass, ft_black_render): Updated accordingly.
Alexei Podtelezhnikov 2d3f5dd2 2021-05-12T17:24:35 * src/smooth/ftgrays.c (FT_MAX_GRAY_SPANS): Increase from 10 to 16. Ten was barely enough for two slanted stems. Sixteen can actually fit a bit more complicated scanlines.
Alexei Podtelezhnikov c653b8d2 2021-05-12T16:17:21 * src/smooth/ftgrays.c (FT_GRAY_SET): Adjust for better code.
Alexei Podtelezhnikov 8f43d324 2021-05-12T00:04:59 [smooth] Faster bitmap sweeping. Selecting the fill rule or checking the direct mode each time we call `gray_hline' is sub-optimal. This effectively splits the direct mode into a separate code path while inlining `gray_hline' and saving 5-7% of rendering time. * src/smooth/ftgrays.c (gray_hline): Eliminated in favor of... (FT_FILL_RULE, FT_GRAY_SET): ... these new macros... (gray_sweep): ... inlined here. (gray_sweep_direct): New function that handles the direct span buffer. (gray_TWorker): Remove the span buffer. (gray_raster_render, gray_convert_glyph): Updated.
Alexei Podtelezhnikov b0702645 2021-05-10T22:06:01 * src/smooth/ftgrays.c (gray_hline): Simplify even-odd computations. It is too bad the even-odd rule is not used much.
Alexei Podtelezhnikov fb9bf2ef 2021-03-15T22:33:17 * src/smooth/ftgrays.c (gray_set_cell): Refactor to fix VC++ warning.
Alexei Podtelezhnikov 80bda804 2021-03-11T22:40:19 [smooth] Reduce copying during integration phase. We now record `cover' and `area' directly into the linked list. This makes rendering faster by 10% or even more at larger sizes. * src/smooth/ftgrays.c (FT_INTEGRATE): Write directly. (gray_TWorker): Add direct cell reference and remove unused fields. (gray_set_cell): Consolidate the linked list management and pointers. (gray_convert_glyph, gray_convert_glyph_inner): Updated.
Alexei Podtelezhnikov d5b7de55 2021-03-11T22:08:45 * src/smooth/ftgrays.c (FT_INTEGRATE): New convenience macro. (gray_render_line, gray_render_scanline): Use it.
Alexei Podtelezhnikov 85168499 2021-03-09T22:14:44 * src/smooth/ftgrays.c (gray_render_line): Rearrange conditionals. These produce faster or more optimizable code.
Werner Lemberg b6e8a712 2021-01-17T07:18:48 Update all copyright notices.
Priyesh Kumar 53be1753 2020-07-28T07:33:40 Fix `-Wformat' compiler warnings. * src/*: Fix format specifiers. * builds/unix/ftsystem.c (FT_Stream_Open): Ditto.
Werner Lemberg 16586859 2020-06-13T21:15:45 Remove redundant inclusion of `ft2build.h'. * */*: Remove `#include <ft2build.h>' where possible. * include/freetype/freetype.h: Remove cpp error about missing inclusion of `ft2build.h'.
David Turner e1339133 2020-06-08T13:31:55 Make macros for header file names optional. We no longer have to take care of the 8.3 file name limit; this allows us (a) to introduce longer, meaningful file names, and (b) to avoid macro names in `#include' lines altogether since some compilers (most notably Visual C++) doesn't support this properly. */*: Replace #include FOO_H with #include <freetype/foo.h> or something similar. Also update the documentation.
Werner Lemberg e5038be7 2020-01-19T17:05:19 Update all copyright notices.
Alexei Podtelezhnikov e7ac9288 2019-06-13T00:17:36 [smooth] Restore the span buffering for direct mode only. The buffer size FT_MAX_GRAY_SPANS is set to 10 spans, which should be enough to cover the entire scanline for simple glyphs in most cases: each slightly slanted edge needs up to two spans, plus a filling span in-between. This is not new, we used to do it before cb4388783cecc. * src/smooth/ftgrays.c (gray_TWorker): Add `spans' and `num_spans'. (gray_hline, gray_sweep): Implement the span buffering. (gray_raster_render): Use negative `num_spans' to avoid the direct mode.
Alexei Podtelezhnikov bdac4cbe 2019-06-12T21:58:35 Rendering considerations.
Werner Lemberg 9159128a 2019-05-29T07:45:54 Silence gcc 7's fall-through warnings in `switch' blocks. Instead of an intentionally missing `break' statement there must be a comment line containing `fall through' (and nothing else) right before the next `case' statement. See https://stackoverflow.com/questions/45129741/gcc-7-wimplicit-fallthrough-warnings-and-portable-way-to-clear-them
Alexei Podtelezhnikov 141e3173 2019-05-20T23:09:59 Rendering considerations.
Alexei Podtelezhnikov bc3b5281 2019-05-08T22:08:40 [smooth] Faster fractions. * src/smooth/ftgrays.c (SUBPIXELS): Replace with... (FRACT): A fractional coordinate macro to use in... (gray_render_line, gray_render_scanline): ... here.
Alexei Podtelezhnikov 81725773 2019-05-04T08:11:20 * src/smooth/ftgrays.c (gray_render_line): Small shortcut.
Alexei Podtelezhnikov 300458eb 2019-05-03T23:16:42 Miscellaneous macro updates. * src/base/ftoutln.c (SCALED): Updated. * src/smooth/ftgrays.c (SCALED): Ditto. (FLOOR, ROUND, CEILING): Removed. * src/psaux/psfixed.h (cf2_fracToFixed): Updated.
Alexei Podtelezhnikov 2ea511ee 2019-04-29T22:49:15 [smooth] Simplify cubic Bézier flattening. The previous implementation is correct but it is too complex. The revised algorithm is based on the fact that each split moves the control points closer to the trisection points on the chord. The corresponding distances are good surrogates for the curve deviation from the straight line. This cubic flattening algorithm is somewhat similar to the conic algorithm based the distance from the control point to the middle of the chord. The cubic distances, however, decrease less predictably but are easy enough to calculate on each step. * src/smooth/ftgrays.c (gray_render_cubic): Replace the split condition.
Alexei Podtelezhnikov 80475ede 2019-04-26T21:53:00 [smooth] Bithacks and cosmetics. * src/smooth/ftgrays.c (gray_record_cell, gray_set_cell, gray_hline, gray_render_conic, gray_convert_glyph_inner): Updated.
Alexei Podtelezhnikov 7a81b63a 2019-04-25T22:06:33 Optimize Bézier bisections. * src/raster/ftraster.c (Split_Conic, Split_Cubic): Use shifts and refactor. * src/smooth/ftgrays.c (gray_split_conic, gray_split_cubic): Ditto. * src/base/ftstroke.c (ft_conic_split, ft_cubic_split): Ditto. * src/base/ftbbox.c (cubic_peak): Use shifts.
Alexei Podtelezhnikov 1f271751 2019-04-11T23:48:21 [smooth] Fix segfault in direct mode (#56092). * src/base/ftoutln.c (FT_Outline_Render): Set missing clip_box for direct mode. * src/smooth/ftgrays.c (gray_raster_render): Use it.
Werner Lemberg 75859970 2019-02-23T10:07:09 Update all copyright notices.
Werner Lemberg f686ad46 2019-01-22T20:31:44 Update copyright years.
Werner Lemberg afa043de 2018-12-25T22:44:05 Fix links (mostly http -> https).
Werner Lemberg 9817571c 2018-10-03T08:04:55 [ftgrays] Fix typo in stand-alone mode (#54771). * src/smooth/ftgrays.c (FT_THROW) [STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: Fix call to `FT_ERR_CAT'.
Werner Lemberg a0dd16fb 2018-08-15T18:13:17 Don't use `trace_' prefix for FT_COMPONENT arguments. * include/freetype/internal/ftdebug.h (FT_TRACE_COMP, FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix. (FT_TRACE): Use `FT_TRACE_COMP'. */* (FT_COMPONENT): Updated.
Alexei Podtelezhnikov e16bfbec 2018-08-09T22:18:00 [raster, smooth] Reinstate bitmap size limits. This again moves outline and bitmap size checks one level up. * src/base/ftoutln.c (FT_Outline_Render): Explicitly reject enormous outlines. * src/raster/ftrend1.c (ft_raster1_render): Reject enormous bitmaps and, therefore, outlines that require them. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. * src/raster/ftraster.c (ft_black_render): Remove outline size checks. * src/smooth/ftgrays.c (gray_raster_render): Ditto. [STANDALONE]: Remove `FT_Outline_Get_CBox' copy.
Werner Lemberg f60c98fe 2018-08-08T18:15:53 [smooth] Improve tracing. * src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing if called the first time. (gray_convert_glyph): Updated.
Werner Lemberg ca4e707a 2018-06-06T08:18:23 [smooth, raster] Limit bitmap size (#54019). * src/raster/ftraster.c [STANDALONE] (FT_Outline_Get_CBox): Add function. [!STANDALONE]: Include FT_OUTLINE_H. (ft_black_render): Compute CBox and reject glyphs larger than 0xFFFF x 0xFFFF. * src/smooth/ftgrays.c (gray_raster_render): Reject glyphs larger than 0xFFFF x 0xFFFF.
Armin Hasitzka 80ac3645 2018-06-03T18:31:58 * src/smooth/ftgrays.c (gray_convert_glyph): Remove unused variables.
Werner Lemberg 9ac9060d 2018-06-03T09:01:17 [GSoC] src/*.*: Convert block comments to `light' style. This monster commit was created by applying Nikhil's scripts `docconverter.py' and `markify.py' to all C header and source files, followed up by minor manual clean-up. No change in functionality, of course. I used commit f7419907bc6044b9b7057f9789866426c804ba82 from https://github.com/nikramakrishnan/freetype-docs.git.
Alexei Podtelezhnikov ae248034 2018-06-02T21:42:44 [smooth] Attempt to mitigate bug #54019. The robust rendering of estra large glyphs came with unbearable cost. The old way of bisecting should fail but fail faster. * src/smooth/ftgrays.c (gray_convert_glyph): Switch back to bisecting in y-direction.
Werner Lemberg 95149592 2018-05-02T20:27:48 Remove FT_CONFIG_OPTION_PIC and related code. */* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this preprocessor symbol. */*: Replace `XXX_GET' macros (which could be either a function in PIC mode or an array in non-PIC mode) with `xxx' arrays. * include/freetype/internal/ftpic.h, src/autofit/afpic.c, src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h, src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h, src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c, src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h, src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c, src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h: Removed.
Werner Lemberg 63aaf89c 2018-02-17T10:34:47 s/sub-pixel/subpixel/.
Werner Lemberg 0a0c2256 2018-01-02T09:33:57 Update copyright year.
Werner Lemberg 71fecc53 2017-12-05T12:06:29 Improve tracing messages by using singular and plural forms. * src/*/*.c: Implement it.
Werner Lemberg 87ddad20 2017-12-04T20:43:30 Update or fix links to use the https protocol instead of http.
Alexei Podtelezhnikov ab6fe076 2017-11-06T21:34:56 * src/smooth/ftgrays.c (gray_set_cell): Fix uninitialized variables.
Alexei Podtelezhnikov 81651636 2017-11-01T22:51:03 [smooth] Fix complex rendering at high ppem. We used to split large glyphs into horizontal bands and continue bisecting them still horizontally if that was not enough. This is guaranteed to fail when a single scanline cannot fit into the rendering memory pool. Now we bisect the bands vertically so that the smallest unit is a column of the band height, which is guranteed to fit into memory. * src/smooth/ftgrays.c (gray_convert_glyph): Implement it.
Alexei Podtelezhnikov 91015cb4 2017-10-21T22:57:43 [smooth] Improve complex rendering at high ppem. At large sizes almost but not exactly horizontal segments can quickly drain the rendering pool. This patch at least avoids filling the pool with trivial cells. Beyond this, we can only increase the pool size. Reported, analyzed, and tested by Colin Fahey. * src/smooth/ftgrays.c (gray_set_cell): Do not record trivial cells.
Alexei Podtelezhnikov 6bea49e0 2017-10-14T22:45:11 [base] Netpbm image tracing. * src/base/ftobjs.c (FT_Load_Glyph): Trace bitmap size. (FT_Render_Glyph_Internal): Trace bitmap in Netpbm format. * src/smooth/ftgrays.c (gray_sweep): Sweep remnants of span tracing.
Werner Lemberg dcd8de27 2017-06-09T11:21:58 */*: Remove `OVERFLOW_' prefix. This increases readability.
Werner Lemberg cd02d359 2017-06-01T17:05:39 [smooth] Some 32bit integer overflow run-time errors. * src/smooth/ftgrays.c [STANDALONE] (OVERFLOW_ADD_LONG, OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG, NEG_LONG): New macros. [!STANDALONE]: Include FT_INTERNAL_CALC_H. (gray_render_cubic): Use those macros where appropriate.
Alexei Podtelezhnikov 761d9e41 2017-02-22T22:41:36 * src/smooth/ftgrays.c (gray_hline): Improve code.
Alexei Podtelezhnikov fcd47b3d 2017-02-12T23:07:29 * src/smooth/ftgrays.c (gray_sweep): Improve code.
Alexei Podtelezhnikov a3754d66 2017-02-01T22:36:16 Comment.
Alexei Podtelezhnikov 2ca5b07d 2017-01-31T23:13:50 * src/smooth/ftgrays.c (gray_render_scanline): Improve code.
Werner Lemberg 563ae780 2017-01-04T20:16:34 Update copyright year.
Werner Lemberg 24be60b5 2017-01-01T08:20:38 */*: Use hex numbers for errors in tracing messages.
Werner Lemberg 4441f7b2 2016-12-26T17:08:17 Replace `foo == NULL' and `foo != NULL' with `!foo' and `foo', resp. Other minor formatting.
Werner Lemberg 1d28f697 2016-11-29T18:45:22 [smooth] Revert previous commit. Already fixed with 6ca54c64.
Werner Lemberg d949a3db 2016-11-29T12:09:56 [smooth] Avoid conditional jump on uninitialized value (#49711). * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'.
Alexei Podtelezhnikov b0aacff4 2016-10-01T12:55:33 [smooth] Remove impossibility. * src/smooth/ftgrays.c (TWorker): Rearrange fields. (gray_convert_glyph): Remove impossible condition and clean up.
Werner Lemberg 45cad2e5 2016-09-28T19:10:52 More FT_ZERO usage. * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate): s/ft_memset/FT_MEM_ZERO/. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): s/ft_memset/FT_ARRAY_ZERO/. * src/raster/ftraster.c (FT_ZERO): Define. (ft_black_new): Use it. * src/raster/ftrend1.c (ft_raster1_get_cbox): s/FT_MEM_ZERO/FT_ZERO/. * src/smooth/ftgrays.c (FT_ZERO): Define. (gray_raster_new): Use it. * src/smooth/ftsmooth.c (ft_smooth_get_cbox): s/FT_MEM_ZERO/FT_ZERO/.
Alexei Podtelezhnikov 53ae7a54 2016-09-22T22:48:15 [smooth] Reduce divisions in the line renderer. We don't need some divisions if a line segments stays within a single row or a single column of pixels. * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions conditional.
Werner Lemberg c95b7652 2016-09-17T17:12:50 s/0/NULL/ for function pointers; comments, formatting.
Alexei Podtelezhnikov d5f7533e 2016-09-15T00:13:36 * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table.
Alexei Podtelezhnikov ad47550b 2016-09-14T23:15:03 [smooth] Another tiny speed-up. * src/smooth/ftgrays.c (gray_find_cell): Merge into... (gray_record_cell): ... this function.
Alexei Podtelezhnikov c38be52b 2016-09-11T22:44:44 * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code.
Alexei Podtelezhnikov 6ca54c64 2016-09-11T16:00:52 [smooth] Fix valgrind warning and reoptimize. The algorithm calls `gray_set_cell' at the start of each new contour or when the contours cross the cell boundaries. Double-checking for that is wasteful. * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell. (gray_convert_glyph): Remove initialization introduced by 44b172e88.
Alexei Podtelezhnikov a0b92bcb 2016-09-07T23:19:57 * src/smooth/ftgrays.c (gray_hline): Microptimize.
Alexei Podtelezhnikov 9d0a3bd8 2016-09-06T23:59:33 [smooth] Operate in absolute bitmap coordinates. Simpler bitmap addressing improves performance by 1.5%. * src/smooth/ftgrays.c (gray_TWorker): Remove count fields. (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline, gray_sweep, gray_convert_glyph, gray_raster_render): Updated.
Alexei Podtelezhnikov 44b172e8 2016-09-06T23:24:17 [smooth] Improve contour start (take 2). * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly instead of... (gray_start_cell): ... this function, which is removed. (gray_convert_glyph): Make initial y-coordinate invalid.
Alexei Podtelezhnikov 9773d5f7 2016-09-05T23:33:35 * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert.
Alexei Podtelezhnikov 7effc279 2016-09-05T21:58:56 [smooth] Improve contour start. * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly instead of... (gray_start_cell): ... this function, which is removed.
Werner Lemberg 16583ccd 2016-09-02T22:45:14 * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.