Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
2009cbeb
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2009cbeb
编写于
12月 04, 2008
作者:
T
tdv
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6708580: Java applications slow when EXA enabled
Reviewed-by: prr, tdv Contributed-by:
N
ceisserer
<
linuxhippy@gmail.com
>
上级
1a1855d3
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
36 addition
and
2 deletion
+36
-2
make/sun/awt/mapfile-mawt-vers
make/sun/awt/mapfile-mawt-vers
+1
-0
make/sun/xawt/mapfile-vers
make/sun/xawt/mapfile-vers
+1
-0
src/solaris/classes/sun/java2d/x11/X11SurfaceData.java
src/solaris/classes/sun/java2d/x11/X11SurfaceData.java
+17
-2
src/solaris/native/sun/java2d/x11/X11SurfaceData.c
src/solaris/native/sun/java2d/x11/X11SurfaceData.c
+17
-0
未找到文件。
make/sun/awt/mapfile-mawt-vers
浏览文件 @
2009cbeb
...
...
@@ -407,6 +407,7 @@ SUNWprivate_1.1 {
Java_sun_java2d_x11_X11SurfaceData_initSurface;
Java_sun_java2d_x11_X11SurfaceData_isDrawableValid;
Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable;
Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
Java_sun_java2d_x11_X11SurfaceData_setInvalid;
Java_sun_java2d_x11_X11SurfaceData_flushNativeSurface;
Java_sun_java2d_x11_X11SurfaceData_XCreateGC;
...
...
make/sun/xawt/mapfile-vers
浏览文件 @
2009cbeb
...
...
@@ -337,6 +337,7 @@ SUNWprivate_1.1 {
Java_sun_java2d_x11_X11SurfaceData_initIDs;
Java_sun_java2d_x11_X11SurfaceData_isDrawableValid;
Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable;
Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
Java_sun_java2d_x11_X11SurfaceData_initOps;
Java_sun_java2d_x11_X11SurfaceData_initSurface;
Java_sun_java2d_x11_X11SurfaceData_flushNativeSurface;
...
...
src/solaris/classes/sun/java2d/x11/X11SurfaceData.java
浏览文件 @
2009cbeb
...
...
@@ -50,6 +50,7 @@ import sun.awt.image.PixelConverter;
import
sun.font.X11TextRenderer
;
import
sun.java2d.InvalidPipeException
;
import
sun.java2d.SunGraphics2D
;
import
sun.java2d.SunGraphicsEnvironment
;
import
sun.java2d.SurfaceData
;
import
sun.java2d.SurfaceDataProxy
;
import
sun.java2d.loops.SurfaceType
;
...
...
@@ -240,6 +241,11 @@ public abstract class X11SurfaceData extends SurfaceData {
*/
public
static
native
boolean
isDgaAvailable
();
/**
* Returns true if shared memory pixmaps are available
*/
private
static
native
boolean
isShmPMAvailable
();
public
static
boolean
isAccelerationEnabled
()
{
if
(
accelerationEnabled
==
null
)
{
...
...
@@ -253,8 +259,17 @@ public abstract class X11SurfaceData extends SurfaceData {
// true iff prop==true, false otherwise
accelerationEnabled
=
Boolean
.
valueOf
(
prop
);
}
else
{
// use pixmaps if there is no dga, no matter local or remote
accelerationEnabled
=
Boolean
.
valueOf
(!
isDgaAvailable
());
boolean
isDisplayLocal
=
false
;
GraphicsEnvironment
ge
=
GraphicsEnvironment
.
getLocalGraphicsEnvironment
();
if
(
ge
instanceof
SunGraphicsEnvironment
)
{
isDisplayLocal
=
((
SunGraphicsEnvironment
)
ge
).
isDisplayLocal
();
}
// EXA based drivers tend to place pixmaps in VRAM, slowing down readbacks.
// Don't use pixmaps if dga is available,
// or we are local and shared memory Pixmaps are not available.
accelerationEnabled
=
!(
isDgaAvailable
()
||
(
isDisplayLocal
&&
!
isShmPMAvailable
()));
}
}
}
...
...
src/solaris/native/sun/java2d/x11/X11SurfaceData.c
浏览文件 @
2009cbeb
...
...
@@ -208,6 +208,23 @@ Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable(JNIEnv *env, jobject this)
#endif
/* HEADLESS */
}
/*
* Class: sun_java2d_x11_X11SurfaceData
* Method: isShmPMAvailable
* Signature: ()Z
*/
JNIEXPORT
jboolean
JNICALL
Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable
(
JNIEnv
*
env
,
jobject
this
)
{
#if defined(HEADLESS) || !defined(MITSHM)
return
JNI_FALSE
;
#else
return
useMitShmPixmaps
;
#endif
/* HEADLESS, MITSHM */
}
/*
* Class: sun_java2d_x11_X11SurfaceData
* Method: initOps
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录