Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
0ce605c9
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看板
提交
0ce605c9
编写于
10月 03, 2013
作者:
J
jchen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8025294: [parfait] JNI-related warnings from b107 for jdk.src.solaris.native.sun.java2d.x11
Reviewed-by: prr, jgodinez
上级
6a31b16a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
13 deletion
+28
-13
src/solaris/native/sun/java2d/x11/X11Renderer.c
src/solaris/native/sun/java2d/x11/X11Renderer.c
+6
-11
src/solaris/native/sun/java2d/x11/X11SurfaceData.c
src/solaris/native/sun/java2d/x11/X11SurfaceData.c
+6
-2
src/solaris/native/sun/java2d/x11/XRBackendNative.c
src/solaris/native/sun/java2d/x11/XRBackendNative.c
+10
-0
src/solaris/native/sun/java2d/x11/XRSurfaceData.c
src/solaris/native/sun/java2d/x11/XRSurfaceData.c
+6
-0
未找到文件。
src/solaris/native/sun/java2d/x11/X11Renderer.c
浏览文件 @
0ce605c9
...
@@ -465,9 +465,7 @@ JNIEXPORT void JNICALL Java_sun_java2d_x11_X11Renderer_XDrawPoly
...
@@ -465,9 +465,7 @@ JNIEXPORT void JNICALL Java_sun_java2d_x11_X11Renderer_XDrawPoly
points
=
transformPoints
(
env
,
xcoordsArray
,
ycoordsArray
,
transx
,
transy
,
points
=
transformPoints
(
env
,
xcoordsArray
,
ycoordsArray
,
transx
,
transy
,
pTmp
,
(
int
*
)
&
npoints
,
isclosed
);
pTmp
,
(
int
*
)
&
npoints
,
isclosed
);
if
(
points
==
0
)
{
if
(
points
!=
0
)
{
JNU_ThrowOutOfMemoryError
(
env
,
"translated coordinate array"
);
}
else
{
if
(
npoints
==
2
)
{
if
(
npoints
==
2
)
{
/*
/*
* Some X11 implementations fail to draw anything for
* Some X11 implementations fail to draw anything for
...
@@ -588,6 +586,7 @@ Java_sun_java2d_x11_X11Renderer_XDoPath
...
@@ -588,6 +586,7 @@ Java_sun_java2d_x11_X11Renderer_XDoPath
NULL
NULL
};
};
PHStroke
stroke
;
PHStroke
stroke
;
jboolean
ok
=
JNI_TRUE
;
if
(
xsdo
==
NULL
)
{
if
(
xsdo
==
NULL
)
{
return
;
return
;
...
@@ -625,8 +624,6 @@ Java_sun_java2d_x11_X11Renderer_XDoPath
...
@@ -625,8 +624,6 @@ Java_sun_java2d_x11_X11Renderer_XDoPath
types
=
(
jbyte
*
)
types
=
(
jbyte
*
)
(
*
env
)
->
GetPrimitiveArrayCritical
(
env
,
typesArray
,
NULL
);
(
*
env
)
->
GetPrimitiveArrayCritical
(
env
,
typesArray
,
NULL
);
if
(
types
!=
NULL
)
{
if
(
types
!=
NULL
)
{
jboolean
ok
;
if
(
isFill
)
{
if
(
isFill
)
{
drawHandler
.
pDrawScanline
=
&
drawScanline
;
drawHandler
.
pDrawScanline
=
&
drawScanline
;
ok
=
doFillPath
(
&
drawHandler
,
ok
=
doFillPath
(
&
drawHandler
,
...
@@ -643,14 +640,14 @@ Java_sun_java2d_x11_X11Renderer_XDoPath
...
@@ -643,14 +640,14 @@ Java_sun_java2d_x11_X11Renderer_XDoPath
types
,
numTypes
,
types
,
numTypes
,
stroke
);
stroke
);
}
}
if
(
!
ok
)
{
JNU_ThrowArrayIndexOutOfBoundsException
(
env
,
"coords array"
);
}
(
*
env
)
->
ReleasePrimitiveArrayCritical
(
env
,
typesArray
,
types
,
(
*
env
)
->
ReleasePrimitiveArrayCritical
(
env
,
typesArray
,
types
,
JNI_ABORT
);
JNI_ABORT
);
}
}
(
*
env
)
->
ReleasePrimitiveArrayCritical
(
env
,
coordsArray
,
coords
,
(
*
env
)
->
ReleasePrimitiveArrayCritical
(
env
,
coordsArray
,
coords
,
JNI_ABORT
);
JNI_ABORT
);
if
(
!
ok
)
{
JNU_ThrowArrayIndexOutOfBoundsException
(
env
,
"coords array"
);
}
}
}
XDHD_FREE_POINTS
(
&
dHData
);
XDHD_FREE_POINTS
(
&
dHData
);
...
@@ -893,9 +890,7 @@ JNIEXPORT void JNICALL Java_sun_java2d_x11_X11Renderer_XFillPoly
...
@@ -893,9 +890,7 @@ JNIEXPORT void JNICALL Java_sun_java2d_x11_X11Renderer_XFillPoly
points
=
transformPoints
(
env
,
xcoordsArray
,
ycoordsArray
,
transx
,
transy
,
points
=
transformPoints
(
env
,
xcoordsArray
,
ycoordsArray
,
transx
,
transy
,
pTmp
,
(
int
*
)
&
npoints
,
JNI_FALSE
);
pTmp
,
(
int
*
)
&
npoints
,
JNI_FALSE
);
if
(
points
==
0
)
{
if
(
points
!=
0
)
{
JNU_ThrowOutOfMemoryError
(
env
,
"translated coordinate array"
);
}
else
{
if
(
npoints
>
2
)
{
if
(
npoints
>
2
)
{
XFillPolygon
(
awt_display
,
xsdo
->
drawable
,
(
GC
)
xgc
,
XFillPolygon
(
awt_display
,
xsdo
->
drawable
,
(
GC
)
xgc
,
points
,
npoints
,
Complex
,
CoordModeOrigin
);
points
,
npoints
,
Complex
,
CoordModeOrigin
);
...
...
src/solaris/native/sun/java2d/x11/X11SurfaceData.c
浏览文件 @
0ce605c9
...
@@ -227,7 +227,7 @@ Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable(JNIEnv *env, jobject this)
...
@@ -227,7 +227,7 @@ Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable(JNIEnv *env, jobject this)
#if defined(HEADLESS) || !defined(MITSHM)
#if defined(HEADLESS) || !defined(MITSHM)
return
JNI_FALSE
;
return
JNI_FALSE
;
#else
#else
return
useMitShmPixmaps
;
return
(
jboolean
)
useMitShmPixmaps
;
#endif
/* HEADLESS, MITSHM */
#endif
/* HEADLESS, MITSHM */
}
}
...
@@ -258,6 +258,7 @@ Java_sun_java2d_x11_XSurfaceData_initOps(JNIEnv *env, jobject xsd,
...
@@ -258,6 +258,7 @@ Java_sun_java2d_x11_XSurfaceData_initOps(JNIEnv *env, jobject xsd,
{
{
#ifndef HEADLESS
#ifndef HEADLESS
X11SDOps
*
xsdo
=
(
X11SDOps
*
)
SurfaceData_InitOps
(
env
,
xsd
,
sizeof
(
X11SDOps
));
X11SDOps
*
xsdo
=
(
X11SDOps
*
)
SurfaceData_InitOps
(
env
,
xsd
,
sizeof
(
X11SDOps
));
jboolean
hasException
;
if
(
xsdo
==
NULL
)
{
if
(
xsdo
==
NULL
)
{
JNU_ThrowOutOfMemoryError
(
env
,
"Initialization of SurfaceData failed."
);
JNU_ThrowOutOfMemoryError
(
env
,
"Initialization of SurfaceData failed."
);
return
;
return
;
...
@@ -270,7 +271,10 @@ Java_sun_java2d_x11_XSurfaceData_initOps(JNIEnv *env, jobject xsd,
...
@@ -270,7 +271,10 @@ Java_sun_java2d_x11_XSurfaceData_initOps(JNIEnv *env, jobject xsd,
xsdo
->
ReleasePixmapWithBg
=
X11SD_ReleasePixmapWithBg
;
xsdo
->
ReleasePixmapWithBg
=
X11SD_ReleasePixmapWithBg
;
xsdo
->
widget
=
NULL
;
xsdo
->
widget
=
NULL
;
if
(
peer
!=
NULL
)
{
if
(
peer
!=
NULL
)
{
xsdo
->
drawable
=
JNU_CallMethodByName
(
env
,
NULL
,
peer
,
"getWindow"
,
"()J"
).
j
;
xsdo
->
drawable
=
JNU_CallMethodByName
(
env
,
&
hasException
,
peer
,
"getWindow"
,
"()J"
).
j
;
if
(
hasException
)
{
return
;
}
}
else
{
}
else
{
xsdo
->
drawable
=
0
;
xsdo
->
drawable
=
0
;
}
}
...
...
src/solaris/native/sun/java2d/x11/XRBackendNative.c
浏览文件 @
0ce605c9
...
@@ -326,7 +326,13 @@ Java_sun_java2d_xr_XRBackendNative_initIDs(JNIEnv *env, jclass cls) {
...
@@ -326,7 +326,13 @@ Java_sun_java2d_xr_XRBackendNative_initIDs(JNIEnv *env, jclass cls) {
jlong
fmt32
;
jlong
fmt32
;
jfieldID
a8ID
=
(
*
env
)
->
GetStaticFieldID
(
env
,
cls
,
"FMTPTR_A8"
,
"J"
);
jfieldID
a8ID
=
(
*
env
)
->
GetStaticFieldID
(
env
,
cls
,
"FMTPTR_A8"
,
"J"
);
if
(
a8ID
==
NULL
)
{
return
;
}
jfieldID
argb32ID
=
(
*
env
)
->
GetStaticFieldID
(
env
,
cls
,
"FMTPTR_ARGB32"
,
"J"
);
jfieldID
argb32ID
=
(
*
env
)
->
GetStaticFieldID
(
env
,
cls
,
"FMTPTR_ARGB32"
,
"J"
);
if
(
argb32ID
==
NULL
)
{
return
;
}
if
(
awt_display
==
(
Display
*
)
NULL
)
{
if
(
awt_display
==
(
Display
*
)
NULL
)
{
return
;
return
;
...
@@ -346,6 +352,10 @@ Java_sun_java2d_xr_XRBackendNative_initIDs(JNIEnv *env, jclass cls) {
...
@@ -346,6 +352,10 @@ Java_sun_java2d_xr_XRBackendNative_initIDs(JNIEnv *env, jclass cls) {
defaultImg
=
XCreateImage
(
awt_display
,
NULL
,
8
,
ZPixmap
,
0
,
maskData
,
32
,
32
,
8
,
0
);
defaultImg
=
XCreateImage
(
awt_display
,
NULL
,
8
,
ZPixmap
,
0
,
maskData
,
32
,
32
,
8
,
0
);
defaultImg
->
data
=
maskData
;
//required?
defaultImg
->
data
=
maskData
;
//required?
maskImgID
=
(
*
env
)
->
GetStaticFieldID
(
env
,
cls
,
"MASK_XIMG"
,
"J"
);
maskImgID
=
(
*
env
)
->
GetStaticFieldID
(
env
,
cls
,
"MASK_XIMG"
,
"J"
);
if
(
maskImgID
==
NULL
)
{
return
;
}
(
*
env
)
->
SetStaticLongField
(
env
,
cls
,
maskImgID
,
ptr_to_jlong
(
defaultImg
));
(
*
env
)
->
SetStaticLongField
(
env
,
cls
,
maskImgID
,
ptr_to_jlong
(
defaultImg
));
}
}
...
...
src/solaris/native/sun/java2d/x11/XRSurfaceData.c
浏览文件 @
0ce605c9
...
@@ -88,7 +88,13 @@ Java_sun_java2d_xr_XRSurfaceData_initIDs(JNIEnv *env, jclass xsd)
...
@@ -88,7 +88,13 @@ Java_sun_java2d_xr_XRSurfaceData_initIDs(JNIEnv *env, jclass xsd)
J2dTraceLn
(
J2D_TRACE_INFO
,
"in XRSurfaceData_initIDs"
);
J2dTraceLn
(
J2D_TRACE_INFO
,
"in XRSurfaceData_initIDs"
);
pictID
=
(
*
env
)
->
GetFieldID
(
env
,
xsd
,
"picture"
,
"I"
);
pictID
=
(
*
env
)
->
GetFieldID
(
env
,
xsd
,
"picture"
,
"I"
);
if
(
pictID
==
NULL
)
{
return
;
}
xidID
=
(
*
env
)
->
GetFieldID
(
env
,
xsd
,
"xid"
,
"I"
);
xidID
=
(
*
env
)
->
GetFieldID
(
env
,
xsd
,
"xid"
,
"I"
);
if
(
xidID
==
NULL
)
{
return
;
}
XShared_initIDs
(
env
,
JNI_FALSE
);
XShared_initIDs
(
env
,
JNI_FALSE
);
#endif
/* !HEADLESS */
#endif
/* !HEADLESS */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录