Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
0befb06c
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看板
提交
0befb06c
编写于
10月 22, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[color] More CPAL rename
上级
3600d206
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
8 deletion
+8
-8
src/hb-ot-color-cpal-table.hh
src/hb-ot-color-cpal-table.hh
+8
-8
未找到文件。
src/hb-ot-color-cpal-table.hh
浏览文件 @
0befb06c
...
@@ -49,13 +49,13 @@ struct CPALV1Tail
...
@@ -49,13 +49,13 @@ struct CPALV1Tail
inline
bool
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
,
const
void
*
base
,
sanitize
(
hb_sanitize_context_t
*
c
,
const
void
*
base
,
unsigned
int
palette_count
,
unsigned
int
paletteEntries
)
const
unsigned
int
palette_count
,
unsigned
int
color_count
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
return_trace
(
c
->
check_struct
(
this
)
&&
return_trace
(
c
->
check_struct
(
this
)
&&
(
base
+
paletteFlagsZ
).
sanitize
(
c
,
palette_count
)
&&
(
base
+
paletteFlagsZ
).
sanitize
(
c
,
palette_count
)
&&
(
base
+
paletteLabelZ
).
sanitize
(
c
,
palette_count
)
&&
(
base
+
paletteLabelZ
).
sanitize
(
c
,
palette_count
)
&&
(
base
+
paletteEntryLabelZ
).
sanitize
(
c
,
paletteEntries
));
(
base
+
paletteEntryLabelZ
).
sanitize
(
c
,
color_count
));
}
}
private:
private:
...
@@ -124,7 +124,7 @@ struct CPAL
...
@@ -124,7 +124,7 @@ struct CPAL
/* Check for indices sanity so no need for doing it runtime */
/* Check for indices sanity so no need for doing it runtime */
for
(
unsigned
int
i
=
0
;
i
<
numPalettes
;
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
numPalettes
;
++
i
)
if
(
unlikely
(
colorRecordIndicesZ
[
i
]
+
num
PaletteEntrie
s
>
numColorRecords
))
if
(
unlikely
(
colorRecordIndicesZ
[
i
]
+
num
Color
s
>
numColorRecords
))
return_trace
(
false
);
return_trace
(
false
);
/* If version is zero, we are done here; otherwise we need to check tail also */
/* If version is zero, we are done here; otherwise we need to check tail also */
...
@@ -132,7 +132,7 @@ struct CPAL
...
@@ -132,7 +132,7 @@ struct CPAL
return_trace
(
true
);
return_trace
(
true
);
const
CPALV1Tail
&
v1
=
StructAfter
<
CPALV1Tail
>
(
*
this
);
const
CPALV1Tail
&
v1
=
StructAfter
<
CPALV1Tail
>
(
*
this
);
return_trace
(
likely
(
v1
.
sanitize
(
c
,
this
,
numPalettes
,
num
PaletteEntrie
s
)));
return_trace
(
likely
(
v1
.
sanitize
(
c
,
this
,
numPalettes
,
num
Color
s
)));
}
}
inline
unsigned
int
get_size
(
void
)
const
inline
unsigned
int
get_size
(
void
)
const
...
@@ -164,19 +164,19 @@ struct CPAL
...
@@ -164,19 +164,19 @@ struct CPAL
return
HB_NAME_ID_INVALID
;
return
HB_NAME_ID_INVALID
;
const
CPALV1Tail
&
cpal1
=
StructAfter
<
CPALV1Tail
>
(
*
this
);
const
CPALV1Tail
&
cpal1
=
StructAfter
<
CPALV1Tail
>
(
*
this
);
return
cpal1
.
get_palette_entry_name_id
(
this
,
palette_entry
,
num
PaletteEntrie
s
);
return
cpal1
.
get_palette_entry_name_id
(
this
,
palette_entry
,
num
Color
s
);
}
}
inline
unsigned
int
get_palette_count
()
const
inline
unsigned
int
get_palette_count
()
const
{
return
numPalettes
;
}
{
return
numPalettes
;
}
inline
unsigned
int
get_palette_entries_count
()
const
inline
unsigned
int
get_palette_entries_count
()
const
{
return
num
PaletteEntrie
s
;
}
{
return
num
Color
s
;
}
bool
bool
get_color_record_argb
(
unsigned
int
color_index
,
unsigned
int
palette_index
,
hb_color_t
*
color
)
const
get_color_record_argb
(
unsigned
int
color_index
,
unsigned
int
palette_index
,
hb_color_t
*
color
)
const
{
{
if
(
unlikely
(
color_index
>=
num
PaletteEntrie
s
||
palette_index
>=
numPalettes
))
if
(
unlikely
(
color_index
>=
num
Color
s
||
palette_index
>=
numPalettes
))
return
false
;
return
false
;
/* No need for more range check as it is already done on #sanitize */
/* No need for more range check as it is already done on #sanitize */
...
@@ -189,7 +189,7 @@ struct CPAL
...
@@ -189,7 +189,7 @@ struct CPAL
protected:
protected:
HBUINT16
version
;
/* Table version number */
HBUINT16
version
;
/* Table version number */
/* Version 0 */
/* Version 0 */
HBUINT16
num
PaletteEntries
;
/* Number of palette entrie
s in each palette. */
HBUINT16
num
Colors
;
/* Number of color
s in each palette. */
HBUINT16
numPalettes
;
/* Number of palettes in the table. */
HBUINT16
numPalettes
;
/* Number of palettes in the table. */
HBUINT16
numColorRecords
;
/* Total number of color records, combined for
HBUINT16
numColorRecords
;
/* Total number of color records, combined for
* all palettes. */
* all palettes. */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录