Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
e203fb92
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看板
提交
e203fb92
编写于
9月 16, 2010
作者:
M
malenkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6741392: libmawt.so crash at Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting+0x4f
Reviewed-by: peterz
上级
66cb4858
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
34 addition
and
14 deletion
+34
-14
src/solaris/native/sun/awt/gtk2_interface.c
src/solaris/native/sun/awt/gtk2_interface.c
+30
-10
src/solaris/native/sun/awt/gtk2_interface.h
src/solaris/native/sun/awt/gtk2_interface.h
+2
-2
src/solaris/native/sun/awt/swing_GTKEngine.c
src/solaris/native/sun/awt/swing_GTKEngine.c
+2
-2
未找到文件。
src/solaris/native/sun/awt/gtk2_interface.c
浏览文件 @
e203fb92
/*
* Copyright (c) 2005, 20
08
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 20
10
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -371,6 +371,16 @@ const char *getStrFor(JNIEnv *env, jstring val)
return
convertionBuffer
;
}
static
void
throw_exception
(
JNIEnv
*
env
,
const
char
*
name
,
const
char
*
message
)
{
jclass
class
=
(
*
env
)
->
FindClass
(
env
,
name
);
if
(
class
!=
NULL
)
(
*
env
)
->
ThrowNew
(
env
,
class
,
message
);
(
*
env
)
->
DeleteLocalRef
(
env
,
class
);
}
/* This is a workaround for the bug:
* http://sourceware.org/bugzilla/show_bug.cgi?id=1814
* (dlsym/dlopen clears dlerror state)
...
...
@@ -859,14 +869,26 @@ static void init_containers()
* comparing results. This can be optimized by using subclassed pixmap and
* doing the second drawing only if necessary.
*/
void
gtk2_init_painting
(
gint
width
,
gint
height
)
void
gtk2_init_painting
(
JNIEnv
*
env
,
gint
width
,
gint
height
)
{
GdkGC
*
gc
;
GdkPixbuf
*
white
,
*
black
;
init_containers
();
if
(
gtk2_pixbuf_width
<
width
||
gtk2_pixbuf_height
<
height
)
{
white
=
(
*
fp_gdk_pixbuf_new
)(
GDK_COLORSPACE_RGB
,
TRUE
,
8
,
width
,
height
);
black
=
(
*
fp_gdk_pixbuf_new
)(
GDK_COLORSPACE_RGB
,
TRUE
,
8
,
width
,
height
);
if
(
white
==
NULL
||
black
==
NULL
)
{
snprintf
(
convertionBuffer
,
CONV_BUFFER_SIZE
,
"Couldn't create pixbuf of size %dx%d"
,
width
,
height
);
throw_exception
(
env
,
"java/lang/RuntimeException"
,
convertionBuffer
);
fp_gdk_threads_leave
();
return
;
}
if
(
gtk2_white_pixmap
!=
NULL
)
{
/* free old stuff */
(
*
fp_g_object_unref
)(
gtk2_white_pixmap
);
...
...
@@ -875,14 +897,12 @@ void gtk2_init_painting(gint width, gint height)
(
*
fp_g_object_unref
)(
gtk2_black_pixbuf
);
}
gtk2_white_pixmap
=
(
*
fp_gdk_pixmap_new
)
(
gtk2_window
->
window
,
width
,
height
,
-
1
);
gtk2_black_pixmap
=
(
*
fp_gdk_pixmap_new
)
(
gtk2_window
->
window
,
width
,
height
,
-
1
);
gtk2_white_pixbuf
=
(
*
fp_gdk_pixbuf_new
)(
GDK_COLORSPACE_RGB
,
TRUE
,
8
,
width
,
height
);
gtk2_black_pixbuf
=
(
*
fp_gdk_pixbuf_new
)(
GDK_COLORSPACE_RGB
,
TRUE
,
8
,
width
,
height
);
gtk2_white_pixmap
=
(
*
fp_gdk_pixmap_new
)(
gtk2_window
->
window
,
width
,
height
,
-
1
);
gtk2_black_pixmap
=
(
*
fp_gdk_pixmap_new
)(
gtk2_window
->
window
,
width
,
height
,
-
1
);
gtk2_white_pixbuf
=
white
;
gtk2_black_pixbuf
=
black
;
gtk2_pixbuf_width
=
width
;
gtk2_pixbuf_height
=
height
;
}
...
...
src/solaris/native/sun/awt/gtk2_interface.h
浏览文件 @
e203fb92
/*
* Copyright (c) 2005, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 20
10
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -717,7 +717,7 @@ void gtk2_paint_vline(WidgetType widget_type, GtkStateType state_type,
void
gtk_paint_background
(
WidgetType
widget_type
,
GtkStateType
state_type
,
gint
x
,
gint
y
,
gint
width
,
gint
height
);
void
gtk2_init_painting
(
gint
w
,
gint
h
);
void
gtk2_init_painting
(
JNIEnv
*
env
,
gint
w
,
gint
h
);
gint
gtk2_copy_image
(
gint
*
dest
,
gint
width
,
gint
height
);
gint
gtk2_get_xthickness
(
JNIEnv
*
env
,
WidgetType
widget_type
);
...
...
src/solaris/native/sun/awt/swing_GTKEngine.c
浏览文件 @
e203fb92
/*
* Copyright (c) 2005, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 20
10
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -293,7 +293,7 @@ Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting(
JNIEnv
*
env
,
jobject
this
,
jint
w
,
jint
h
)
{
fp_gdk_threads_enter
();
gtk2_init_painting
(
w
,
h
);
gtk2_init_painting
(
env
,
w
,
h
);
fp_gdk_threads_leave
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录