Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(970)

Side by Side Diff: third_party/freetype/src/smooth/ftsmooth.c

Issue 1413673003: Update bundled freetype to 2.6.1 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: DEPS for corpus Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/freetype/src/smooth/ftsmooth.h ('k') | third_party/freetype/src/smooth/ftspic.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /***************************************************************************/ 1 /***************************************************************************/
2 /* */ 2 /* */
3 /* ftsmooth.c */ 3 /* ftsmooth.c */
4 /* */ 4 /* */
5 /* Anti-aliasing renderer interface (body). */ 5 /* Anti-aliasing renderer interface (body). */
6 /* */ 6 /* */
7 /* Copyright 2000-2006, 2009-2013 by */ 7 /* Copyright 2000-2015 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9 /* */ 9 /* */
10 /* This file is part of the FreeType project, and may only be used, */ 10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */ 11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */ 13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */ 14 /* understand and accept it fully. */
15 /* */ 15 /* */
16 /***************************************************************************/ 16 /***************************************************************************/
17 17
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } 223 }
224 224
225 /* release old bitmap buffer */ 225 /* release old bitmap buffer */
226 if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) 226 if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
227 { 227 {
228 FT_FREE( bitmap->buffer ); 228 FT_FREE( bitmap->buffer );
229 slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; 229 slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
230 } 230 }
231 231
232 /* allocate new one */ 232 /* allocate new one */
233 if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) ) 233 if ( FT_ALLOC( bitmap->buffer, (FT_ULong)( pitch * height ) ) )
234 goto Exit; 234 goto Exit;
235 else 235 else
236 have_buffer = TRUE; 236 have_buffer = TRUE;
237 237
238 slot->internal->flags |= FT_GLYPH_OWN_BITMAP; 238 slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
239 239
240 slot->format = FT_GLYPH_FORMAT_BITMAP; 240 slot->format = FT_GLYPH_FORMAT_BITMAP;
241 slot->bitmap_left = (FT_Int)x_left; 241 slot->bitmap_left = (FT_Int)x_left;
242 slot->bitmap_top = (FT_Int)y_top; 242 slot->bitmap_top = (FT_Int)y_top;
243 243
244 bitmap->pixel_mode = FT_PIXEL_MODE_GRAY; 244 bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
245 bitmap->num_grays = 256; 245 bitmap->num_grays = 256;
246 bitmap->width = width; 246 bitmap->width = (unsigned int)width;
247 bitmap->rows = height; 247 bitmap->rows = (unsigned int)height;
248 bitmap->pitch = pitch; 248 bitmap->pitch = pitch;
249 249
250 /* translate outline to render it into the bitmap */ 250 /* translate outline to render it into the bitmap */
251 if ( x_shift || y_shift ) 251 if ( x_shift || y_shift )
252 { 252 {
253 FT_Outline_Translate( outline, x_shift, y_shift ); 253 FT_Outline_Translate( outline, x_shift, y_shift );
254 have_outline_shifted = TRUE; 254 have_outline_shifted = TRUE;
255 } 255 }
256 256
257 /* set up parameters */ 257 /* set up parameters */
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 (FT_Renderer_RenderFunc) ft_smooth_render_lcd_v, 502 (FT_Renderer_RenderFunc) ft_smooth_render_lcd_v,
503 (FT_Renderer_TransformFunc)ft_smooth_transform, 503 (FT_Renderer_TransformFunc)ft_smooth_transform,
504 (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox, 504 (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox,
505 (FT_Renderer_SetModeFunc) ft_smooth_set_mode, 505 (FT_Renderer_SetModeFunc) ft_smooth_set_mode,
506 506
507 (FT_Raster_Funcs*) &FT_GRAYS_RASTER_GET 507 (FT_Raster_Funcs*) &FT_GRAYS_RASTER_GET
508 ) 508 )
509 509
510 510
511 /* END */ 511 /* END */
OLDNEW
« no previous file with comments | « third_party/freetype/src/smooth/ftsmooth.h ('k') | third_party/freetype/src/smooth/ftspic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698