Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
7ace10d5
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
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,发现更多精彩内容 >>
提交
7ace10d5
编写于
2月 28, 2013
作者:
S
serb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8008660: Failure in 2D Queue Flusher thread on Mac
Reviewed-by: swingler, bae
上级
2ab5ca35
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
32 addition
and
83 deletion
+32
-83
src/macosx/classes/sun/awt/CGraphicsConfig.java
src/macosx/classes/sun/awt/CGraphicsConfig.java
+1
-1
src/macosx/classes/sun/awt/CGraphicsDevice.java
src/macosx/classes/sun/awt/CGraphicsDevice.java
+6
-3
src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java
src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java
+14
-15
src/macosx/classes/sun/lwawt/macosx/CRobot.java
src/macosx/classes/sun/lwawt/macosx/CRobot.java
+4
-4
src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
+1
-1
src/macosx/native/sun/awt/CRobot.m
src/macosx/native/sun/awt/CRobot.m
+1
-3
src/macosx/native/sun/awt/LWCToolkit.h
src/macosx/native/sun/awt/LWCToolkit.h
+0
-2
src/macosx/native/sun/awt/LWCToolkit.m
src/macosx/native/sun/awt/LWCToolkit.m
+0
-33
src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m
src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m
+5
-21
未找到文件。
src/macosx/classes/sun/awt/CGraphicsConfig.java
浏览文件 @
7ace10d5
...
...
@@ -53,7 +53,7 @@ public abstract class CGraphicsConfig extends GraphicsConfiguration
@Override
public
Rectangle
getBounds
()
{
final
Rectangle2D
nativeBounds
=
nativeGetBounds
(
device
.
getC
oreGraphicsScreen
());
final
Rectangle2D
nativeBounds
=
nativeGetBounds
(
device
.
getC
GDisplayID
());
return
nativeBounds
.
getBounds
();
// does integer rounding
}
...
...
src/macosx/classes/sun/awt/CGraphicsDevice.java
浏览文件 @
7ace10d5
...
...
@@ -25,11 +25,11 @@
package
sun.awt
;
import
java.awt.AWTPermission
;
import
java.awt.DisplayMode
;
import
java.awt.GraphicsConfiguration
;
import
java.awt.GraphicsDevice
;
import
java.awt.Window
;
import
java.awt.AWTPermission
;
import
java.awt.DisplayMode
;
import
java.util.Objects
;
import
sun.java2d.opengl.CGLGraphicsConfig
;
...
...
@@ -58,9 +58,12 @@ public final class CGraphicsDevice extends GraphicsDevice {
}
/**
* Returns CGDirectDisplayID, which is the same id as @"NSScreenNumber" in
* NSScreen.
*
* @return CoreGraphics display id.
*/
public
int
getC
oreGraphicsScreen
()
{
public
int
getC
GDisplayID
()
{
return
displayID
;
}
...
...
src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java
浏览文件 @
7ace10d5
...
...
@@ -80,10 +80,8 @@ public final class CGLGraphicsConfig extends CGraphicsConfig
private
ContextCapabilities
oglCaps
;
private
OGLContext
context
;
private
final
Object
disposerReferent
=
new
Object
();
public
static
native
int
getDefaultPixFmt
(
int
screennum
);
private
static
native
boolean
initCGL
();
private
static
native
long
getCGLConfigInfo
(
int
screennum
,
int
visualnum
,
private
static
native
long
getCGLConfigInfo
(
int
displayID
,
int
visualnum
,
int
swapInterval
);
private
static
native
int
getOGLCapabilities
(
long
configInfo
);
...
...
@@ -137,15 +135,16 @@ public final class CGLGraphicsConfig extends CGraphicsConfig
// Java-level context and flush the queue...
OGLContext
.
invalidateCurrentContext
();
cfginfo
=
getCGLConfigInfo
(
device
.
getC
oreGraphicsScreen
(),
pixfmt
,
cfginfo
=
getCGLConfigInfo
(
device
.
getC
GDisplayID
(),
pixfmt
,
kOpenGLSwapInterval
);
if
(
cfginfo
!=
0L
)
{
OGLContext
.
setScratchSurface
(
cfginfo
);
rq
.
flushAndInvokeNow
(
new
Runnable
()
{
public
void
run
()
{
ids
[
0
]
=
OGLContext
.
getOGLIdString
();
}
});
}
}
finally
{
rq
.
unlock
();
}
...
...
@@ -253,8 +252,8 @@ public final class CGLGraphicsConfig extends CGraphicsConfig
@Override
public
String
toString
()
{
int
screen
=
getDevice
().
getCoreGraphicsScreen
();
return
(
"CGLGraphicsConfig[dev="
+
screen
+
",pixfmt="
+
pixfmt
+
"]"
);
int
displayID
=
getDevice
().
getCGDisplayID
();
return
(
"CGLGraphicsConfig[dev="
+
displayID
+
",pixfmt="
+
pixfmt
+
"]"
);
}
@Override
...
...
@@ -413,8 +412,8 @@ public final class CGLGraphicsConfig extends CGraphicsConfig
@Override
public
void
addDeviceEventListener
(
AccelDeviceEventListener
l
)
{
int
screen
=
getDevice
().
getCoreGraphicsScreen
();
AccelDeviceEventNotifier
.
addListener
(
l
,
screen
);
int
displayID
=
getDevice
().
getCGDisplayID
();
AccelDeviceEventNotifier
.
addListener
(
l
,
displayID
);
}
@Override
...
...
src/macosx/classes/sun/lwawt/macosx/CRobot.java
浏览文件 @
7ace10d5
...
...
@@ -65,7 +65,7 @@ class CRobot implements RobotPeer {
mouseLastX
=
x
;
mouseLastY
=
y
;
mouseEvent
(
fDevice
.
getC
oreGraphicsScreen
(),
mouseLastX
,
mouseLastY
,
mouseEvent
(
fDevice
.
getC
GDisplayID
(),
mouseLastX
,
mouseLastY
,
mouseButtonsState
,
true
,
true
);
}
...
...
@@ -79,7 +79,7 @@ class CRobot implements RobotPeer {
public
void
mousePress
(
int
buttons
)
{
mouseButtonsState
|=
buttons
;
mouseEvent
(
fDevice
.
getC
oreGraphicsScreen
(),
mouseLastX
,
mouseLastY
,
mouseEvent
(
fDevice
.
getC
GDisplayID
(),
mouseLastX
,
mouseLastY
,
buttons
,
true
,
false
);
}
...
...
@@ -93,7 +93,7 @@ class CRobot implements RobotPeer {
public
void
mouseRelease
(
int
buttons
)
{
mouseButtonsState
&=
~
buttons
;
mouseEvent
(
fDevice
.
getC
oreGraphicsScreen
(),
mouseLastX
,
mouseLastY
,
mouseEvent
(
fDevice
.
getC
GDisplayID
(),
mouseLastX
,
mouseLastY
,
buttons
,
false
,
false
);
}
...
...
@@ -163,7 +163,7 @@ class CRobot implements RobotPeer {
}
private
native
void
initRobot
();
private
native
void
mouseEvent
(
int
screen
,
int
lastX
,
int
lastY
,
private
native
void
mouseEvent
(
int
displayID
,
int
lastX
,
int
lastY
,
int
buttonsState
,
boolean
isButtonsDownState
,
boolean
isMouseMove
);
...
...
src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
浏览文件 @
7ace10d5
...
...
@@ -352,7 +352,7 @@ public final class LWCToolkit extends LWToolkit {
@Override
public
Insets
getScreenInsets
(
final
GraphicsConfiguration
gc
)
{
final
CGraphicsConfig
cgc
=
(
CGraphicsConfig
)
gc
;
final
int
displayId
=
cgc
.
getDevice
().
getC
oreGraphicsScreen
();
final
int
displayId
=
cgc
.
getDevice
().
getC
GDisplayID
();
Rectangle
fullScreen
,
workArea
;
final
long
screen
=
CWrapper
.
NSScreen
.
screenByDisplayId
(
displayId
);
try
{
...
...
src/macosx/native/sun/awt/CRobot.m
浏览文件 @
7ace10d5
...
...
@@ -135,7 +135,7 @@ Java_sun_lwawt_macosx_CRobot_initRobot
JNIEXPORT
void
JNICALL
Java_sun_lwawt_macosx_CRobot_mouseEvent
(
JNIEnv
*
env
,
jobject
peer
,
jint
screenIndex
,
jint
mouseLastX
,
jint
mouseLastY
,
jint
buttonsState
,
jint
displayID
,
jint
mouseLastX
,
jint
mouseLastY
,
jint
buttonsState
,
jboolean
isButtonsDownState
,
jboolean
isMouseMove
)
{
JNF_COCOA_ENTER
(
env
);
...
...
@@ -149,8 +149,6 @@ Java_sun_lwawt_macosx_CRobot_mouseEvent
CGError
err
=
kCGErrorSuccess
;
CGDirectDisplayID
displayID
=
FindCGDirectDisplayIDForScreenIndex
(
screenIndex
);
CGRect
globalDeviceBounds
=
CGDisplayBounds
(
displayID
);
// Set unknown mouse location, if needed.
...
...
src/macosx/native/sun/awt/LWCToolkit.h
浏览文件 @
7ace10d5
...
...
@@ -44,8 +44,6 @@ extern jint* gButtonDownMasks;
+
(
void
)
eventCountPlusPlus
;
@end
CGDirectDisplayID
FindCGDirectDisplayIDForScreenIndex
(
jint
screenIndex
);
/*
* Utility Macros
*/
...
...
src/macosx/native/sun/awt/LWCToolkit.m
浏览文件 @
7ace10d5
...
...
@@ -177,39 +177,6 @@ Java_sun_lwawt_macosx_LWCToolkit_beep
NSBeep
();
// produces both sound and visual flash, if configured in System Preferences
}
CGDirectDisplayID
FindCGDirectDisplayIDForScreenIndex
(
jint
screenIndex
)
{
// most common case - just one monitor
CGDirectDisplayID
screenID
=
CGMainDisplayID
();
CGDisplayCount
displayCount
=
0
;
CGGetOnlineDisplayList
(
0
,
NULL
,
&
displayCount
);
if
((
displayCount
>
1
)
&&
(
screenIndex
>=
0
)
&&
(
screenIndex
<
(
jint
)
displayCount
))
{
if
(
displayCount
<
10
)
{
// stack allocated optimization for less than 10 monitors
CGDirectDisplayID
onlineDisplays
[
displayCount
];
CGGetOnlineDisplayList
(
displayCount
,
onlineDisplays
,
&
displayCount
);
screenID
=
(
CGDirectDisplayID
)
onlineDisplays
[
screenIndex
];
}
else
{
CGDirectDisplayID
*
onlineDisplays
=
malloc
(
displayCount
*
sizeof
(
CGDirectDisplayID
));
if
(
onlineDisplays
!=
NULL
)
{
CGGetOnlineDisplayList
(
displayCount
,
onlineDisplays
,
&
displayCount
);
screenID
=
(
CGDirectDisplayID
)
onlineDisplays
[
screenIndex
];
free
(
onlineDisplays
);
}
}
}
return
screenID
;
}
/*
* Class: sun_lwawt_macosx_LWCToolkit
* Method: initIDs
...
...
src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m
浏览文件 @
7ace10d5
...
...
@@ -192,12 +192,12 @@ Java_sun_java2d_opengl_CGLGraphicsConfig_initCGL
JNIEXPORT
jlong
JNICALL
Java_sun_java2d_opengl_CGLGraphicsConfig_getCGLConfigInfo
(
JNIEnv
*
env
,
jclass
cglgc
,
jint
screennum
,
jint
pixfmt
,
jint
swapInterval
)
jint
displayID
,
jint
pixfmt
,
jint
swapInterval
)
{
jlong
ret
=
0L
;
JNF_COCOA_ENTER
(
env
);
NSMutableArray
*
retArray
=
[
NSMutableArray
arrayWithCapacity
:
3
];
[
retArray
addObject
:
[
NSNumber
numberWithInt
:
(
int
)
screennum
]];
[
retArray
addObject
:
[
NSNumber
numberWithInt
:
(
int
)
displayID
]];
[
retArray
addObject
:
[
NSNumber
numberWithInt
:
(
int
)
pixfmt
]];
[
retArray
addObject
:
[
NSNumber
numberWithInt
:
(
int
)
swapInterval
]];
if
([
NSThread
isMainThread
])
{
...
...
@@ -217,7 +217,7 @@ Java_sun_java2d_opengl_CGLGraphicsConfig_getCGLConfigInfo
+
(
void
)
_getCGLConfigInfo
:
(
NSMutableArray
*
)
argValue
{
AWT_ASSERT_APPKIT_THREAD
;
jint
screennum
=
(
jint
)[(
NSNumber
*
)[
argValue
objectAtIndex
:
0
]
intValue
];
jint
displayID
=
(
jint
)[(
NSNumber
*
)[
argValue
objectAtIndex
:
0
]
intValue
];
jint
pixfmt
=
(
jint
)[(
NSNumber
*
)[
argValue
objectAtIndex
:
1
]
intValue
];
jint
swapInterval
=
(
jint
)[(
NSNumber
*
)[
argValue
objectAtIndex
:
2
]
intValue
];
JNIEnv
*
env
=
[
ThreadUtilities
getJNIEnvUncached
];
...
...
@@ -230,16 +230,11 @@ Java_sun_java2d_opengl_CGLGraphicsConfig_getCGLConfigInfo
CGOpenGLDisplayMask
glMask
=
(
CGOpenGLDisplayMask
)
pixfmt
;
if
(
sharedContext
==
NULL
)
{
if
(
glMask
==
0
)
{
CGDirectDisplayID
id
=
FindCGDirectDisplayIDForScreenIndex
(
screennum
);
glMask
=
CGDisplayIDToOpenGLDisplayMask
(
id
);
glMask
=
CGDisplayIDToOpenGLDisplayMask
(
displayID
);
}
NSOpenGLPixelFormatAttribute
attrs
[]
=
{
NSOpenGLPFAClosestPolicy
,
NSOpenGLPFANoRecovery
,
NSOpenGLPFAAccelerated
,
NSOpenGLPFAFullScreen
,
NSOpenGLPFAWindow
,
NSOpenGLPFAPixelBuffer
,
NSOpenGLPFADoubleBuffer
,
...
...
@@ -412,7 +407,7 @@ Java_sun_java2d_opengl_CGLGraphicsConfig_getCGLConfigInfo
return
;
}
memset
(
cglinfo
,
0
,
sizeof
(
CGLGraphicsConfigInfo
));
cglinfo
->
screen
=
screennum
;
cglinfo
->
screen
=
displayID
;
cglinfo
->
pixfmt
=
sharedPixelFormat
;
cglinfo
->
context
=
oglc
;
...
...
@@ -422,17 +417,6 @@ Java_sun_java2d_opengl_CGLGraphicsConfig_getCGLConfigInfo
}
@end
//GraphicsConfigUtil
JNIEXPORT
jint
JNICALL
Java_sun_java2d_opengl_CGLGraphicsConfig_getDefaultPixFmt
(
JNIEnv
*
env
,
jclass
cglgc
,
jint
screennum
)
{
J2dTraceLn
(
J2D_TRACE_INFO
,
"CGLGraphicsConfig_getDefaultPixFmt"
);
CGDirectDisplayID
id
=
FindCGDirectDisplayIDForScreenIndex
(
screennum
);
return
(
jint
)
CGDisplayIDToOpenGLDisplayMask
(
id
);
}
JNIEXPORT
jint
JNICALL
Java_sun_java2d_opengl_CGLGraphicsConfig_getOGLCapabilities
(
JNIEnv
*
env
,
jclass
cglgc
,
jlong
configInfo
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录