Commit 845f8635 authored by Ben Wagner's avatar Ben Wagner Committed by Commit Bot

Roll src/third_party/freetype/src/ 3bb512bc9..0f35b042e (8 commits)

https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/3bb512bc9f62..0f35b042e02e

$ git log 3bb512bc9..0f35b042e --date=short --no-merges --format='%ad %ae %s'
2020-07-06 david [build] Really fix multi and C++ builds.
2020-07-06 david [build] Fix multi and C++ builds.
2020-07-06 wl [psaux] Improve `t1_decoder_parse_metrics' (#58646).
2020-07-02 david [build] Improve visibility support of library function names.
2020-07-02 david [build] Split off more stuff from `ftconfig.h'.
2020-07-02 david [build] Move mac support code to `mac-support.h'.
2020-07-02 david [build] Put integer type definitions into `integer-types.h'.
2020-07-02 david [build] Rename `build/unix/ftconfig.in' to `ftconfig.h.in'.

Created with:
  roll-dep src/third_party/freetype/src
R=bungeman@chromium.org,drott@chromium.org

CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux_chromium_msan_rel_ng

Due to changes in how FreeType is including it's own headers (moving
from FT_HEADER_H to <freetype/header.h> it is necessary when overriding
headers to use the same folder structure as freetype's include/
directory. As a result the customized configuration headers are moved to
include/freetype-custom/freetype/config and the roll-freetype.sh roll
script is updated to point to the new locations of these headers.

