Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
a60ba796
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a60ba796
编写于
5月 01, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
s/finish/fini
For consistency.
上级
17618ee2
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
42 addition
and
42 deletion
+42
-42
src/hb-common.cc
src/hb-common.cc
+4
-4
src/hb-mutex-private.hh
src/hb-mutex-private.hh
+1
-1
src/hb-object-private.hh
src/hb-object-private.hh
+5
-5
src/hb-ot-layout-private.hh
src/hb-ot-layout-private.hh
+2
-2
src/hb-ot-map-private.hh
src/hb-ot-map-private.hh
+7
-7
src/hb-ot-post-table.hh
src/hb-ot-post-table.hh
+1
-1
src/hb-ot-shape-private.hh
src/hb-ot-shape-private.hh
+2
-2
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+1
-1
src/hb-private.hh
src/hb-private.hh
+8
-8
src/hb-set-private.hh
src/hb-set-private.hh
+3
-3
src/hb-set.cc
src/hb-set.cc
+1
-1
src/hb-subset-glyf.cc
src/hb-subset-glyf.cc
+3
-3
src/hb-subset-plan.cc
src/hb-subset-plan.cc
+3
-3
src/hb-subset.cc
src/hb-subset.cc
+1
-1
未找到文件。
src/hb-common.cc
浏览文件 @
a60ba796
...
...
@@ -225,7 +225,7 @@ struct hb_language_item_t {
inline
hb_language_item_t
&
operator
=
(
const
char
*
s
)
{
/* If a custom allocated is used calling strdup() pairs
badly with a call to the custom free() in fini
sh
() below.
badly with a call to the custom free() in fini() below.
Therefore don't call strdup(), implement its behavior.
*/
size_t
len
=
strlen
(
s
)
+
1
;
...
...
@@ -240,7 +240,7 @@ struct hb_language_item_t {
return
*
this
;
}
void
fini
sh
(
void
)
{
free
((
void
*
)
lang
);
}
void
fini
(
void
)
{
free
((
void
*
)
lang
);
}
};
...
...
@@ -259,7 +259,7 @@ retry:
while
(
first_lang
)
{
hb_language_item_t
*
next
=
first_lang
->
next
;
first_lang
->
fini
sh
();
first_lang
->
fini
();
free
(
first_lang
);
first_lang
=
next
;
}
...
...
@@ -289,7 +289,7 @@ retry:
}
if
(
!
hb_atomic_ptr_cmpexch
(
&
langs
,
first_lang
,
lang
))
{
lang
->
fini
sh
();
lang
->
fini
();
free
(
lang
);
goto
retry
;
}
...
...
src/hb-mutex-private.hh
浏览文件 @
a60ba796
...
...
@@ -134,7 +134,7 @@ struct hb_mutex_t
inline
void
init
(
void
)
{
hb_mutex_impl_init
(
&
m
);
}
inline
void
lock
(
void
)
{
hb_mutex_impl_lock
(
&
m
);
}
inline
void
unlock
(
void
)
{
hb_mutex_impl_unlock
(
&
m
);
}
inline
void
fini
sh
(
void
)
{
hb_mutex_impl_finish
(
&
m
);
}
inline
void
fini
(
void
)
{
hb_mutex_impl_finish
(
&
m
);
}
};
...
...
src/hb-object-private.hh
浏览文件 @
a60ba796
...
...
@@ -53,7 +53,7 @@ struct hb_reference_count_t
inline
int
get_unsafe
(
void
)
const
{
return
ref_count
.
get_unsafe
();
}
inline
int
inc
(
void
)
{
return
ref_count
.
inc
();
}
inline
int
dec
(
void
)
{
return
ref_count
.
dec
();
}
inline
void
fini
sh
(
void
)
{
ref_count
.
set_unsafe
(
HB_REFERENCE_COUNT_POISON_VALUE
);
}
inline
void
fini
(
void
)
{
ref_count
.
set_unsafe
(
HB_REFERENCE_COUNT_POISON_VALUE
);
}
inline
bool
is_inert
(
void
)
const
{
return
ref_count
.
get_unsafe
()
==
HB_REFERENCE_COUNT_INERT_VALUE
;
}
inline
bool
is_valid
(
void
)
const
{
return
ref_count
.
get_unsafe
()
>
0
;
}
...
...
@@ -73,7 +73,7 @@ struct hb_user_data_array_t
inline
bool
operator
==
(
hb_user_data_key_t
*
other_key
)
const
{
return
key
==
other_key
;
}
inline
bool
operator
==
(
hb_user_data_item_t
&
other
)
const
{
return
key
==
other
.
key
;
}
void
fini
sh
(
void
)
{
if
(
destroy
)
destroy
(
data
);
}
void
fini
(
void
)
{
if
(
destroy
)
destroy
(
data
);
}
};
hb_mutex_t
lock
;
...
...
@@ -88,7 +88,7 @@ struct hb_user_data_array_t
HB_INTERNAL
void
*
get
(
hb_user_data_key_t
*
key
);
inline
void
fini
sh
(
void
)
{
items
.
finish
(
lock
);
lock
.
finish
();
}
inline
void
fini
(
void
)
{
items
.
fini
(
lock
);
lock
.
fini
();
}
};
...
...
@@ -171,8 +171,8 @@ static inline bool hb_object_destroy (Type *obj)
template
<
typename
Type
>
static
inline
void
hb_object_fini
(
Type
*
obj
)
{
obj
->
header
.
ref_count
.
fini
sh
();
/* Do this before user_data */
obj
->
header
.
user_data
.
fini
sh
();
obj
->
header
.
ref_count
.
fini
();
/* Do this before user_data */
obj
->
header
.
user_data
.
fini
();
}
template
<
typename
Type
>
static
inline
bool
hb_object_set_user_data
(
Type
*
obj
,
...
...
src/hb-ot-layout-private.hh
浏览文件 @
a60ba796
...
...
@@ -105,12 +105,12 @@ HB_INTERNAL void
hb_ot_layout_position_start
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
/* Should be called after all the position_lookup's are done, to fini
sh
advances. */
/* Should be called after all the position_lookup's are done, to fini advances. */
HB_INTERNAL
void
hb_ot_layout_position_finish_advances
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
/* Should be called after hb_ot_layout_position_finish_advances, to fini
sh
offsets. */
/* Should be called after hb_ot_layout_position_finish_advances, to fini offsets. */
HB_INTERNAL
void
hb_ot_layout_position_finish_offsets
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
...
...
src/hb-ot-map-private.hh
浏览文件 @
a60ba796
...
...
@@ -130,12 +130,12 @@ struct hb_ot_map_t
HB_INTERNAL
void
substitute
(
const
struct
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
const
;
HB_INTERNAL
void
position
(
const
struct
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
const
;
inline
void
fini
sh
(
void
)
{
features
.
fini
sh
();
inline
void
fini
(
void
)
{
features
.
fini
();
for
(
unsigned
int
table_index
=
0
;
table_index
<
2
;
table_index
++
)
{
lookups
[
table_index
].
fini
sh
();
stages
[
table_index
].
fini
sh
();
lookups
[
table_index
].
fini
();
stages
[
table_index
].
fini
();
}
}
...
...
@@ -187,11 +187,11 @@ struct hb_ot_map_builder_t
const
int
*
coords
,
unsigned
int
num_coords
);
inline
void
fini
sh
(
void
)
{
feature_infos
.
fini
sh
();
inline
void
fini
(
void
)
{
feature_infos
.
fini
();
for
(
unsigned
int
table_index
=
0
;
table_index
<
2
;
table_index
++
)
{
stages
[
table_index
].
fini
sh
();
stages
[
table_index
].
fini
();
}
}
...
...
src/hb-ot-post-table.hh
浏览文件 @
a60ba796
...
...
@@ -134,7 +134,7 @@ struct post
}
inline
void
fini
(
void
)
{
index_to_offset
.
fini
sh
();
index_to_offset
.
fini
();
free
(
gids_sorted_by_name
);
}
...
...
src/hb-ot-shape-private.hh
浏览文件 @
a60ba796
...
...
@@ -59,7 +59,7 @@ struct hb_ot_shape_plan_t
inline
void
substitute
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
const
{
map
.
substitute
(
this
,
font
,
buffer
);
}
inline
void
position
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
const
{
map
.
position
(
this
,
font
,
buffer
);
}
void
fini
sh
(
void
)
{
map
.
finish
();
}
void
fini
(
void
)
{
map
.
fini
();
}
};
struct
hb_ot_shape_planner_t
...
...
@@ -75,7 +75,7 @@ struct hb_ot_shape_planner_t
props
(
master_plan
->
props
),
shaper
(
nullptr
),
map
(
face
,
&
props
)
{}
~
hb_ot_shape_planner_t
(
void
)
{
map
.
fini
sh
();
}
~
hb_ot_shape_planner_t
(
void
)
{
map
.
fini
();
}
inline
void
compile
(
hb_ot_shape_plan_t
&
plan
,
const
int
*
coords
,
...
...
src/hb-ot-shape.cc
浏览文件 @
a60ba796
...
...
@@ -204,7 +204,7 @@ _hb_ot_shaper_shape_plan_data_destroy (hb_ot_shaper_shape_plan_data_t *plan)
if
(
plan
->
shaper
->
data_destroy
)
plan
->
shaper
->
data_destroy
(
const_cast
<
void
*>
(
plan
->
data
));
plan
->
fini
sh
();
plan
->
fini
();
free
(
plan
);
}
...
...
src/hb-private.hh
浏览文件 @
a60ba796
...
...
@@ -691,7 +691,7 @@ struct hb_prealloced_array_t
return
false
;
}
inline
void
fini
sh
(
void
)
inline
void
fini
(
void
)
{
if
(
array
!=
static_array
)
free
(
array
);
...
...
@@ -704,7 +704,7 @@ template <typename Type>
struct
hb_auto_array_t
:
hb_prealloced_array_t
<
Type
>
{
hb_auto_array_t
(
void
)
{
hb_prealloced_array_t
<
Type
>::
init
();
}
~
hb_auto_array_t
(
void
)
{
hb_prealloced_array_t
<
Type
>::
fini
sh
();
}
~
hb_auto_array_t
(
void
)
{
hb_prealloced_array_t
<
Type
>::
fini
();
}
};
...
...
@@ -726,7 +726,7 @@ struct hb_lockable_set_t
item_t
old
=
*
item
;
*
item
=
v
;
l
.
unlock
();
old
.
fini
sh
();
old
.
fini
();
}
else
{
item
=
nullptr
;
...
...
@@ -751,7 +751,7 @@ struct hb_lockable_set_t
*
item
=
items
[
items
.
len
-
1
];
items
.
pop
();
l
.
unlock
();
old
.
fini
sh
();
old
.
fini
();
}
else
{
l
.
unlock
();
}
...
...
@@ -782,11 +782,11 @@ struct hb_lockable_set_t
return
item
;
}
inline
void
fini
sh
(
lock_t
&
l
)
inline
void
fini
(
lock_t
&
l
)
{
if
(
!
items
.
len
)
{
/* No need for locking. */
items
.
fini
sh
();
items
.
fini
();
return
;
}
l
.
lock
();
...
...
@@ -794,10 +794,10 @@ struct hb_lockable_set_t
item_t
old
=
items
[
items
.
len
-
1
];
items
.
pop
();
l
.
unlock
();
old
.
fini
sh
();
old
.
fini
();
l
.
lock
();
}
items
.
fini
sh
();
items
.
fini
();
l
.
unlock
();
}
...
...
src/hb-set-private.hh
浏览文件 @
a60ba796
...
...
@@ -200,10 +200,10 @@ struct hb_set_t
page_map
.
init
();
pages
.
init
();
}
inline
void
fini
sh
(
void
)
inline
void
fini
(
void
)
{
page_map
.
fini
sh
();
pages
.
fini
sh
();
page_map
.
fini
();
pages
.
fini
();
}
inline
bool
resize
(
unsigned
int
count
)
...
...
src/hb-set.cc
浏览文件 @
a60ba796
...
...
@@ -96,7 +96,7 @@ hb_set_destroy (hb_set_t *set)
{
if
(
!
hb_object_destroy
(
set
))
return
;
set
->
fini
sh
();
set
->
fini
();
free
(
set
);
}
...
...
src/hb-subset-glyf.cc
浏览文件 @
a60ba796
...
...
@@ -248,7 +248,7 @@ _hb_subset_glyf_and_loca (const OT::glyf::accelerator_t &glyf,
&
glyf_prime_size
,
&
loca_prime_size
,
&
instruction_ranges
)))
{
instruction_ranges
.
fini
sh
();
instruction_ranges
.
fini
();
return
false
;
}
...
...
@@ -261,10 +261,10 @@ _hb_subset_glyf_and_loca (const OT::glyf::accelerator_t &glyf,
loca_prime_size
,
loca_prime_data
)))
{
free
(
glyf_prime_data
);
free
(
loca_prime_data
);
instruction_ranges
.
fini
sh
();
instruction_ranges
.
fini
();
return
false
;
}
instruction_ranges
.
fini
sh
();
instruction_ranges
.
fini
();
*
glyf_prime
=
hb_blob_create
(
glyf_prime_data
,
glyf_prime_size
,
...
...
src/hb-subset-plan.cc
浏览文件 @
a60ba796
...
...
@@ -216,9 +216,9 @@ hb_subset_plan_destroy (hb_subset_plan_t *plan)
{
if
(
!
hb_object_destroy
(
plan
))
return
;
plan
->
codepoints
.
fini
sh
();
plan
->
gids_to_retain
.
fini
sh
();
plan
->
gids_to_retain_sorted
.
fini
sh
();
plan
->
codepoints
.
fini
();
plan
->
gids_to_retain
.
fini
();
plan
->
gids_to_retain_sorted
.
fini
();
hb_face_destroy
(
plan
->
source
);
hb_face_destroy
(
plan
->
dest
);
...
...
src/hb-subset.cc
浏览文件 @
a60ba796
...
...
@@ -144,7 +144,7 @@ _hb_subset_face_data_destroy (void *user_data)
for
(
unsigned
int
i
=
0
;
i
<
data
->
tables
.
len
;
i
++
)
hb_blob_destroy
(
data
->
tables
[
i
].
blob
);
data
->
tables
.
fini
sh
();
data
->
tables
.
fini
();
free
(
data
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录