Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
93ef20a8
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
93ef20a8
编写于
11月 03, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace most uses of is_inert with is_immutable
上级
0589787f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
24 addition
and
22 deletion
+24
-22
src/hb-buffer.cc
src/hb-buffer.cc
+16
-16
src/hb-coretext.cc
src/hb-coretext.cc
+1
-1
src/hb-font.cc
src/hb-font.cc
+1
-1
src/hb-set.hh
src/hb-set.hh
+5
-3
src/hb-shape-plan.cc
src/hb-shape-plan.cc
+1
-1
未找到文件。
src/hb-buffer.cc
浏览文件 @
93ef20a8
...
@@ -217,7 +217,7 @@ hb_buffer_t::get_scratch_buffer (unsigned int *size)
...
@@ -217,7 +217,7 @@ hb_buffer_t::get_scratch_buffer (unsigned int *size)
void
void
hb_buffer_t
::
reset
(
void
)
hb_buffer_t
::
reset
(
void
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
this
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
this
)))
return
;
return
;
hb_unicode_funcs_destroy
(
unicode
);
hb_unicode_funcs_destroy
(
unicode
);
...
@@ -232,7 +232,7 @@ hb_buffer_t::reset (void)
...
@@ -232,7 +232,7 @@ hb_buffer_t::reset (void)
void
void
hb_buffer_t
::
clear
(
void
)
hb_buffer_t
::
clear
(
void
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
this
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
this
)))
return
;
return
;
hb_segment_properties_t
default_props
=
HB_SEGMENT_PROPERTIES_DEFAULT
;
hb_segment_properties_t
default_props
=
HB_SEGMENT_PROPERTIES_DEFAULT
;
...
@@ -289,7 +289,7 @@ hb_buffer_t::add_info (const hb_glyph_info_t &glyph_info)
...
@@ -289,7 +289,7 @@ hb_buffer_t::add_info (const hb_glyph_info_t &glyph_info)
void
void
hb_buffer_t
::
remove_output
(
void
)
hb_buffer_t
::
remove_output
(
void
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
this
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
this
)))
return
;
return
;
have_output
=
false
;
have_output
=
false
;
...
@@ -302,7 +302,7 @@ hb_buffer_t::remove_output (void)
...
@@ -302,7 +302,7 @@ hb_buffer_t::remove_output (void)
void
void
hb_buffer_t
::
clear_output
(
void
)
hb_buffer_t
::
clear_output
(
void
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
this
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
this
)))
return
;
return
;
have_output
=
true
;
have_output
=
true
;
...
@@ -315,7 +315,7 @@ hb_buffer_t::clear_output (void)
...
@@ -315,7 +315,7 @@ hb_buffer_t::clear_output (void)
void
void
hb_buffer_t
::
clear_positions
(
void
)
hb_buffer_t
::
clear_positions
(
void
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
this
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
this
)))
return
;
return
;
have_output
=
false
;
have_output
=
false
;
...
@@ -873,7 +873,7 @@ void
...
@@ -873,7 +873,7 @@ void
hb_buffer_set_unicode_funcs
(
hb_buffer_t
*
buffer
,
hb_buffer_set_unicode_funcs
(
hb_buffer_t
*
buffer
,
hb_unicode_funcs_t
*
unicode_funcs
)
hb_unicode_funcs_t
*
unicode_funcs
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
buffer
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
buffer
)))
return
;
return
;
if
(
!
unicode_funcs
)
if
(
!
unicode_funcs
)
...
@@ -920,7 +920,7 @@ hb_buffer_set_direction (hb_buffer_t *buffer,
...
@@ -920,7 +920,7 @@ hb_buffer_set_direction (hb_buffer_t *buffer,
hb_direction_t
direction
)
hb_direction_t
direction
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
buffer
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
buffer
)))
return
;
return
;
buffer
->
props
.
direction
=
direction
;
buffer
->
props
.
direction
=
direction
;
...
@@ -964,7 +964,7 @@ void
...
@@ -964,7 +964,7 @@ void
hb_buffer_set_script
(
hb_buffer_t
*
buffer
,
hb_buffer_set_script
(
hb_buffer_t
*
buffer
,
hb_script_t
script
)
hb_script_t
script
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
buffer
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
buffer
)))
return
;
return
;
buffer
->
props
.
script
=
script
;
buffer
->
props
.
script
=
script
;
...
@@ -1008,7 +1008,7 @@ void
...
@@ -1008,7 +1008,7 @@ void
hb_buffer_set_language
(
hb_buffer_t
*
buffer
,
hb_buffer_set_language
(
hb_buffer_t
*
buffer
,
hb_language_t
language
)
hb_language_t
language
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
buffer
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
buffer
)))
return
;
return
;
buffer
->
props
.
language
=
language
;
buffer
->
props
.
language
=
language
;
...
@@ -1046,7 +1046,7 @@ void
...
@@ -1046,7 +1046,7 @@ void
hb_buffer_set_segment_properties
(
hb_buffer_t
*
buffer
,
hb_buffer_set_segment_properties
(
hb_buffer_t
*
buffer
,
const
hb_segment_properties_t
*
props
)
const
hb_segment_properties_t
*
props
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
buffer
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
buffer
)))
return
;
return
;
buffer
->
props
=
*
props
;
buffer
->
props
=
*
props
;
...
@@ -1082,7 +1082,7 @@ void
...
@@ -1082,7 +1082,7 @@ void
hb_buffer_set_flags
(
hb_buffer_t
*
buffer
,
hb_buffer_set_flags
(
hb_buffer_t
*
buffer
,
hb_buffer_flags_t
flags
)
hb_buffer_flags_t
flags
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
buffer
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
buffer
)))
return
;
return
;
buffer
->
flags
=
flags
;
buffer
->
flags
=
flags
;
...
@@ -1118,7 +1118,7 @@ void
...
@@ -1118,7 +1118,7 @@ void
hb_buffer_set_cluster_level
(
hb_buffer_t
*
buffer
,
hb_buffer_set_cluster_level
(
hb_buffer_t
*
buffer
,
hb_buffer_cluster_level_t
cluster_level
)
hb_buffer_cluster_level_t
cluster_level
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
buffer
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
buffer
)))
return
;
return
;
buffer
->
cluster_level
=
cluster_level
;
buffer
->
cluster_level
=
cluster_level
;
...
@@ -1157,7 +1157,7 @@ void
...
@@ -1157,7 +1157,7 @@ void
hb_buffer_set_replacement_codepoint
(
hb_buffer_t
*
buffer
,
hb_buffer_set_replacement_codepoint
(
hb_buffer_t
*
buffer
,
hb_codepoint_t
replacement
)
hb_codepoint_t
replacement
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
buffer
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
buffer
)))
return
;
return
;
buffer
->
replacement
=
replacement
;
buffer
->
replacement
=
replacement
;
...
@@ -1197,7 +1197,7 @@ void
...
@@ -1197,7 +1197,7 @@ void
hb_buffer_set_invisible_glyph
(
hb_buffer_t
*
buffer
,
hb_buffer_set_invisible_glyph
(
hb_buffer_t
*
buffer
,
hb_codepoint_t
invisible
)
hb_codepoint_t
invisible
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
buffer
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
buffer
)))
return
;
return
;
buffer
->
invisible
=
invisible
;
buffer
->
invisible
=
invisible
;
...
@@ -1329,7 +1329,7 @@ hb_bool_t
...
@@ -1329,7 +1329,7 @@ hb_bool_t
hb_buffer_set_length
(
hb_buffer_t
*
buffer
,
hb_buffer_set_length
(
hb_buffer_t
*
buffer
,
unsigned
int
length
)
unsigned
int
length
)
{
{
if
(
unlikely
(
hb_object_is_i
nert
(
buffer
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
buffer
)))
return
length
==
0
;
return
length
==
0
;
if
(
!
buffer
->
ensure
(
length
))
if
(
!
buffer
->
ensure
(
length
))
...
@@ -1535,7 +1535,7 @@ hb_buffer_add_utf (hb_buffer_t *buffer,
...
@@ -1535,7 +1535,7 @@ hb_buffer_add_utf (hb_buffer_t *buffer,
assert
(
buffer
->
content_type
==
HB_BUFFER_CONTENT_TYPE_UNICODE
||
assert
(
buffer
->
content_type
==
HB_BUFFER_CONTENT_TYPE_UNICODE
||
(
!
buffer
->
len
&&
buffer
->
content_type
==
HB_BUFFER_CONTENT_TYPE_INVALID
));
(
!
buffer
->
len
&&
buffer
->
content_type
==
HB_BUFFER_CONTENT_TYPE_INVALID
));
if
(
unlikely
(
hb_object_is_i
nert
(
buffer
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
buffer
)))
return
;
return
;
if
(
text_length
==
-
1
)
if
(
text_length
==
-
1
)
...
...
src/hb-coretext.cc
浏览文件 @
93ef20a8
...
@@ -353,7 +353,7 @@ hb_coretext_font_create (CTFontRef ct_font)
...
@@ -353,7 +353,7 @@ hb_coretext_font_create (CTFontRef ct_font)
hb_font_t
*
font
=
hb_font_create
(
face
);
hb_font_t
*
font
=
hb_font_create
(
face
);
hb_face_destroy
(
face
);
hb_face_destroy
(
face
);
if
(
unlikely
(
hb_object_is_i
nert
(
font
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
font
)))
return
font
;
return
font
;
hb_font_set_ptem
(
font
,
coretext_font_size_to_ptem
(
CTFontGetSize
(
ct_font
)));
hb_font_set_ptem
(
font
,
coretext_font_size_to_ptem
(
CTFontGetSize
(
ct_font
)));
...
...
src/hb-font.cc
浏览文件 @
93ef20a8
...
@@ -1377,7 +1377,7 @@ hb_font_create_sub_font (hb_font_t *parent)
...
@@ -1377,7 +1377,7 @@ hb_font_create_sub_font (hb_font_t *parent)
hb_font_t
*
font
=
_hb_font_create
(
parent
->
face
);
hb_font_t
*
font
=
_hb_font_create
(
parent
->
face
);
if
(
unlikely
(
hb_object_is_i
nert
(
font
)))
if
(
unlikely
(
hb_object_is_i
mmutable
(
font
)))
return
font
;
return
font
;
font
->
parent
=
hb_font_reference
(
parent
);
font
->
parent
=
hb_font_reference
(
parent
);
...
...
src/hb-set.hh
浏览文件 @
93ef20a8
...
@@ -225,15 +225,17 @@ struct hb_set_t
...
@@ -225,15 +225,17 @@ struct hb_set_t
return
true
;
return
true
;
}
}
inline
void
clear
(
void
)
{
inline
void
clear
(
void
)
if
(
unlikely
(
hb_object_is_inert
(
this
)))
{
if
(
unlikely
(
hb_object_is_immutable
(
this
)))
return
;
return
;
successful
=
true
;
successful
=
true
;
population
=
0
;
population
=
0
;
page_map
.
resize
(
0
);
page_map
.
resize
(
0
);
pages
.
resize
(
0
);
pages
.
resize
(
0
);
}
}
inline
bool
is_empty
(
void
)
const
{
inline
bool
is_empty
(
void
)
const
{
unsigned
int
count
=
pages
.
len
;
unsigned
int
count
=
pages
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
pages
[
i
].
is_empty
())
if
(
!
pages
[
i
].
is_empty
())
...
...
src/hb-shape-plan.cc
浏览文件 @
93ef20a8
...
@@ -343,7 +343,7 @@ hb_shape_plan_execute (hb_shape_plan_t *shape_plan,
...
@@ -343,7 +343,7 @@ hb_shape_plan_execute (hb_shape_plan_t *shape_plan,
if
(
unlikely
(
!
buffer
->
len
))
if
(
unlikely
(
!
buffer
->
len
))
return
true
;
return
true
;
assert
(
!
hb_object_is_i
nert
(
buffer
));
assert
(
!
hb_object_is_i
mmutable
(
buffer
));
assert
(
buffer
->
content_type
==
HB_BUFFER_CONTENT_TYPE_UNICODE
);
assert
(
buffer
->
content_type
==
HB_BUFFER_CONTENT_TYPE_UNICODE
);
if
(
unlikely
(
hb_object_is_inert
(
shape_plan
)))
if
(
unlikely
(
hb_object_is_inert
(
shape_plan
)))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录