Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
71b9d64f
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看板
提交
71b9d64f
编写于
10月 01, 2013
作者:
P
prr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8007386: On physical machine (video card is Intel Q45) the text is blank.
Reviewed-by: prr, jchen
上级
7c832cd1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
43 addition
and
5 deletion
+43
-5
src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
+7
-2
src/solaris/native/sun/java2d/x11/XRBackendNative.c
src/solaris/native/sun/java2d/x11/XRBackendNative.c
+36
-3
未找到文件。
src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
浏览文件 @
71b9d64f
...
@@ -96,6 +96,7 @@ public class X11GraphicsEnvironment
...
@@ -96,6 +96,7 @@ public class X11GraphicsEnvironment
// Now check for XRender system property
// Now check for XRender system property
boolean
xRenderRequested
=
true
;
boolean
xRenderRequested
=
true
;
boolean
xRenderIgnoreLinuxVersion
=
false
;
String
xProp
=
System
.
getProperty
(
"sun.java2d.xrender"
);
String
xProp
=
System
.
getProperty
(
"sun.java2d.xrender"
);
if
(
xProp
!=
null
)
{
if
(
xProp
!=
null
)
{
if
(
xProp
.
equals
(
"false"
)
||
xProp
.
equals
(
"f"
))
{
if
(
xProp
.
equals
(
"false"
)
||
xProp
.
equals
(
"f"
))
{
...
@@ -104,6 +105,10 @@ public class X11GraphicsEnvironment
...
@@ -104,6 +105,10 @@ public class X11GraphicsEnvironment
xRenderRequested
=
true
;
xRenderRequested
=
true
;
xRenderVerbose
=
true
;
xRenderVerbose
=
true
;
}
}
if
(
xProp
.
equalsIgnoreCase
(
"t"
)
||
xProp
.
equalsIgnoreCase
(
"true"
))
{
xRenderIgnoreLinuxVersion
=
true
;
}
}
}
// initialize the X11 display connection
// initialize the X11 display connection
...
@@ -121,7 +126,7 @@ public class X11GraphicsEnvironment
...
@@ -121,7 +126,7 @@ public class X11GraphicsEnvironment
// only attempt to initialize Xrender if it was requested
// only attempt to initialize Xrender if it was requested
if
(
xRenderRequested
)
{
if
(
xRenderRequested
)
{
xRenderAvailable
=
initXRender
(
xRenderVerbose
);
xRenderAvailable
=
initXRender
(
xRenderVerbose
,
xRenderIgnoreLinuxVersion
);
if
(
xRenderVerbose
&&
!
xRenderAvailable
)
{
if
(
xRenderVerbose
&&
!
xRenderAvailable
)
{
System
.
out
.
println
(
System
.
out
.
println
(
"Could not enable XRender pipeline"
);
"Could not enable XRender pipeline"
);
...
@@ -159,7 +164,7 @@ public class X11GraphicsEnvironment
...
@@ -159,7 +164,7 @@ public class X11GraphicsEnvironment
private
static
boolean
xRenderVerbose
;
private
static
boolean
xRenderVerbose
;
private
static
boolean
xRenderAvailable
;
private
static
boolean
xRenderAvailable
;
private
static
native
boolean
initXRender
(
boolean
verbose
);
private
static
native
boolean
initXRender
(
boolean
verbose
,
boolean
ignoreLinuxVersion
);
public
static
boolean
isXRenderAvailable
()
{
public
static
boolean
isXRenderAvailable
()
{
return
xRenderAvailable
;
return
xRenderAvailable
;
}
}
...
...
src/solaris/native/sun/java2d/x11/XRBackendNative.c
浏览文件 @
71b9d64f
...
@@ -31,6 +31,10 @@
...
@@ -31,6 +31,10 @@
#include <X11/extensions/Xrender.h>
#include <X11/extensions/Xrender.h>
#ifdef __linux__
#include <sys/utsname.h>
#endif
/* On Solaris 10 updates 8, 9, the render.h file defines these
/* On Solaris 10 updates 8, 9, the render.h file defines these
* protocol values but does not define the structs in Xrender.h.
* protocol values but does not define the structs in Xrender.h.
* Thus in order to get these always defined on Solaris 10
* Thus in order to get these always defined on Solaris 10
...
@@ -131,7 +135,7 @@ static
...
@@ -131,7 +135,7 @@ static
#define MAX_PAYLOAD (262140u - 36u)
#define MAX_PAYLOAD (262140u - 36u)
#define MAXUINT (0xffffffffu)
#define MAXUINT (0xffffffffu)
static
jboolean
IsXRenderAvailable
(
jboolean
verbose
)
{
static
jboolean
IsXRenderAvailable
(
jboolean
verbose
,
jboolean
ignoreLinuxVersion
)
{
void
*
xrenderlib
;
void
*
xrenderlib
;
...
@@ -253,6 +257,31 @@ static jboolean IsXRenderAvailable(jboolean verbose) {
...
@@ -253,6 +257,31 @@ static jboolean IsXRenderAvailable(jboolean verbose) {
}
}
#endif
#endif
#ifdef __linux__
/*
* Check for Linux >= 3.5 (Ubuntu 12.04.02 LTS) to avoid hitting
* https://bugs.freedesktop.org/show_bug.cgi?id=48045
*/
struct
utsname
utsbuf
;
if
(
uname
(
&
utsbuf
)
>=
0
)
{
int
major
,
minor
,
revision
;
if
(
sscanf
(
utsbuf
.
release
,
"%i.%i.%i"
,
&
major
,
&
minor
,
&
revision
)
==
3
)
{
if
(
major
<
3
||
(
major
==
3
&&
minor
<
5
))
{
if
(
!
ignoreLinuxVersion
)
{
available
=
JNI_FALSE
;
}
else
if
(
verbose
)
{
printf
(
"WARNING: Linux < 3.5 detected.
\n
"
"The pipeline will be enabled, but graphical "
"artifacts can occur with old graphic drivers.
\n
"
"See the release notes for more details.
\n
"
);
fflush
(
stdout
);
}
}
}
}
#endif // __linux__
return
available
;
return
available
;
}
}
/*
/*
...
@@ -262,7 +291,7 @@ static jboolean IsXRenderAvailable(jboolean verbose) {
...
@@ -262,7 +291,7 @@ static jboolean IsXRenderAvailable(jboolean verbose) {
*/
*/
JNIEXPORT
jboolean
JNICALL
JNIEXPORT
jboolean
JNICALL
Java_sun_awt_X11GraphicsEnvironment_initXRender
Java_sun_awt_X11GraphicsEnvironment_initXRender
(
JNIEnv
*
env
,
jclass
x11ge
,
jboolean
verbose
)
(
JNIEnv
*
env
,
jclass
x11ge
,
jboolean
verbose
,
jboolean
ignoreLinuxVersion
)
{
{
#ifndef HEADLESS
#ifndef HEADLESS
static
jboolean
xrenderAvailable
=
JNI_FALSE
;
static
jboolean
xrenderAvailable
=
JNI_FALSE
;
...
@@ -277,7 +306,7 @@ Java_sun_awt_X11GraphicsEnvironment_initXRender
...
@@ -277,7 +306,7 @@ Java_sun_awt_X11GraphicsEnvironment_initXRender
}
}
#endif
#endif
AWT_LOCK
();
AWT_LOCK
();
xrenderAvailable
=
IsXRenderAvailable
(
verbose
);
xrenderAvailable
=
IsXRenderAvailable
(
verbose
,
ignoreLinuxVersion
);
AWT_UNLOCK
();
AWT_UNLOCK
();
firstTime
=
JNI_FALSE
;
firstTime
=
JNI_FALSE
;
}
}
...
@@ -294,9 +323,11 @@ Java_sun_java2d_xr_XRBackendNative_initIDs(JNIEnv *env, jclass cls) {
...
@@ -294,9 +323,11 @@ Java_sun_java2d_xr_XRBackendNative_initIDs(JNIEnv *env, jclass cls) {
XImage
*
defaultImg
;
XImage
*
defaultImg
;
jfieldID
maskImgID
;
jfieldID
maskImgID
;
jlong
fmt8
;
jlong
fmt8
;
jlong
fmt24
;
jlong
fmt32
;
jlong
fmt32
;
jfieldID
a8ID
=
(
*
env
)
->
GetStaticFieldID
(
env
,
cls
,
"FMTPTR_A8"
,
"J"
);
jfieldID
a8ID
=
(
*
env
)
->
GetStaticFieldID
(
env
,
cls
,
"FMTPTR_A8"
,
"J"
);
jfieldID
rgb24ID
=
(
*
env
)
->
GetStaticFieldID
(
env
,
cls
,
"FMTPTR_ARGB24"
,
"J"
);
jfieldID
argb32ID
=
(
*
env
)
->
GetStaticFieldID
(
env
,
cls
,
"FMTPTR_ARGB32"
,
"J"
);
jfieldID
argb32ID
=
(
*
env
)
->
GetStaticFieldID
(
env
,
cls
,
"FMTPTR_ARGB32"
,
"J"
);
if
(
awt_display
==
(
Display
*
)
NULL
)
{
if
(
awt_display
==
(
Display
*
)
NULL
)
{
...
@@ -304,9 +335,11 @@ Java_sun_java2d_xr_XRBackendNative_initIDs(JNIEnv *env, jclass cls) {
...
@@ -304,9 +335,11 @@ Java_sun_java2d_xr_XRBackendNative_initIDs(JNIEnv *env, jclass cls) {
}
}
fmt8
=
ptr_to_jlong
(
XRenderFindStandardFormat
(
awt_display
,
PictStandardA8
));
fmt8
=
ptr_to_jlong
(
XRenderFindStandardFormat
(
awt_display
,
PictStandardA8
));
fmt24
=
ptr_to_jlong
(
XRenderFindStandardFormat
(
awt_display
,
PictStandardRGB24
));
fmt32
=
ptr_to_jlong
(
XRenderFindStandardFormat
(
awt_display
,
PictStandardARGB32
));
fmt32
=
ptr_to_jlong
(
XRenderFindStandardFormat
(
awt_display
,
PictStandardARGB32
));
(
*
env
)
->
SetStaticLongField
(
env
,
cls
,
a8ID
,
fmt8
);
(
*
env
)
->
SetStaticLongField
(
env
,
cls
,
a8ID
,
fmt8
);
(
*
env
)
->
SetStaticLongField
(
env
,
cls
,
rgb24ID
,
fmt24
);
(
*
env
)
->
SetStaticLongField
(
env
,
cls
,
argb32ID
,
fmt32
);
(
*
env
)
->
SetStaticLongField
(
env
,
cls
,
argb32ID
,
fmt32
);
maskData
=
(
char
*
)
malloc
(
32
*
32
);
maskData
=
(
char
*
)
malloc
(
32
*
32
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录