Bug: skia:10472
Change-Id: I889e2ed0d8dc54987e7f9c6372b2d72e8703e9e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2283962
Commit-Queue: Ben Wagner <bungeman@chromium.org>
Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786077}
parent 585308f4
...@@ -250,7 +250,7 @@ vars = { ...@@ -250,7 +250,7 @@ vars = {
# Three lines of non-changing comments so that # Three lines of non-changing comments so that
# the commit queue can handle CLs rolling freetype # the commit queue can handle CLs rolling freetype
# and whatever else without interference from each other. # and whatever else without interference from each other.
'freetype_revision': '3bb512bc9f621e1329927292d9ee7ba764549cae', 'freetype_revision': '0f35b042e02e23cc6fb29d805d25aa85679274eb',
# Three lines of non-changing comments so that # Three lines of non-changing comments so that
# the commit queue can handle CLs rolling HarfBuzz # the commit queue can handle CLs rolling HarfBuzz
# and whatever else without interference from each other. # and whatever else without interference from each other.
......
...@@ -8,9 +8,10 @@ import("//third_party/harfbuzz-ng/harfbuzz.gni") ...@@ -8,9 +8,10 @@ import("//third_party/harfbuzz-ng/harfbuzz.gni")
assert(!use_system_freetype, "Not used when using system freetype.") assert(!use_system_freetype, "Not used when using system freetype.")
config("freetype_config") { config("freetype_component_config") {
include_dirs = [ include_dirs = [
"include", "include",
"include/freetype-custom",
"src/include", "src/include",
] ]
...@@ -19,14 +20,13 @@ config("freetype_config") { ...@@ -19,14 +20,13 @@ config("freetype_config") {
# GN currently does not escape '<' and '>' when generating xml based Visual # GN currently does not escape '<' and '>' when generating xml based Visual
# Studio project files. As a result, use quotes instead of pointy brackets # Studio project files. As a result, use quotes instead of pointy brackets
# in these defines. # in these defines.
"FT_CONFIG_CONFIG_H=\"freetype-custom-config/ftconfig.h\"", "FT_CONFIG_MODULES_H=\"freetype-custom/freetype/config/ftmodule.h\"",
"FT_CONFIG_MODULES_H=\"freetype-custom-config/ftmodule.h\"", "FT_CONFIG_OPTIONS_H=\"freetype-custom/freetype/config/ftoption.h\"",
"FT_CONFIG_OPTIONS_H=\"freetype-custom-config/ftoption.h\"",
] ]
if (!is_android) { if (!is_android) {
# Selects type1cid.c and type1.c modules in # Selects type1cid.c and type1.c modules in
# freetype-custom-config/ftmodule.h. # freetype-custom-include/freetype/config/ftmodule.h.
defines += [ "PDFIUM_REQUIRED_MODULES" ] defines += [ "PDFIUM_REQUIRED_MODULES" ]
} else { } else {
# Using HarfBuzz assisted autohinting has a performance impact that we do # Using HarfBuzz assisted autohinting has a performance impact that we do
...@@ -37,6 +37,16 @@ config("freetype_config") { ...@@ -37,6 +37,16 @@ config("freetype_config") {
if (!is_component_build) { if (!is_component_build) {
defines += [ "CHROMIUM_RESTRICT_VISIBILITY" ] defines += [ "CHROMIUM_RESTRICT_VISIBILITY" ]
} }
}
config("freetype_config") {
configs = [ ":freetype_component_config" ]
if (is_win && is_component_build) {
# Used for managing declspec(dllimport/export) visibility.
defines = [ "FT2_BUILD_DLL" ]
}
} }
config("freetype-warnings") { config("freetype-warnings") {
...@@ -66,9 +76,9 @@ source_set("freetype_source") { ...@@ -66,9 +76,9 @@ source_set("freetype_source") {
public = [ "src/include/ft2build.h" ] public = [ "src/include/ft2build.h" ]
sources = [ sources = [
"include/freetype-custom-config/ftconfig.h", "include/freetype-custom/freetype/config/ftmodule.h",
"include/freetype-custom-config/ftmodule.h", "include/freetype-custom/freetype/config/ftoption.h",
"include/freetype-custom-config/ftoption.h", "include/freetype-custom/freetype/config/public-macros.h",
"src/src/autofit/autofit.c", "src/src/autofit/autofit.c",
"src/src/base/ftbase.c", "src/src/base/ftbase.c",
"src/src/base/ftbbox.c", "src/src/base/ftbbox.c",
...@@ -103,7 +113,7 @@ source_set("freetype_source") { ...@@ -103,7 +113,7 @@ source_set("freetype_source") {
# FT_CONFIG_CONFIG_H. The includes/freetype/config directory should not be # FT_CONFIG_CONFIG_H. The includes/freetype/config directory should not be
# on the include path to avoid accidentally using the ftoption or ftmodule # on the include path to avoid accidentally using the ftoption or ftmodule
# from there. # from there.
include_dirs += [ "include/freetype-custom-config" ] include_dirs += [ "src/include/freetype/config" ]
# builds/unix/ftsystem.c requires the following defines to be set. # builds/unix/ftsystem.c requires the following defines to be set.
defines += [ defines += [
...@@ -136,11 +146,6 @@ source_set("freetype_source") { ...@@ -136,11 +146,6 @@ source_set("freetype_source") {
defines += [ "FT2_BUILD_LIBRARY" ] defines += [ "FT2_BUILD_LIBRARY" ]
if (is_win && is_component_build) {
# Used for managing declspec(dllimport/export) visibility.
defines += [ "FT2_BUILD_DLL" ]
}
if (use_system_harfbuzz) { if (use_system_harfbuzz) {
configs += [ "//third_party/harfbuzz-ng:harfbuzz_from_pkgconfig" ] configs += [ "//third_party/harfbuzz-ng:harfbuzz_from_pkgconfig" ]
} else { } else {
......
Name: FreeType Name: FreeType
URL: http://www.freetype.org/ URL: http://www.freetype.org/
Version: VER-2-10-2-26-g3bb512bc9 Version: VER-2-10-2-34
Revision: 3bb512bc9f621e1329927292d9ee7ba764549cae Revision: 0f35b042e02e23cc6fb29d805d25aa85679274eb
CPEPrefix: cpe:/a:freetype:freetype:2.10.1 CPEPrefix: cpe:/a:freetype:freetype:2.10.1
License: Custom license "inspired by the BSD, Artistic, and IJG (Independent License: Custom license "inspired by the BSD, Artistic, and IJG (Independent
JPEG Group) licenses" JPEG Group) licenses"
......
/****************************************************************************
*
* config/public-macros.h
*
* Define a set of compiler macros used in public FreeType headers.
*
* Copyright (C) 2020 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.
*
*/
/* The definitions in this file are used by the public FreeType headers,
* and thus should be considered part of the public API.
*
* Other compiler-specific macro definitions that are not exposed by the
* FreeType API should go into include/freetype/internal/compiler-macros.h
* instead.
*/
#ifndef FREETYPE_CONFIG_PUBLIC_MACROS_H_
#define FREETYPE_CONFIG_PUBLIC_MACROS_H_
/* FT_BEGIN_HEADER and FT_END_HEADER might have already been defined by
* <freetype/config/ftheader.h>, but we don't want to include this header
* here, so redefine the macros here only when needed. Their definition is
* very stable, so keeping them in sync with the ones in the header should
* not be a maintenance issue.
*/
#ifndef FT_BEGIN_HEADER
# ifdef __cplusplus
# define FT_BEGIN_HEADER extern "C" {
# else
# define FT_BEGIN_HEADER /* nothing */
# endif
#endif /* FT_END_HEADER */
#ifndef FT_END_HEADER
# ifdef __cplusplus
# define FT_END_HEADER }
# else
# define FT_END_HEADER /* nothing */
# endif
#endif /* FT_END_HEADER */
FT_BEGIN_HEADER
/* Mark a function declaration as public. This ensures it will be properly
* exported to client code. Place this before a function declaration.
*
* NOTE: This macro should be considered an internal implementation detail, and
* not part of the FreeType API. It is only defined here because it is needed
* by FT_EXPORT()
*/
#if defined(_WIN32)
# if defined(FT2_BUILD_DLL)
# if defined(FT2_BUILD_LIBRARY)
# define FT_PUBLIC_FUNCTION_ATTRIBUTE __declspec(dllexport)
# else
# define FT_PUBLIC_FUNCTION_ATTRIBUTE __declspec(dllimport)
# endif
# else
# define FT_PUBLIC_FUNCTION_ATTRIBUTE /* nothing */
# endif
#else
# if defined(CHROMIUM_RESTRICT_VISIBILITY)
# define FT_PUBLIC_FUNCTION_ATTRIBUTE /* nothing */
# else
# define FT_PUBLIC_FUNCTION_ATTRIBUTE __attribute__((visibility ("default")))
# endif
#endif
#ifndef FT_PUBLIC_FUNCTION_ATTRIBUTE
# define FT_PUBLIC_FUNCTION_ATTRIBUTE /* nothing */
#endif
/* Define a public FreeType API function. This ensures it is properly exported
* or imported at build time. The macro parameter is the function's return type
* as in:
*
* FT_EXPORT( FT_Bool ) FT_Object_Method( FT_Object obj, ... );
*
* NOTE: This requires that all FT_EXPORT() uses are inside FT_BEGIN_HEADER ..
* FT_END_HEADER blocks. This guarantees that the functions are exported with
* C linkage, even when the header is included by a C++ source file.
*/
#define FT_EXPORT( x ) FT_PUBLIC_FUNCTION_ATTRIBUTE extern x
/* `FT_UNUSED` indicates that a given parameter is not used -- */
/* this is only used to get rid of unpleasant compiler warnings. */
/* */
/* Technically, this was not meant to be part of the public API, */
/* but some third-party code depends on it. */
/* */
#ifndef FT_UNUSED
#define FT_UNUSED( arg ) ( (arg) = (arg) )
#endif
FT_END_HEADER
#endif /* FREETYPE_CONFIG_PUBLIC_MACROS_H_ */
...@@ -38,10 +38,10 @@ mergeinclude() { ...@@ -38,10 +38,10 @@ mergeinclude() {
previousrev && previousrev &&
STEP="merge ${INCLUDE}: check for merge conflicts" && STEP="merge ${INCLUDE}: check for merge conflicts" &&
TMPFILE=$(mktemp) && TMPFILE=$(mktemp) &&
git -C third_party/freetype/src/ cat-file blob ${PREVIOUS_FREETYPE_REV}:include/freetype/config/${INCLUDE} >> ${TMPFILE} && git -C third_party/freetype/src/ cat-file blob ${PREVIOUS_FREETYPE_REV}:include/${INCLUDE} >> ${TMPFILE} &&
git merge-file third_party/freetype/include/freetype-custom-config/${INCLUDE} ${TMPFILE} third_party/freetype/src/include/freetype/config/${INCLUDE} && git merge-file third_party/freetype/include/freetype-custom/${INCLUDE} ${TMPFILE} third_party/freetype/src/include/${INCLUDE} &&
rm ${TMPFILE} && rm ${TMPFILE} &&
git add third_party/freetype/include/freetype-custom-config/${INCLUDE} git add third_party/freetype/include/freetype-custom/${INCLUDE}
} }
checkmodules() { checkmodules() {
...@@ -59,8 +59,8 @@ rolldeps "$@" && ...@@ -59,8 +59,8 @@ rolldeps "$@" &&
addtrybots && addtrybots &&
addotherprojectbugs && addotherprojectbugs &&
updatereadme && updatereadme &&
mergeinclude ftoption.h && mergeinclude "freetype/config/ftoption.h" &&
mergeinclude ftconfig.h && mergeinclude "freetype/config/public-macros.h" &&
checkmodules && checkmodules &&
commit || commit ||
{ echo "Failed step ${STEP}"; exit 1; } { echo "Failed step ${STEP}"; exit 1; }
...@@ -285,7 +285,7 @@ if (use_system_harfbuzz) { ...@@ -285,7 +285,7 @@ if (use_system_harfbuzz) {
if (use_system_freetype) { if (use_system_freetype) {
configs += [ "//build/linux:freetype_from_pkgconfig" ] configs += [ "//build/linux:freetype_from_pkgconfig" ]
} else { } else {
configs += [ "//third_party/freetype:freetype_config" ] configs += [ "//third_party/freetype:freetype_component_config" ]
} }
configs -= [ "//build/config/compiler:chromium_code" ] configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ configs += [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment