Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
d539212d
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d539212d
编写于
4月 01, 2011
作者:
P
prr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7029934: Xrender: Text is truncated with 64 bit Linux JRE
Reviewed-by: bae, flar, ceisserer Contributed-by: linuxhippy@gmail.com
上级
021ac0dc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
53 addition
and
13 deletion
+53
-13
src/solaris/native/sun/java2d/x11/XRBackendNative.c
src/solaris/native/sun/java2d/x11/XRBackendNative.c
+53
-13
未找到文件。
src/solaris/native/sun/java2d/x11/XRBackendNative.c
浏览文件 @
d539212d
...
...
@@ -644,7 +644,7 @@ Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative
for
(
i
=
0
;
i
<
glyphCnt
;
i
++
)
{
GlyphInfo
*
jginfo
=
(
GlyphInfo
*
)
jlong_to_ptr
(
glyphInfoPtrs
[
i
]);
gid
[
i
]
=
(
Glyph
)
(
0x
ffffffff
&
((
unsigned
int
)
jginfo
->
cellInfo
));
gid
[
i
]
=
(
Glyph
)
(
0x
0ffffffffL
&
((
unsigned
long
)(
jginfo
->
cellInfo
)
));
xginfo
[
i
].
x
=
(
-
jginfo
->
topLeftX
);
xginfo
[
i
].
y
=
(
-
jginfo
->
topLeftY
);
xginfo
[
i
].
width
=
jginfo
->
width
;
...
...
@@ -666,16 +666,56 @@ Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative
JNIEXPORT
void
JNICALL
Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative
(
JNIEnv
*
env
,
jclass
cls
,
jint
glyphSet
,
jintArray
gidArray
,
jint
glyphCnt
)
{
jint
*
gids
;
int
i
;
if
((
gids
=
(
jint
*
)
(
*
env
)
->
GetPrimitiveArrayCritical
(
env
,
gidArray
,
NULL
))
==
NULL
)
{
/* The glyph ids are 32 bit but may be stored in a 64 bit long on
* a 64 bit architecture. So optimise the 32 bit case to avoid
* extra stack or heap allocations by directly referencing the
* underlying Java array and only allocate on 64 bit.
*/
if
(
sizeof
(
jint
)
==
sizeof
(
Glyph
))
{
jint
*
gids
=
(
*
env
)
->
GetPrimitiveArrayCritical
(
env
,
gidArray
,
NULL
);
if
(
gids
==
NULL
)
{
return
;
}
else
{
XRenderFreeGlyphs
(
awt_display
,
(
GlyphSet
)
glyphSet
,
(
Glyph
*
)
gids
,
glyphCnt
);
(
*
env
)
->
ReleasePrimitiveArrayCritical
(
env
,
gidArray
,
gids
,
JNI_ABORT
);
}
return
;
}
XRenderFreeGlyphs
(
awt_display
,
(
GlyphSet
)
glyphSet
,
(
Glyph
*
)
gids
,
glyphCnt
);
}
else
{
Glyph
stack_ids
[
64
];
Glyph
*
gids
=
NULL
;
jint
*
jgids
=
NULL
;
int
i
;
(
*
env
)
->
ReleasePrimitiveArrayCritical
(
env
,
gidArray
,
gids
,
JNI_ABORT
);
if
(
glyphCnt
<=
64
)
{
gids
=
stack_ids
;
}
else
{
gids
=
(
Glyph
*
)
malloc
(
sizeof
(
Glyph
)
*
glyphCnt
);
if
(
gids
==
NULL
)
{
return
;
}
}
jgids
=
(
*
env
)
->
GetPrimitiveArrayCritical
(
env
,
gidArray
,
NULL
);
if
(
jgids
==
NULL
)
{
if
(
gids
!=
stack_ids
)
{
free
(
gids
);
}
return
;
}
for
(
i
=
0
;
i
<
glyphCnt
;
i
++
)
{
gids
[
i
]
=
jgids
[
i
];
}
XRenderFreeGlyphs
(
awt_display
,
(
GlyphSet
)
glyphSet
,
gids
,
glyphCnt
);
(
*
env
)
->
ReleasePrimitiveArrayCritical
(
env
,
gidArray
,
jgids
,
JNI_ABORT
);
if
(
gids
!=
stack_ids
)
{
free
(
gids
);
}
}
}
JNIEXPORT
jint
JNICALL
...
...
@@ -692,9 +732,9 @@ Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative
jint
*
ids
;
jint
*
elts
;
XGlyphElt32
*
xelts
;
Glyph
*
xids
;
unsigned
int
*
xids
;
XGlyphElt32
selts
[
24
];
Glyph
sids
[
256
];
unsigned
int
sids
[
256
];
int
charCnt
=
0
;
if
(
eltCnt
<=
24
)
{
...
...
@@ -709,7 +749,7 @@ Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative
if
(
glyphCnt
<=
256
)
{
xids
=
&
sids
[
0
];
}
else
{
xids
=
(
Glyph
*
)
malloc
(
sizeof
(
Glyph
)
*
glyphCnt
);
xids
=
(
unsigned
int
*
)
malloc
(
sizeof
(
unsigned
int
)
*
glyphCnt
);
if
(
xids
==
NULL
)
{
if
(
xelts
!=
&
selts
[
0
])
{
free
(
xelts
);
...
...
@@ -742,7 +782,7 @@ Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative
}
for
(
i
=
0
;
i
<
glyphCnt
;
i
++
)
{
xids
[
i
]
=
(
Glyph
)
ids
[
i
];
xids
[
i
]
=
ids
[
i
];
}
for
(
i
=
0
;
i
<
eltCnt
;
i
++
)
{
...
...
@@ -750,7 +790,7 @@ Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative
xelts
[
i
].
xOff
=
elts
[
i
*
4
+
1
];
xelts
[
i
].
yOff
=
elts
[
i
*
4
+
2
];
xelts
[
i
].
glyphset
=
(
GlyphSet
)
elts
[
i
*
4
+
3
];
xelts
[
i
].
chars
=
(
unsigned
int
*
)
&
xids
[
charCnt
];
xelts
[
i
].
chars
=
&
xids
[
charCnt
];
charCnt
+=
xelts
[
i
].
nchars
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录