Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
c8f2d933
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看板
提交
c8f2d933
编写于
10月 10, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move code
In preparation to move add per-subtable set digests...
上级
a03850a3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
54 addition
and
53 deletion
+54
-53
src/hb-ot-layout-gsubgpos.hh
src/hb-ot-layout-gsubgpos.hh
+50
-0
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+4
-53
未找到文件。
src/hb-ot-layout-gsubgpos.hh
浏览文件 @
c8f2d933
...
...
@@ -259,6 +259,56 @@ struct hb_add_coverage_context_t :
};
struct
hb_get_subtables_context_t
:
hb_dispatch_context_t
<
hb_get_subtables_context_t
,
hb_void_t
,
HB_DEBUG_APPLY
>
{
template
<
typename
Type
>
static
inline
bool
apply_to
(
const
void
*
obj
,
OT
::
hb_ot_apply_context_t
*
c
)
{
const
Type
*
typed_obj
=
(
const
Type
*
)
obj
;
return
typed_obj
->
apply
(
c
);
}
typedef
bool
(
*
hb_apply_func_t
)
(
const
void
*
obj
,
OT
::
hb_ot_apply_context_t
*
c
);
struct
hb_applicable_t
{
inline
void
init
(
const
void
*
obj_
,
hb_apply_func_t
apply_func_
)
{
obj
=
obj_
;
apply_func
=
apply_func_
;
}
inline
bool
apply
(
OT
::
hb_ot_apply_context_t
*
c
)
const
{
return
apply_func
(
obj
,
c
);
}
private:
const
void
*
obj
;
hb_apply_func_t
apply_func
;
};
typedef
hb_auto_t
<
hb_vector_t
<
hb_applicable_t
>
>
array_t
;
/* Dispatch interface. */
inline
const
char
*
get_name
(
void
)
{
return
"GET_SUBTABLES"
;
}
template
<
typename
T
>
inline
return_t
dispatch
(
const
T
&
obj
)
{
hb_applicable_t
*
entry
=
array
.
push
();
entry
->
init
(
&
obj
,
apply_to
<
T
>
);
return
HB_VOID
;
}
static
return_t
default_return_value
(
void
)
{
return
HB_VOID
;
}
bool
stop_sublookup_iteration
(
return_t
r
HB_UNUSED
)
const
{
return
false
;
}
hb_get_subtables_context_t
(
array_t
&
array_
)
:
array
(
array_
),
debug_depth
(
0
)
{}
array_t
&
array
;
unsigned
int
debug_depth
;
};
struct
hb_ot_apply_context_t
:
hb_dispatch_context_t
<
hb_ot_apply_context_t
,
bool
,
HB_DEBUG_APPLY
>
{
...
...
src/hb-ot-layout.cc
浏览文件 @
c8f2d933
...
...
@@ -1112,59 +1112,10 @@ struct GPOSProxy
};
struct
hb_get_subtables_context_t
:
hb_dispatch_context_t
<
hb_get_subtables_context_t
,
hb_void_t
,
HB_DEBUG_APPLY
>
{
template
<
typename
Type
>
static
inline
bool
apply_to
(
const
void
*
obj
,
OT
::
hb_ot_apply_context_t
*
c
)
{
const
Type
*
typed_obj
=
(
const
Type
*
)
obj
;
return
typed_obj
->
apply
(
c
);
}
typedef
bool
(
*
hb_apply_func_t
)
(
const
void
*
obj
,
OT
::
hb_ot_apply_context_t
*
c
);
struct
hb_applicable_t
{
inline
void
init
(
const
void
*
obj_
,
hb_apply_func_t
apply_func_
)
{
obj
=
obj_
;
apply_func
=
apply_func_
;
}
inline
bool
apply
(
OT
::
hb_ot_apply_context_t
*
c
)
const
{
return
apply_func
(
obj
,
c
);
}
private:
const
void
*
obj
;
hb_apply_func_t
apply_func
;
};
typedef
hb_auto_t
<
hb_vector_t
<
hb_applicable_t
>
>
array_t
;
/* Dispatch interface. */
inline
const
char
*
get_name
(
void
)
{
return
"GET_SUBTABLES"
;
}
template
<
typename
T
>
inline
return_t
dispatch
(
const
T
&
obj
)
{
hb_applicable_t
*
entry
=
array
.
push
();
entry
->
init
(
&
obj
,
apply_to
<
T
>
);
return
HB_VOID
;
}
static
return_t
default_return_value
(
void
)
{
return
HB_VOID
;
}
bool
stop_sublookup_iteration
(
return_t
r
HB_UNUSED
)
const
{
return
false
;
}
hb_get_subtables_context_t
(
array_t
&
array_
)
:
array
(
array_
),
debug_depth
(
0
)
{}
array_t
&
array
;
unsigned
int
debug_depth
;
};
static
inline
bool
apply_forward
(
OT
::
hb_ot_apply_context_t
*
c
,
const
hb_ot_layout_lookup_accelerator_t
&
accel
,
const
hb_get_subtables_context_t
::
array_t
&
subtables
)
const
OT
::
hb_get_subtables_context_t
::
array_t
&
subtables
)
{
bool
ret
=
false
;
hb_buffer_t
*
buffer
=
c
->
buffer
;
...
...
@@ -1194,7 +1145,7 @@ apply_forward (OT::hb_ot_apply_context_t *c,
static
inline
bool
apply_backward
(
OT
::
hb_ot_apply_context_t
*
c
,
const
hb_ot_layout_lookup_accelerator_t
&
accel
,
const
hb_get_subtables_context_t
::
array_t
&
subtables
)
const
OT
::
hb_get_subtables_context_t
::
array_t
&
subtables
)
{
bool
ret
=
false
;
hb_buffer_t
*
buffer
=
c
->
buffer
;
...
...
@@ -1232,8 +1183,8 @@ apply_string (OT::hb_ot_apply_context_t *c,
c
->
set_lookup_props
(
lookup
.
get_props
());
hb_get_subtables_context_t
::
array_t
subtables
;
hb_get_subtables_context_t
c_get_subtables
(
subtables
);
OT
::
hb_get_subtables_context_t
::
array_t
subtables
;
OT
::
hb_get_subtables_context_t
c_get_subtables
(
subtables
);
lookup
.
dispatch
(
&
c_get_subtables
);
if
(
likely
(
!
lookup
.
is_reverse
()))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录