Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
333cc6e2
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看板
提交
333cc6e2
编写于
10月 30, 2013
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[otlayout] Remove unused is_inplace()
Patch from Jonathan Kew.
上级
176fd17d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
0 addition
and
221 deletion
+0
-221
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+0
-6
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+0
-56
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+0
-159
未找到文件。
src/hb-ot-layout-gpos-table.hh
浏览文件 @
333cc6e2
...
@@ -1444,12 +1444,6 @@ struct PosLookup : Lookup
...
@@ -1444,12 +1444,6 @@ struct PosLookup : Lookup
return
false
;
return
false
;
}
}
inline
hb_is_inplace_context_t
::
return_t
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
return
TRACE_RETURN
(
true
);
}
inline
hb_collect_glyphs_context_t
::
return_t
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
inline
hb_collect_glyphs_context_t
::
return_t
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
{
TRACE_COLLECT_GLYPHS
(
this
);
TRACE_COLLECT_GLYPHS
(
this
);
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
333cc6e2
...
@@ -37,12 +37,6 @@ namespace OT {
...
@@ -37,12 +37,6 @@ namespace OT {
struct
SingleSubstFormat1
struct
SingleSubstFormat1
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -121,12 +115,6 @@ struct SingleSubstFormat1
...
@@ -121,12 +115,6 @@ struct SingleSubstFormat1
struct
SingleSubstFormat2
struct
SingleSubstFormat2
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -263,13 +251,6 @@ struct SingleSubst
...
@@ -263,13 +251,6 @@ struct SingleSubst
struct
Sequence
struct
Sequence
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
/* For len==0 we don't do anything, so it's harmless. */
return
TRACE_RETURN
(
substitute
.
len
<=
1
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -334,18 +315,6 @@ struct Sequence
...
@@ -334,18 +315,6 @@ struct Sequence
struct
MultipleSubstFormat1
struct
MultipleSubstFormat1
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
/* Some tools generate MultipleSubst with each substitute having length 1!
* So, check them. */
unsigned
int
count
=
sequence
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
(
this
+
sequence
[
i
]).
is_inplace
(
c
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -471,12 +440,6 @@ typedef ArrayOf<GlyphID> AlternateSet; /* Array of alternate GlyphIDs--in
...
@@ -471,12 +440,6 @@ typedef ArrayOf<GlyphID> AlternateSet; /* Array of alternate GlyphIDs--in
struct
AlternateSubstFormat1
struct
AlternateSubstFormat1
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -796,12 +759,6 @@ struct LigatureSet
...
@@ -796,12 +759,6 @@ struct LigatureSet
struct
LigatureSubstFormat1
struct
LigatureSubstFormat1
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
return
TRACE_RETURN
(
false
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -950,12 +907,6 @@ struct ExtensionSubst : Extension<ExtensionSubst>
...
@@ -950,12 +907,6 @@ struct ExtensionSubst : Extension<ExtensionSubst>
struct
ReverseChainSingleSubstFormat1
struct
ReverseChainSingleSubstFormat1
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -1195,13 +1146,6 @@ struct SubstLookup : Lookup
...
@@ -1195,13 +1146,6 @@ struct SubstLookup : Lookup
return
lookup_type_is_reverse
(
type
);
return
lookup_type_is_reverse
(
type
);
}
}
inline
hb_is_inplace_context_t
::
return_t
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
c
->
set_recurse_func
(
dispatch_recurse_func
<
hb_is_inplace_context_t
>
);
return
TRACE_RETURN
(
dispatch
(
c
));
}
inline
hb_closure_context_t
::
return_t
closure
(
hb_closure_context_t
*
c
)
const
inline
hb_closure_context_t
::
return_t
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
333cc6e2
...
@@ -43,56 +43,6 @@ namespace OT {
...
@@ -43,56 +43,6 @@ namespace OT {
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
"");
"");
#ifndef HB_DEBUG_IS_INPLACE
#define HB_DEBUG_IS_INPLACE (HB_DEBUG+0)
#endif
#define TRACE_IS_INPLACE(this) \
hb_auto_trace_t<HB_DEBUG_IS_INPLACE, bool> trace \
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
"");
struct
hb_is_inplace_context_t
{
inline
const
char
*
get_name
(
void
)
{
return
"IS_INPLACE"
;
}
static
const
unsigned
int
max_debug_depth
=
HB_DEBUG_IS_INPLACE
;
typedef
bool
return_t
;
typedef
return_t
(
*
recurse_func_t
)
(
hb_is_inplace_context_t
*
c
,
unsigned
int
lookup_index
);
template
<
typename
T
>
inline
return_t
dispatch
(
const
T
&
obj
)
{
return
obj
.
is_inplace
(
this
);
}
static
return_t
default_return_value
(
void
)
{
return
true
;
}
bool
stop_sublookup_iteration
(
return_t
r
)
const
{
return
!
r
;
}
return_t
recurse
(
unsigned
int
lookup_index
)
{
if
(
unlikely
(
nesting_level_left
==
0
||
!
recurse_func
))
return
default_return_value
();
nesting_level_left
--
;
bool
ret
=
recurse_func
(
this
,
lookup_index
);
nesting_level_left
++
;
return
ret
;
}
hb_face_t
*
face
;
recurse_func_t
recurse_func
;
unsigned
int
nesting_level_left
;
unsigned
int
debug_depth
;
hb_is_inplace_context_t
(
hb_face_t
*
face_
,
unsigned
int
nesting_level_left_
=
MAX_NESTING_LEVEL
)
:
face
(
face_
),
recurse_func
(
NULL
),
nesting_level_left
(
nesting_level_left_
),
debug_depth
(
0
)
{}
void
set_recurse_func
(
recurse_func_t
func
)
{
recurse_func
=
func
;
}
};
#ifndef HB_DEBUG_CLOSURE
#ifndef HB_DEBUG_CLOSURE
#define HB_DEBUG_CLOSURE (HB_DEBUG+0)
#define HB_DEBUG_CLOSURE (HB_DEBUG+0)
#endif
#endif
...
@@ -1163,17 +1113,6 @@ static inline bool context_apply_lookup (hb_apply_context_t *c,
...
@@ -1163,17 +1113,6 @@ static inline bool context_apply_lookup (hb_apply_context_t *c,
struct
Rule
struct
Rule
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
const
LookupRecord
*
lookupRecord
=
&
StructAtOffset
<
LookupRecord
>
(
input
,
input
[
0
].
static_size
*
(
inputCount
?
inputCount
-
1
:
0
));
unsigned
int
count
=
lookupCount
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
c
->
recurse
(
lookupRecord
[
i
].
lookupListIndex
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
,
ContextClosureLookupContext
&
lookup_context
)
const
inline
void
closure
(
hb_closure_context_t
*
c
,
ContextClosureLookupContext
&
lookup_context
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -1233,16 +1172,6 @@ struct Rule
...
@@ -1233,16 +1172,6 @@ struct Rule
struct
RuleSet
struct
RuleSet
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
unsigned
int
num_rules
=
rule
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
num_rules
;
i
++
)
if
(
!
(
this
+
rule
[
i
]).
is_inplace
(
c
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
,
ContextClosureLookupContext
&
lookup_context
)
const
inline
void
closure
(
hb_closure_context_t
*
c
,
ContextClosureLookupContext
&
lookup_context
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -1299,16 +1228,6 @@ struct RuleSet
...
@@ -1299,16 +1228,6 @@ struct RuleSet
struct
ContextFormat1
struct
ContextFormat1
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
unsigned
int
count
=
ruleSet
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
(
this
+
ruleSet
[
i
]).
is_inplace
(
c
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -1395,16 +1314,6 @@ struct ContextFormat1
...
@@ -1395,16 +1314,6 @@ struct ContextFormat1
struct
ContextFormat2
struct
ContextFormat2
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
unsigned
int
count
=
ruleSet
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
(
this
+
ruleSet
[
i
]).
is_inplace
(
c
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -1500,17 +1409,6 @@ struct ContextFormat2
...
@@ -1500,17 +1409,6 @@ struct ContextFormat2
struct
ContextFormat3
struct
ContextFormat3
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
const
LookupRecord
*
lookupRecord
=
&
StructAtOffset
<
LookupRecord
>
(
coverage
,
coverage
[
0
].
static_size
*
glyphCount
);
unsigned
int
count
=
lookupCount
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
c
->
recurse
(
lookupRecord
[
i
].
lookupListIndex
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -1753,19 +1651,6 @@ static inline bool chain_context_apply_lookup (hb_apply_context_t *c,
...
@@ -1753,19 +1651,6 @@ static inline bool chain_context_apply_lookup (hb_apply_context_t *c,
struct
ChainRule
struct
ChainRule
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
const
HeadlessArrayOf
<
USHORT
>
&
input
=
StructAfter
<
HeadlessArrayOf
<
USHORT
>
>
(
backtrack
);
const
ArrayOf
<
USHORT
>
&
lookahead
=
StructAfter
<
ArrayOf
<
USHORT
>
>
(
input
);
const
ArrayOf
<
LookupRecord
>
&
lookup
=
StructAfter
<
ArrayOf
<
LookupRecord
>
>
(
lookahead
);
unsigned
int
count
=
lookup
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
c
->
recurse
(
lookup
.
array
[
i
].
lookupListIndex
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
,
ChainContextClosureLookupContext
&
lookup_context
)
const
inline
void
closure
(
hb_closure_context_t
*
c
,
ChainContextClosureLookupContext
&
lookup_context
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -1851,16 +1736,6 @@ struct ChainRule
...
@@ -1851,16 +1736,6 @@ struct ChainRule
struct
ChainRuleSet
struct
ChainRuleSet
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
unsigned
int
num_rules
=
rule
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
num_rules
;
i
++
)
if
(
!
(
this
+
rule
[
i
]).
is_inplace
(
c
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
,
ChainContextClosureLookupContext
&
lookup_context
)
const
inline
void
closure
(
hb_closure_context_t
*
c
,
ChainContextClosureLookupContext
&
lookup_context
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -1914,16 +1789,6 @@ struct ChainRuleSet
...
@@ -1914,16 +1789,6 @@ struct ChainRuleSet
struct
ChainContextFormat1
struct
ChainContextFormat1
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
unsigned
int
count
=
ruleSet
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
(
this
+
ruleSet
[
i
]).
is_inplace
(
c
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -2007,16 +1872,6 @@ struct ChainContextFormat1
...
@@ -2007,16 +1872,6 @@ struct ChainContextFormat1
struct
ChainContextFormat2
struct
ChainContextFormat2
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
unsigned
int
count
=
ruleSet
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
(
this
+
ruleSet
[
i
]).
is_inplace
(
c
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
@@ -2141,20 +1996,6 @@ struct ChainContextFormat2
...
@@ -2141,20 +1996,6 @@ struct ChainContextFormat2
struct
ChainContextFormat3
struct
ChainContextFormat3
{
{
inline
bool
is_inplace
(
hb_is_inplace_context_t
*
c
)
const
{
TRACE_IS_INPLACE
(
this
);
const
OffsetArrayOf
<
Coverage
>
&
input
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
const
OffsetArrayOf
<
Coverage
>
&
lookahead
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
input
);
const
ArrayOf
<
LookupRecord
>
&
lookup
=
StructAfter
<
ArrayOf
<
LookupRecord
>
>
(
lookahead
);
unsigned
int
count
=
lookup
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
c
->
recurse
(
lookup
.
array
[
i
].
lookupListIndex
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
true
);
}
inline
void
closure
(
hb_closure_context_t
*
c
)
const
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
{
TRACE_CLOSURE
(
this
);
TRACE_CLOSURE
(
this
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录