Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
8bd348e5
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看板
提交
8bd348e5
编写于
8月 20, 2013
作者:
L
lana
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
d334b102
2b93640a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
65 addition
and
19 deletion
+65
-19
src/share/classes/sun/print/PSPrinterJob.java
src/share/classes/sun/print/PSPrinterJob.java
+16
-0
src/share/native/sun/font/sunFont.c
src/share/native/sun/font/sunFont.c
+20
-5
src/share/native/sun/font/sunfontids.h
src/share/native/sun/font/sunfontids.h
+1
-1
src/solaris/classes/sun/print/UnixPrintServiceLookup.java
src/solaris/classes/sun/print/UnixPrintServiceLookup.java
+23
-9
src/windows/native/sun/java2d/opengl/WGLSurfaceData.c
src/windows/native/sun/java2d/opengl/WGLSurfaceData.c
+5
-4
未找到文件。
src/share/classes/sun/print/PSPrinterJob.java
浏览文件 @
8bd348e5
...
@@ -339,6 +339,8 @@ public class PSPrinterJob extends RasterPrinterJob {
...
@@ -339,6 +339,8 @@ public class PSPrinterJob extends RasterPrinterJob {
*/
*/
private
static
Properties
mFontProps
=
null
;
private
static
Properties
mFontProps
=
null
;
private
static
boolean
isMac
;
/* Class static initialiser block */
/* Class static initialiser block */
static
{
static
{
//enable priviledges so initProps can access system properties,
//enable priviledges so initProps can access system properties,
...
@@ -347,6 +349,8 @@ public class PSPrinterJob extends RasterPrinterJob {
...
@@ -347,6 +349,8 @@ public class PSPrinterJob extends RasterPrinterJob {
new
java
.
security
.
PrivilegedAction
()
{
new
java
.
security
.
PrivilegedAction
()
{
public
Object
run
()
{
public
Object
run
()
{
mFontProps
=
initProps
();
mFontProps
=
initProps
();
String
osName
=
System
.
getProperty
(
"os.name"
);
isMac
=
osName
.
startsWith
(
"Mac"
);
return
null
;
return
null
;
}
}
});
});
...
@@ -473,6 +477,12 @@ public class PSPrinterJob extends RasterPrinterJob {
...
@@ -473,6 +477,12 @@ public class PSPrinterJob extends RasterPrinterJob {
PrintService
pServ
=
getPrintService
();
PrintService
pServ
=
getPrintService
();
if
(
pServ
!=
null
)
{
if
(
pServ
!=
null
)
{
mDestination
=
pServ
.
getName
();
mDestination
=
pServ
.
getName
();
if
(
isMac
)
{
PrintServiceAttributeSet
psaSet
=
pServ
.
getAttributes
()
;
if
(
psaSet
!=
null
)
{
mDestination
=
psaSet
.
get
(
PrinterName
.
class
).
toString
();
}
}
}
}
}
}
}
}
...
@@ -771,6 +781,12 @@ public class PSPrinterJob extends RasterPrinterJob {
...
@@ -771,6 +781,12 @@ public class PSPrinterJob extends RasterPrinterJob {
PrintService
pServ
=
getPrintService
();
PrintService
pServ
=
getPrintService
();
if
(
pServ
!=
null
)
{
if
(
pServ
!=
null
)
{
mDestination
=
pServ
.
getName
();
mDestination
=
pServ
.
getName
();
if
(
isMac
)
{
PrintServiceAttributeSet
psaSet
=
pServ
.
getAttributes
();
if
(
psaSet
!=
null
)
{
mDestination
=
psaSet
.
get
(
PrinterName
.
class
).
toString
()
;
}
}
}
}
PrinterSpooler
spooler
=
new
PrinterSpooler
();
PrinterSpooler
spooler
=
new
PrinterSpooler
();
java
.
security
.
AccessController
.
doPrivileged
(
spooler
);
java
.
security
.
AccessController
.
doPrivileged
(
spooler
);
...
...
src/share/native/sun/font/sunFont.c
浏览文件 @
8bd348e5
...
@@ -71,13 +71,17 @@ JNIEXPORT jlong JNICALL Java_sun_font_NullFontScaler_getGlyphImage
...
@@ -71,13 +71,17 @@ JNIEXPORT jlong JNICALL Java_sun_font_NullFontScaler_getGlyphImage
void
initLCDGammaTables
();
void
initLCDGammaTables
();
/* placeholder for extern variable */
/* placeholder for extern variable */
static
int
initialisedFontIDs
=
0
;
FontManagerNativeIDs
sunFontIDs
;
FontManagerNativeIDs
sunFontIDs
;
JNIEXPORT
void
JNICALL
static
void
initFontIDs
(
JNIEnv
*
env
)
{
Java_sun_font_SunFontManager_initIDs
(
JNIEnv
*
env
,
jclass
cls
)
{
jclass
tmpClass
;
jclass
tmpClass
=
(
*
env
)
->
FindClass
(
env
,
"sun/font/TrueTypeFont"
);
if
(
initialisedFontIDs
)
{
return
;
}
tmpClass
=
(
*
env
)
->
FindClass
(
env
,
"sun/font/TrueTypeFont"
);
sunFontIDs
.
ttReadBlockMID
=
sunFontIDs
.
ttReadBlockMID
=
(
*
env
)
->
GetMethodID
(
env
,
tmpClass
,
"readBlock"
,
(
*
env
)
->
GetMethodID
(
env
,
tmpClass
,
"readBlock"
,
"(Ljava/nio/ByteBuffer;II)I"
);
"(Ljava/nio/ByteBuffer;II)I"
);
...
@@ -173,9 +177,20 @@ Java_sun_font_SunFontManager_initIDs
...
@@ -173,9 +177,20 @@ Java_sun_font_SunFontManager_initIDs
(
*
env
)
->
GetFieldID
(
env
,
tmpClass
,
"lcdSubPixPos"
,
"Z"
);
(
*
env
)
->
GetFieldID
(
env
,
tmpClass
,
"lcdSubPixPos"
,
"Z"
);
initLCDGammaTables
();
initLCDGammaTables
();
initialisedFontIDs
=
1
;
}
}
JNIEXPORT
FontManagerNativeIDs
getSunFontIDs
()
{
JNIEXPORT
void
JNICALL
Java_sun_font_SunFontManager_initIDs
(
JNIEnv
*
env
,
jclass
cls
)
{
initFontIDs
(
env
);
}
JNIEXPORT
FontManagerNativeIDs
getSunFontIDs
(
JNIEnv
*
env
)
{
initFontIDs
(
env
);
return
sunFontIDs
;
return
sunFontIDs
;
}
}
...
...
src/share/native/sun/font/sunfontids.h
浏览文件 @
8bd348e5
...
@@ -84,7 +84,7 @@ typedef struct FontManagerNativeIDs {
...
@@ -84,7 +84,7 @@ typedef struct FontManagerNativeIDs {
/* Note: we share variable in the context of fontmanager lib
/* Note: we share variable in the context of fontmanager lib
but we need access method to use it from separate rasterizer lib */
but we need access method to use it from separate rasterizer lib */
extern
FontManagerNativeIDs
sunFontIDs
;
extern
FontManagerNativeIDs
sunFontIDs
;
JNIEXPORT
FontManagerNativeIDs
getSunFontIDs
();
JNIEXPORT
FontManagerNativeIDs
getSunFontIDs
(
JNIEnv
*
env
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
src/solaris/classes/sun/print/UnixPrintServiceLookup.java
浏览文件 @
8bd348e5
...
@@ -245,7 +245,7 @@ public class UnixPrintServiceLookup extends PrintServiceLookup
...
@@ -245,7 +245,7 @@ public class UnixPrintServiceLookup extends PrintServiceLookup
continue
;
continue
;
}
}
if
((
defaultPrintService
!=
null
)
if
((
defaultPrintService
!=
null
)
&&
printers
[
p
].
equals
(
defaultPrintService
.
getName
(
)))
{
&&
printers
[
p
].
equals
(
getPrinterDestName
(
defaultPrintService
)))
{
printerList
.
add
(
defaultPrintService
);
printerList
.
add
(
defaultPrintService
);
defaultIndex
=
printerList
.
size
()
-
1
;
defaultIndex
=
printerList
.
size
()
-
1
;
}
else
{
}
else
{
...
@@ -270,11 +270,12 @@ public class UnixPrintServiceLookup extends PrintServiceLookup
...
@@ -270,11 +270,12 @@ public class UnixPrintServiceLookup extends PrintServiceLookup
}
else
{
}
else
{
int
j
;
int
j
;
for
(
j
=
0
;
j
<
printServices
.
length
;
j
++)
{
for
(
j
=
0
;
j
<
printServices
.
length
;
j
++)
{
if
((
printServices
[
j
]
!=
null
)
&&
if
(
printServices
[
j
]
!=
null
)
{
(
printers
[
p
].
equals
(
printServices
[
j
].
getName
())))
{
if
(
printers
[
p
].
equals
(
getPrinterDestName
(
printServices
[
j
])))
{
printerList
.
add
(
printServices
[
j
]);
printerList
.
add
(
printServices
[
j
]);
printServices
[
j
]
=
null
;
printServices
[
j
]
=
null
;
break
;
break
;
}
}
}
}
}
...
@@ -360,6 +361,17 @@ public class UnixPrintServiceLookup extends PrintServiceLookup
...
@@ -360,6 +361,17 @@ public class UnixPrintServiceLookup extends PrintServiceLookup
return
true
;
return
true
;
}
}
/*
* Gets the printer name compatible with the list of printers returned by
* the system when we query default or all the available printers.
*/
private
String
getPrinterDestName
(
PrintService
ps
)
{
if
(
isMac
())
{
return
((
IPPPrintService
)
ps
).
getDest
();
}
return
ps
.
getName
();
}
/* On a network with many (hundreds) of network printers, it
/* On a network with many (hundreds) of network printers, it
* can save several seconds if you know all you want is a particular
* can save several seconds if you know all you want is a particular
* printer, to ask for that printer rather than retrieving all printers.
* printer, to ask for that printer rather than retrieving all printers.
...
@@ -369,10 +381,12 @@ public class UnixPrintServiceLookup extends PrintServiceLookup
...
@@ -369,10 +381,12 @@ public class UnixPrintServiceLookup extends PrintServiceLookup
if
(
name
==
null
||
name
.
equals
(
""
)
||
!
checkPrinterName
(
name
))
{
if
(
name
==
null
||
name
.
equals
(
""
)
||
!
checkPrinterName
(
name
))
{
return
null
;
return
null
;
}
}
/* check i
s
all printers are already available */
/* check i
f
all printers are already available */
if
(
printServices
!=
null
)
{
if
(
printServices
!=
null
)
{
for
(
PrintService
printService
:
printServices
)
{
for
(
PrintService
printService
:
printServices
)
{
if
(
printService
.
getName
().
equals
(
name
))
{
PrinterName
printerName
=
(
PrinterName
)
printService
.
getAttribute
(
PrinterName
.
class
);
if
(
printerName
.
getValue
().
equals
(
name
))
{
return
printService
;
return
printService
;
}
}
}
}
...
@@ -567,7 +581,7 @@ public class UnixPrintServiceLookup extends PrintServiceLookup
...
@@ -567,7 +581,7 @@ public class UnixPrintServiceLookup extends PrintServiceLookup
defaultPrintService
=
null
;
defaultPrintService
=
null
;
if
(
printServices
!=
null
)
{
if
(
printServices
!=
null
)
{
for
(
int
j
=
0
;
j
<
printServices
.
length
;
j
++)
{
for
(
int
j
=
0
;
j
<
printServices
.
length
;
j
++)
{
if
(
defaultPrinter
.
equals
(
printServices
[
j
].
getName
(
)))
{
if
(
defaultPrinter
.
equals
(
getPrinterDestName
(
printServices
[
j
]
)))
{
defaultPrintService
=
printServices
[
j
];
defaultPrintService
=
printServices
[
j
];
break
;
break
;
}
}
...
...
src/windows/native/sun/java2d/opengl/WGLSurfaceData.c
浏览文件 @
8bd348e5
...
@@ -67,14 +67,15 @@ Java_sun_java2d_opengl_WGLSurfaceData_initOps(JNIEnv *env, jobject wglsd,
...
@@ -67,14 +67,15 @@ Java_sun_java2d_opengl_WGLSurfaceData_initOps(JNIEnv *env, jobject wglsd,
J2dTraceLn
(
J2D_TRACE_INFO
,
"WGLSurfaceData_initOps"
);
J2dTraceLn
(
J2D_TRACE_INFO
,
"WGLSurfaceData_initOps"
);
if
(
oglsdo
==
NULL
)
{
JNU_ThrowOutOfMemoryError
(
env
,
"Initialization of SurfaceData failed."
);
return
;
}
if
(
wglsdo
==
NULL
)
{
if
(
wglsdo
==
NULL
)
{
JNU_ThrowOutOfMemoryError
(
env
,
"creating native wgl ops"
);
JNU_ThrowOutOfMemoryError
(
env
,
"creating native wgl ops"
);
return
;
return
;
}
}
if
(
oglsdo
==
NULL
)
{
free
(
wglsdo
);
JNU_ThrowOutOfMemoryError
(
env
,
"Initialization of SurfaceData failed."
);
return
;
}
oglsdo
->
privOps
=
wglsdo
;
oglsdo
->
privOps
=
wglsdo
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录