Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
1941e844
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看板
提交
1941e844
编写于
12月 08, 2010
作者:
M
miroslawzn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6859086: Dialog created by JOptionPane.showMessageDialog does not repaint sometimes
Reviewed-by: bae, chrisphi
上级
ab157aa0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
1 deletion
+29
-1
src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.cpp
...indows/native/sun/java2d/windows/GDIWindowSurfaceData.cpp
+17
-1
src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h
src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h
+12
-0
未找到文件。
src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.cpp
浏览文件 @
1941e844
...
...
@@ -54,6 +54,7 @@ static HPEN nullpen;
static
jclass
xorCompClass
;
static
jboolean
beingShutdown
=
JNI_FALSE
;
static
volatile
LONG
timeStamp
=
0
;
extern
CriticalSection
windowMoveLock
;
extern
"C"
...
...
@@ -90,12 +91,24 @@ void SetupThreadGraphicsInfo(JNIEnv *env, GDIWinSDOps *wsdo) {
HDC
oldhDC
=
info
->
hDC
;
// the hDC is NULL for offscreen surfaces - we don't store it
// in TLS as it must be created new every time.
if
(((
oldhDC
==
NULL
)
&&
wsdo
->
window
!=
NULL
)
||
(
info
->
wsdo
!=
wsdo
))
{
if
(
((
oldhDC
==
NULL
)
&&
wsdo
->
window
!=
NULL
)
||
(
info
->
wsdo
!=
wsdo
)
||
(
info
->
wsdoTimeStamp
!=
wsdo
->
timeStamp
)
)
{
// Init graphics state, either because this is our first time
// using it in this thread or because this thread is now
// dealing with a different window than it was last time.
//check extra condition:
//(info->wsdoTimeStamp != wsdo->timeStamp).
//Checking memory addresses (info->wsdo != wsdo) will not detect
//that wsdo points to a newly allocated structure in case
//that structure just got allocated at a "recycled" memory location
//which previously was pointed by info->wsdo
//see bug# 6859086
// Release cached DC. We use deferred DC releasing mechanism because
// the DC is associated with cached wsdo and component peer,
// which may've been disposed by this time, and we have
...
...
@@ -157,7 +170,9 @@ void SetupThreadGraphicsInfo(JNIEnv *env, GDIWinSDOps *wsdo) {
info
->
xorcolor
=
0
;
info
->
patrop
=
PATCOPY
;
//store the address and time stamp of newly allocated GDIWinSDOps structure
info
->
wsdo
=
wsdo
;
info
->
wsdoTimeStamp
=
wsdo
->
timeStamp
;
}
}
...
...
@@ -367,6 +382,7 @@ Java_sun_java2d_windows_GDIWindowSurfaceData_initOps(JNIEnv *env, jobject wsd,
JNU_ThrowOutOfMemoryError
(
env
,
"Initialization of SurfaceData failed."
);
return
;
}
wsdo
->
timeStamp
=
InterlockedIncrement
(
&
timeStamp
);
//creation time stamp
wsdo
->
sdOps
.
Lock
=
GDIWinSD_Lock
;
wsdo
->
sdOps
.
GetRasInfo
=
GDIWinSD_GetRasInfo
;
wsdo
->
sdOps
.
Unlock
=
GDIWinSD_Unlock
;
...
...
src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h
浏览文件 @
1941e844
...
...
@@ -148,6 +148,11 @@ typedef void InvalidateSDFunc(JNIEnv *env,
*/
struct
_GDIWinSDOps
{
SurfaceDataOps
sdOps
;
LONG
timeStamp
;
// creation time stamp.
// Doesn't store a real time -
// just counts creation events of this structure
// made by GDIWindowSurfaceData_initOps()
// see bug# 6859086
jboolean
invalid
;
GetDCFunc
*
GetDC
;
ReleaseDCFunc
*
ReleaseDC
;
...
...
@@ -192,6 +197,13 @@ extern "C" {
typedef
struct
{
HDC
hDC
;
GDIWinSDOps
*
wsdo
;
LONG
wsdoTimeStamp
;
// wsdo creation time stamp.
// Other threads may deallocate wsdo
// and then allocate a new GDIWinSDOps
// structure at the same memory location.
// Time stamp is the only way to detect if
// wsdo got changed.
// see bug# 6859086
RECT
bounds
;
jobject
clip
;
jobject
comp
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录