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

Unified Diff: third_party/freetype/src/base/ftrfork.c

Issue 815103002: Update freetype to 2.5.4. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Adjust GYP and GN Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/freetype/src/base/ftpic.c ('k') | third_party/freetype/src/base/ftsnames.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/freetype/src/base/ftrfork.c
diff --git a/core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftrfork.c b/third_party/freetype/src/base/ftrfork.c
similarity index 96%
rename from core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftrfork.c
rename to third_party/freetype/src/base/ftrfork.c
index 8ab830ea276030d25930803a3d5104e0ca67d805..5352970389adfe74eff304338dc919057e064895 100644
--- a/core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftrfork.c
+++ b/third_party/freetype/src/base/ftrfork.c
@@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (body). */
/* */
-/* Copyright 2004-2010, 2013 by */
+/* Copyright 2004-2010, 2013, 2014 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */
@@ -24,11 +24,12 @@
/***************************************************************************/
-#include "../../include/ft2build.h"
-#include "../../include/freetype/internal/ftdebug.h"
-#include "../../include/freetype/internal/ftstream.h"
-#include "../../include/freetype/internal/ftrfork.h"
+#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_STREAM_H
+#include FT_INTERNAL_RFORK_H
#include "basepic.h"
+#include "ftbase.h"
#undef FT_COMPONENT
#define FT_COMPONENT trace_raccess
@@ -151,6 +152,7 @@
FT_Long map_offset,
FT_Long rdata_pos,
FT_Long tag,
+ FT_Bool sort_by_res_id,
FT_Long **offsets,
FT_Long *count )
{
@@ -163,6 +165,7 @@
FT_RFork_Ref *ref = NULL;
+ FT_TRACE3(( "\n" ));
error = FT_Stream_Seek( stream, map_offset );
if ( error )
return error;
@@ -183,6 +186,8 @@
(char)( 0xff & ( tag_internal >> 16 ) ),
(char)( 0xff & ( tag_internal >> 8 ) ),
(char)( 0xff & ( tag_internal >> 0 ) ) ));
+ FT_TRACE3(( " : subcount=%d, suboffset=0x%04x\n",
+ subcnt, rpos ));
if ( tag_internal == tag )
{
@@ -208,11 +213,24 @@
goto Exit;
ref[j].offset = temp & 0xFFFFFFL;
+ FT_TRACE3(( " [%d]:"
+ " resource_id=0x%04x, offset=0x%08x\n",
+ j, ref[j].res_id, ref[j].offset ));
}
- ft_qsort( ref, *count, sizeof ( FT_RFork_Ref ),
- ( int(*)(const void*, const void*) )
- ft_raccess_sort_ref_by_id );
+ if (sort_by_res_id)
+ {
+ ft_qsort( ref, *count, sizeof ( FT_RFork_Ref ),
+ ( int(*)(const void*, const void*) )
+ ft_raccess_sort_ref_by_id );
+
+ FT_TRACE3(( " -- sort resources by their ids --\n" ));
+ for ( j = 0; j < *count; ++ j ) {
+ FT_TRACE3(( " [%d]:"
+ " resource_id=0x%04x, offset=0x%08x\n",
+ j, ref[j].res_id, ref[j].offset ));
+ }
+ }
if ( FT_NEW_ARRAY( offsets_internal, *count ) )
goto Exit;
« no previous file with comments | « third_party/freetype/src/base/ftpic.c ('k') | third_party/freetype/src/base/ftsnames.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698