equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
30 import java.awt.geom.AffineTransform; |
30 import java.awt.geom.AffineTransform; |
31 import java.awt.image.AffineTransformOp; |
31 import java.awt.image.AffineTransformOp; |
32 import java.awt.image.BufferedImage; |
32 import java.awt.image.BufferedImage; |
33 import java.awt.image.BufferedImageOp; |
33 import java.awt.image.BufferedImageOp; |
34 import java.lang.ref.WeakReference; |
34 import java.lang.ref.WeakReference; |
35 import javax.tools.annotation.GenerateNativeHeader; |
35 import java.lang.annotation.Native; |
36 import sun.java2d.ScreenUpdateManager; |
36 import sun.java2d.ScreenUpdateManager; |
37 import sun.java2d.SurfaceData; |
37 import sun.java2d.SurfaceData; |
38 import sun.java2d.loops.Blit; |
38 import sun.java2d.loops.Blit; |
39 import sun.java2d.loops.CompositeType; |
39 import sun.java2d.loops.CompositeType; |
40 import sun.java2d.loops.GraphicsPrimitive; |
40 import sun.java2d.loops.GraphicsPrimitive; |
46 import sun.java2d.pipe.RenderBuffer; |
46 import sun.java2d.pipe.RenderBuffer; |
47 import sun.java2d.pipe.RenderQueue; |
47 import sun.java2d.pipe.RenderQueue; |
48 import static sun.java2d.pipe.BufferedOpCodes.*; |
48 import static sun.java2d.pipe.BufferedOpCodes.*; |
49 import sun.java2d.windows.GDIWindowSurfaceData; |
49 import sun.java2d.windows.GDIWindowSurfaceData; |
50 |
50 |
51 /* No native methods here, but the constants are needed in the supporting JNI code */ |
|
52 @GenerateNativeHeader |
|
53 class D3DBlitLoops { |
51 class D3DBlitLoops { |
54 |
52 |
55 static void register() { |
53 static void register() { |
56 Blit blitIntArgbPreToSurface = |
54 Blit blitIntArgbPreToSurface = |
57 new D3DSwToSurfaceBlit(SurfaceType.IntArgbPre, |
55 new D3DSwToSurfaceBlit(SurfaceType.IntArgbPre, |
177 /** |
175 /** |
178 * The following offsets are used to pack the parameters in |
176 * The following offsets are used to pack the parameters in |
179 * createPackedParams(). (They are also used at the native level when |
177 * createPackedParams(). (They are also used at the native level when |
180 * unpacking the params.) |
178 * unpacking the params.) |
181 */ |
179 */ |
182 private static final int OFFSET_SRCTYPE = 16; |
180 @Native private static final int OFFSET_SRCTYPE = 16; |
183 private static final int OFFSET_HINT = 8; |
181 @Native private static final int OFFSET_HINT = 8; |
184 private static final int OFFSET_TEXTURE = 3; |
182 @Native private static final int OFFSET_TEXTURE = 3; |
185 private static final int OFFSET_RTT = 2; |
183 @Native private static final int OFFSET_RTT = 2; |
186 private static final int OFFSET_XFORM = 1; |
184 @Native private static final int OFFSET_XFORM = 1; |
187 private static final int OFFSET_ISOBLIT = 0; |
185 @Native private static final int OFFSET_ISOBLIT = 0; |
188 |
186 |
189 /** |
187 /** |
190 * Packs the given parameters into a single int value in order to save |
188 * Packs the given parameters into a single int value in order to save |
191 * space on the rendering queue. |
189 * space on the rendering queue. |
192 */ |
190 */ |