Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
f7515769
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
12 个月 前同步成功
通知
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f7515769
编写于
6月 01, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[vector] Use Crap pool in push() as well
上级
975bdd5e
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
23 addition
and
69 deletion
+23
-69
src/hb-coretext.cc
src/hb-coretext.cc
+3
-17
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+2
-1
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+1
-2
src/hb-ot-map.cc
src/hb-ot-map.cc
+4
-13
src/hb-ot-post-table.hh
src/hb-ot-post-table.hh
+1
-5
src/hb-private.hh
src/hb-private.hh
+4
-7
src/hb-subset-plan.cc
src/hb-subset-plan.cc
+0
-2
src/hb-subset.cc
src/hb-subset.cc
+0
-2
src/hb-uniscribe.cc
src/hb-uniscribe.cc
+8
-20
未找到文件。
src/hb-coretext.cc
浏览文件 @
f7515769
...
...
@@ -670,15 +670,11 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
feature_event_t
*
event
;
event
=
feature_events
.
push
();
if
(
unlikely
(
!
event
))
goto
fail_features
;
event
->
index
=
features
[
i
].
start
;
event
->
start
=
true
;
event
->
feature
=
feature
;
event
=
feature_events
.
push
();
if
(
unlikely
(
!
event
))
goto
fail_features
;
event
->
index
=
features
[
i
].
end
;
event
->
start
=
false
;
event
->
feature
=
feature
;
...
...
@@ -692,8 +688,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
feature
.
order
=
num_features
+
1
;
feature_event_t
*
event
=
feature_events
.
push
();
if
(
unlikely
(
!
event
))
goto
fail_features
;
event
->
index
=
0
;
/* This value does magic. */
event
->
start
=
false
;
event
->
feature
=
feature
;
...
...
@@ -710,8 +704,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
{
/* Save a snapshot of active features and the range. */
range_record_t
*
range
=
range_records
.
push
();
if
(
unlikely
(
!
range
))
goto
fail_features
;
if
(
active_features
.
len
)
{
...
...
@@ -769,10 +761,9 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
last_index
=
event
->
index
;
}
if
(
event
->
start
)
{
active_feature_t
*
feature
=
active_features
.
push
(
event
->
feature
);
if
(
unlikely
(
!
feature
))
goto
fail_features
;
if
(
event
->
start
)
{
active_features
.
push
(
event
->
feature
);
}
else
{
active_feature_t
*
feature
=
active_features
.
find
(
&
event
->
feature
);
if
(
feature
)
...
...
@@ -780,11 +771,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
}
}
}
else
{
fail_features:
num_features
=
0
;
}
unsigned
int
scratch_size
;
hb_buffer_t
::
scratch_buffer_t
*
scratch
=
buffer
->
get_scratch_buffer
(
&
scratch_size
);
...
...
src/hb-ot-cmap-table.hh
浏览文件 @
f7515769
...
...
@@ -211,7 +211,8 @@ struct CmapSubtableFormat4
}
// There must be a final entry with end_code == 0xFFFF. Check if we need to add one.
if
(
segment
==
nullptr
||
segment
->
end_code
!=
0xFFFF
)
{
if
(
segment
==
nullptr
||
segment
->
end_code
!=
0xFFFF
)
{
segment
=
segments
->
push
();
segment
->
start_code
.
set
(
0xFFFF
);
segment
->
end_code
.
set
(
0xFFFF
);
...
...
src/hb-ot-layout.cc
浏览文件 @
f7515769
...
...
@@ -1099,8 +1099,7 @@ struct hb_get_subtables_context_t :
inline
return_t
dispatch
(
const
T
&
obj
)
{
hb_applicable_t
*
entry
=
array
.
push
();
if
(
likely
(
entry
))
entry
->
init
(
&
obj
,
apply_to
<
T
>
);
entry
->
init
(
&
obj
,
apply_to
<
T
>
);
return
HB_VOID
;
}
static
return_t
default_return_value
(
void
)
{
return
HB_VOID
;
}
...
...
src/hb-ot-map.cc
浏览文件 @
f7515769
...
...
@@ -67,7 +67,6 @@ void hb_ot_map_builder_t::add_feature (hb_tag_t tag, unsigned int value,
hb_ot_map_feature_flags_t
flags
)
{
feature_info_t
*
info
=
feature_infos
.
push
();
if
(
unlikely
(
!
info
))
return
;
if
(
unlikely
(
!
tag
))
return
;
info
->
tag
=
tag
;
info
->
seq
=
feature_infos
.
len
;
...
...
@@ -108,8 +107,6 @@ hb_ot_map_builder_t::add_lookups (hb_ot_map_t &m,
if
(
lookup_indices
[
i
]
>=
table_lookup_count
)
continue
;
hb_ot_map_t
::
lookup_map_t
*
lookup
=
m
.
lookups
[
table_index
].
push
();
if
(
unlikely
(
!
lookup
))
return
;
lookup
->
mask
=
mask
;
lookup
->
index
=
lookup_indices
[
i
];
lookup
->
auto_zwnj
=
auto_zwnj
;
...
...
@@ -124,10 +121,8 @@ hb_ot_map_builder_t::add_lookups (hb_ot_map_t &m,
void
hb_ot_map_builder_t
::
add_pause
(
unsigned
int
table_index
,
hb_ot_map_t
::
pause_func_t
pause_func
)
{
stage_info_t
*
s
=
stages
[
table_index
].
push
();
if
(
likely
(
s
))
{
s
->
index
=
current_stage
[
table_index
];
s
->
pause_func
=
pause_func
;
}
s
->
index
=
current_stage
[
table_index
];
s
->
pause_func
=
pause_func
;
current_stage
[
table_index
]
++
;
}
...
...
@@ -238,8 +233,6 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
hb_ot_map_t
::
feature_map_t
*
map
=
m
.
features
.
push
();
if
(
unlikely
(
!
map
))
break
;
map
->
tag
=
info
->
tag
;
map
->
index
[
0
]
=
feature_index
[
0
];
...
...
@@ -321,10 +314,8 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
if
(
stage_index
<
stages
[
table_index
].
len
&&
stages
[
table_index
][
stage_index
].
index
==
stage
)
{
hb_ot_map_t
::
stage_map_t
*
stage_map
=
m
.
stages
[
table_index
].
push
();
if
(
likely
(
stage_map
))
{
stage_map
->
last_lookup
=
last_num_lookups
;
stage_map
->
pause_func
=
stages
[
table_index
][
stage_index
].
pause_func
;
}
stage_map
->
last_lookup
=
last_num_lookups
;
stage_map
->
pause_func
=
stages
[
table_index
][
stage_index
].
pause_func
;
stage_index
++
;
}
...
...
src/hb-ot-post-table.hh
浏览文件 @
f7515769
...
...
@@ -125,11 +125,7 @@ struct post
const
uint8_t
*
end
=
(
uint8_t
*
)
table
+
table_length
;
for
(
const
uint8_t
*
data
=
pool
;
data
<
end
&&
data
+
*
data
<=
end
;
data
+=
1
+
*
data
)
{
uint32_t
*
offset
=
index_to_offset
.
push
(
data
-
pool
);
if
(
unlikely
(
!
offset
))
break
;
}
index_to_offset
.
push
(
data
-
pool
);
}
inline
void
fini
(
void
)
{
...
...
src/hb-private.hh
浏览文件 @
f7515769
...
...
@@ -658,17 +658,14 @@ struct hb_vector_t
inline
Type
*
push
(
void
)
{
if
(
unlikely
(
!
resize
(
len
+
1
)))
return
nullptr
;
return
&
Crap
(
Type
);
return
&
arrayZ
[
len
-
1
];
}
inline
Type
*
push
(
const
Type
&
v
)
{
if
(
unlikely
(
!
resize
(
len
+
1
)))
return
nullptr
;
arrayZ
[
len
-
1
]
=
v
;
return
&
arrayZ
[
len
-
1
];
Type
*
p
=
push
();
*
p
=
v
;
return
p
;
}
/* Allocate for size but don't adjust len. */
...
...
src/hb-subset-plan.cc
浏览文件 @
f7515769
...
...
@@ -97,9 +97,7 @@ _populate_gids_to_retain (hb_face_t *face,
glyphs
->
alloc
(
all_gids_to_retain
->
get_population
());
gid
=
HB_SET_VALUE_INVALID
;
while
(
all_gids_to_retain
->
next
(
&
gid
))
{
glyphs
->
push
(
gid
);
}
hb_set_destroy
(
all_gids_to_retain
);
glyf
.
fini
();
...
...
src/hb-subset.cc
浏览文件 @
f7515769
...
...
@@ -224,8 +224,6 @@ hb_subset_face_add_table (hb_face_t *face, hb_tag_t tag, hb_blob_t *blob)
hb_subset_face_data_t
*
data
=
(
hb_subset_face_data_t
*
)
face
->
user_data
;
hb_subset_face_data_t
::
table_entry_t
*
entry
=
data
->
tables
.
push
();
if
(
unlikely
(
!
entry
))
return
false
;
entry
->
tag
=
tag
;
entry
->
blob
=
hb_blob_reference
(
blob
);
...
...
src/hb-uniscribe.cc
浏览文件 @
f7515769
...
...
@@ -646,15 +646,11 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
feature_event_t
*
event
;
event
=
feature_events
.
push
();
if
(
unlikely
(
!
event
))
goto
fail_features
;
event
->
index
=
features
[
i
].
start
;
event
->
start
=
true
;
event
->
feature
=
feature
;
event
=
feature_events
.
push
();
if
(
unlikely
(
!
event
))
goto
fail_features
;
event
->
index
=
features
[
i
].
end
;
event
->
start
=
false
;
event
->
feature
=
feature
;
...
...
@@ -668,8 +664,6 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
feature
.
order
=
num_features
+
1
;
feature_event_t
*
event
=
feature_events
.
push
();
if
(
unlikely
(
!
event
))
goto
fail_features
;
event
->
index
=
0
;
/* This value does magic. */
event
->
start
=
false
;
event
->
feature
=
feature
;
...
...
@@ -686,8 +680,6 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
{
/* Save a snapshot of active features and the range. */
range_record_t
*
range
=
range_records
.
push
();
if
(
unlikely
(
!
range
))
goto
fail_features
;
unsigned
int
offset
=
feature_records
.
len
;
...
...
@@ -696,8 +688,7 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
{
if
(
!
j
||
active_features
[
j
].
rec
.
tagFeature
!=
feature_records
[
feature_records
.
len
-
1
].
tagFeature
)
{
if
(
unlikely
(
!
feature_records
.
push
(
active_features
[
j
].
rec
)))
goto
fail_features
;
feature_records
.
push
(
active_features
[
j
].
rec
);
}
else
{
...
...
@@ -716,10 +707,12 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
last_index
=
event
->
index
;
}
if
(
event
->
start
)
{
if
(
unlikely
(
!
active_features
.
push
(
event
->
feature
)))
goto
fail_features
;
}
else
{
if
(
event
->
start
)
{
active_features
.
push
(
event
->
feature
);
}
else
{
active_feature_t
*
feature
=
active_features
.
find
(
&
event
->
feature
);
if
(
feature
)
active_features
.
remove
(
feature
-
active_features
.
arrayZ
);
...
...
@@ -727,7 +720,7 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
}
if
(
!
range_records
.
len
)
/* No active feature found. */
goto
fail_features
;
num_features
=
0
;
/* Fixup the pointers. */
for
(
unsigned
int
i
=
0
;
i
<
range_records
.
len
;
i
++
)
...
...
@@ -736,11 +729,6 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
range
->
props
.
potfRecords
=
feature_records
.
arrayZ
+
reinterpret_cast
<
uintptr_t
>
(
range
->
props
.
potfRecords
);
}
}
else
{
fail_features:
num_features
=
0
;
}
#define FAIL(...) \
HB_STMT_START { \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录