Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
dc071052
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dc071052
编写于
9月 05, 2012
作者:
S
skovatch
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7187834: [macosx] Usage of private API in macosx 2D implementation causes Apple Store rejection
Reviewed-by: prr, igor
上级
fba2d1c2
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
12 addition
and
24 deletion
+12
-24
src/macosx/native/sun/awt/ImageSurfaceData.h
src/macosx/native/sun/awt/ImageSurfaceData.h
+4
-6
src/macosx/native/sun/awt/ImageSurfaceData.m
src/macosx/native/sun/awt/ImageSurfaceData.m
+4
-6
src/macosx/native/sun/awt/QuartzRenderer.m
src/macosx/native/sun/awt/QuartzRenderer.m
+2
-5
src/macosx/native/sun/awt/QuartzSurfaceData.m
src/macosx/native/sun/awt/QuartzSurfaceData.m
+2
-7
未找到文件。
src/macosx/native/sun/awt/ImageSurfaceData.h
浏览文件 @
dc071052
...
...
@@ -41,7 +41,7 @@ void UnlockImagePixels(JNIEnv* env, ImageSDOps* isdo);
// If there is an image present, this is a no-op
void
makeSureImageIsCreated
(
ImageSDOps
*
isdo
);
struct
_ContextInfo
typedef
struct
_ContextInfo
{
BOOL
useWindowContextReference
;
BOOL
canUseJavaPixelsAsContext
;
...
...
@@ -50,10 +50,9 @@ struct _ContextInfo
size_t
bytesPerRow
;
CGImageAlphaInfo
alphaInfo
;
CGColorSpaceRef
colorSpace
;
}
typedef
ContextInfo
;
}
ContextInfo
;
struct
_ImageInfo
typedef
struct
_ImageInfo
{
size_t
bitsPerComponent
;
size_t
bitsPerPixel
;
...
...
@@ -61,8 +60,7 @@ struct _ImageInfo
size_t
bytesPerRow
;
CGImageAlphaInfo
alphaInfo
;
CGColorSpaceRef
colorSpace
;
}
typedef
ImageInfo
;
}
ImageInfo
;
struct
_ImageSDOps
{
...
...
src/macosx/native/sun/awt/ImageSurfaceData.m
浏览文件 @
dc071052
...
...
@@ -53,10 +53,6 @@
//
for
vImage
framework
headers
#include
<
Accelerate
/
Accelerate
.
h
>
//
private
Quartz
routines
needed
here
CG
_
EXTERN
void
CGContextSetCTM
(
CGContextRef
ref
,
CGAffineTransform
tx
)
;
static
ContextInfo
sDefaultContextInfo
[
sun
_
java2d
_
OSXOffScreenSurfaceData
_
TYPE
_
3
BYTE
_
RGB
+
1
]
=
{
{
YES
,
YES
,
8
,
4
,
0
,
kCGImageAlphaPremultipliedFirst
|
kCGBitmapByteOrder32Host
,
NULL
}
,
//
TYPE
_
CUSTOM
//
special
case
...
...
@@ -942,7 +938,6 @@ PRINT("createContext")
//
intitalize
the
context
to
match
the
Java
coordinate
system
//
BG
,
since
the
context
is
created
above
,
we
can
just
concat
//
CGContextSetCTM
(
qsdo
->
cgRef
,
CGAffineTransformMake
(
1
,
0
,
0
,
-
1
,
0
,
isdo
->
height
))
;
CGContextConcatCTM
(
qsdo
->
cgRef
,
CGAffineTransformMake
(
1
,
0
,
0
,
-
1
,
0
,
isdo
->
height
))
;
CGContextSaveGState
(
qsdo
->
cgRef
)
;
//
this
will
make
sure
we
don
'
t
go
pass
device
context
settings
...
...
@@ -1114,7 +1109,10 @@ PRINT("syncFromJavaPixels")
if
(
qsdo
->
cgRef
!=
NULL
)
{
CGContextSaveGState
(
qsdo
->
cgRef
)
;
CGContextSetCTM
(
qsdo
->
cgRef
,
CGAffineTransformMake
(
1
,
0
,
0
,
1
,
0
,
0
))
;
CGAffineTransform
currCTM
=
CGContextGetCTM
(
qsdo
->
cgRef
)
;
CGAffineTransform
inverse
=
CGAffineTransformInvert
(
currCTM
)
;
CGContextConcatCTM
(
qsdo
->
cgRef
,
inverse
)
;
CGContextConcatCTM
(
qsdo
->
cgRef
,
CGAffineTransformMake
(
1
,
0
,
0
,
1
,
0
,
0
))
;
CGContextSetBlendMode
(
qsdo
->
cgRef
,
kCGBlendModeCopy
)
;
CGContextSetAlpha
(
qsdo
->
cgRef
,
1.0
f
)
;
CGContextDrawImage
(
qsdo
->
cgRef
,
CGRectMake
(
0
,
0
,
width
,
height
)
,
javaImg
)
;
...
...
src/macosx/native/sun/awt/QuartzRenderer.m
浏览文件 @
dc071052
...
...
@@ -50,9 +50,6 @@
//
same
value
as
defined
in
Sun
'
s
own
code
#define
XOR
_
ALPHA
_
CUTOFF
128
//
private
Quartz
routines
needed
here
CG
_
EXTERN
void
CGContextSetCTM
(
CGContextRef
ref
,
CGAffineTransform
tx
)
;
static
CGFloat
gRoundRectCtrlpts
[
10
][
12
]
=
{
...
...
@@ -536,7 +533,7 @@ QUARTZ_RENDERER_INLINE void doImageCG(JNIEnv *env, CGContextRef cgRef, jobject i
makeSureImageIsCreated(isdo);
CG
AffineTransform ctm = CGContextGetCTM
(cgRef);
CG
ContextSaveGState
(cgRef);
CGContextConcatCTM(cgRef, CGAffineTransformMake(a, b, c, d, tx, ty));
jint alphaInfo = isdo->contextInfo.alphaInfo & kCGBitmapAlphaInfoMask;
...
...
@@ -551,7 +548,7 @@ QUARTZ_RENDERER_INLINE void doImageCG(JNIEnv *env, CGContextRef cgRef, jobject i
CGImageRelease(subImg);
}
CGContext
SetCTM(cgRef, ctm
);
CGContext
RestoreGState(cgRef
);
UnlockImage(env, isdo);
}
...
...
src/macosx/native/sun/awt/QuartzSurfaceData.m
浏览文件 @
dc071052
...
...
@@ -40,9 +40,6 @@
#import
<
AppKit
/
AppKit
.
h
>
#import
"ThreadUtilities.h"
//
private
Quartz
routines
needed
here
CG
_
EXTERN
void
CGContextSetCTM
(
CGContextRef
ref
,
CGAffineTransform
tx
)
;
//
#define
DEBUG
#if
defined
DEBUG
#define
PRINT
(
msg
)
{
fprintf
(
stderr
,
"%s\n"
,
msg
)
;
}
...
...
@@ -50,9 +47,6 @@ CG_EXTERN void CGContextSetCTM(CGContextRef ref, CGAffineTransform tx);
#define
PRINT
(
msg
)
{}
#endif
//
from
CGAffineTransformPrivate
.
h
extern
CGPoint
CGPointApplyInverseAffineTransform
(
CGPoint
point
,
CGAffineTransform
t
)
;
#define
kOffset
(
0.5
f
)
BOOL
gAdjustForJavaDrawing
;
...
...
@@ -608,7 +602,8 @@ PRINT(" SetUpCGContext")
// We need to flip both y coefficeints to flip the offset point into the java coordinate system.
ctm.b = -ctm.b; ctm.d = -ctm.d; ctm.tx = 0.0f; ctm.ty = 0.0f;
CGPoint offsets = {kOffset, kOffset};
offsets = CGPointApplyInverseAffineTransform(offsets, ctm);
CGAffineTransform inverse = CGAffineTransformInvert(ctm);
offsets = CGPointApplyAffineTransform(offsets, inverse);
qsdo->graphicsStateInfo.offsetX = offsets.x;
qsdo->graphicsStateInfo.offsetY = offsets.y;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录