use of sun.java2d.loops.Blit in project jdk8u_jdk by JetBrains.
the class OGLAnyCompositeBlit method Transform.
@Override
public synchronized void Transform(SurfaceData src, SurfaceData dst, Composite comp, Region clip, AffineTransform at, int hint, int srcx, int srcy, int dstx, int dsty, int width, int height) {
Blit convertsrc = Blit.getFromCache(src.getSurfaceType(), CompositeType.SrcNoEa, SurfaceType.IntArgbPre);
// use cached intermediate surface, if available
final SurfaceData cachedSrc = srcTmp != null ? srcTmp.get() : null;
// convert source to IntArgbPre
src = convertFrom(convertsrc, src, srcx, srcy, width, height, cachedSrc, BufferedImage.TYPE_INT_ARGB_PRE);
// transform IntArgbPre intermediate surface to OpenGL surface
performop.Transform(src, dst, comp, clip, at, hint, 0, 0, dstx, dsty, width, height);
if (src != cachedSrc) {
// cache the intermediate surface
srcTmp = new WeakReference<>(src);
}
}
use of sun.java2d.loops.Blit in project jdk8u_jdk by JetBrains.
the class OGLAnyCompositeBlit method Blit.
public synchronized void Blit(SurfaceData src, SurfaceData dst, Composite comp, Region clip, int sx, int sy, int dx, int dy, int w, int h) {
Blit convertsrc = Blit.getFromCache(src.getSurfaceType(), CompositeType.SrcNoEa, SurfaceType.IntArgbPre);
SurfaceData cachedSrc = null;
if (srcTmp != null) {
// use cached intermediate surface, if available
cachedSrc = (SurfaceData) srcTmp.get();
}
// convert source to IntArgbPre
src = convertFrom(convertsrc, src, sx, sy, w, h, cachedSrc, BufferedImage.TYPE_INT_ARGB_PRE);
// copy IntArgbPre intermediate surface to OpenGL surface
performop.Blit(src, dst, comp, clip, 0, 0, dx, dy, w, h);
if (src != cachedSrc) {
// cache the intermediate surface
srcTmp = new WeakReference(src);
}
}
use of sun.java2d.loops.Blit in project jdk8u_jdk by JetBrains.
the class D3DSurfaceToGDIWindowSurfaceTransform method Transform.
@Override
public synchronized void Transform(SurfaceData src, SurfaceData dst, Composite comp, Region clip, AffineTransform at, int hint, int srcx, int srcy, int dstx, int dsty, int width, int height) {
Blit convertsrc = Blit.getFromCache(src.getSurfaceType(), CompositeType.SrcNoEa, SurfaceType.IntArgbPre);
// use cached intermediate surface, if available
final SurfaceData cachedSrc = srcTmp != null ? srcTmp.get() : null;
// convert source to IntArgbPre
src = convertFrom(convertsrc, src, srcx, srcy, width, height, cachedSrc, BufferedImage.TYPE_INT_ARGB_PRE);
// transform IntArgbPre intermediate surface to D3D surface
performop.Transform(src, dst, comp, clip, at, hint, 0, 0, dstx, dsty, width, height);
if (src != cachedSrc) {
// cache the intermediate surface
srcTmp = new WeakReference<>(src);
}
}
use of sun.java2d.loops.Blit in project jdk8u_jdk by JetBrains.
the class D3DSurfaceToGDIWindowSurfaceTransform method register.
static void register() {
Blit blitIntArgbPreToSurface = new D3DSwToSurfaceBlit(SurfaceType.IntArgbPre, D3DSurfaceData.ST_INT_ARGB_PRE);
Blit blitIntArgbPreToTexture = new D3DSwToTextureBlit(SurfaceType.IntArgbPre, D3DSurfaceData.ST_INT_ARGB_PRE);
TransformBlit transformBlitIntArgbPreToSurface = new D3DSwToSurfaceTransform(SurfaceType.IntArgbPre, D3DSurfaceData.ST_INT_ARGB_PRE);
GraphicsPrimitive[] primitives = { // prevent D3DSurface -> Screen blits
new D3DSurfaceToGDIWindowSurfaceBlit(), new D3DSurfaceToGDIWindowSurfaceScale(), new D3DSurfaceToGDIWindowSurfaceTransform(), // surface->surface ops
new D3DSurfaceToSurfaceBlit(), new D3DSurfaceToSurfaceScale(), new D3DSurfaceToSurfaceTransform(), // render-to-texture surface->surface ops
new D3DRTTSurfaceToSurfaceBlit(), new D3DRTTSurfaceToSurfaceScale(), new D3DRTTSurfaceToSurfaceTransform(), // surface->sw ops
new D3DSurfaceToSwBlit(SurfaceType.IntArgb, D3DSurfaceData.ST_INT_ARGB), // sw->surface ops
blitIntArgbPreToSurface, new D3DSwToSurfaceBlit(SurfaceType.IntArgb, D3DSurfaceData.ST_INT_ARGB), new D3DSwToSurfaceBlit(SurfaceType.IntRgb, D3DSurfaceData.ST_INT_RGB), new D3DSwToSurfaceBlit(SurfaceType.IntBgr, D3DSurfaceData.ST_INT_BGR), new D3DSwToSurfaceBlit(SurfaceType.ThreeByteBgr, D3DSurfaceData.ST_3BYTE_BGR), new D3DSwToSurfaceBlit(SurfaceType.Ushort565Rgb, D3DSurfaceData.ST_USHORT_565_RGB), new D3DSwToSurfaceBlit(SurfaceType.Ushort555Rgb, D3DSurfaceData.ST_USHORT_555_RGB), new D3DSwToSurfaceBlit(SurfaceType.ByteIndexed, D3DSurfaceData.ST_BYTE_INDEXED), // D3DSurfaceData.ST_BYTE_INDEXED_BM),
new D3DGeneralBlit(D3DSurfaceData.D3DSurface, CompositeType.AnyAlpha, blitIntArgbPreToSurface), new D3DSwToSurfaceScale(SurfaceType.IntArgb, D3DSurfaceData.ST_INT_ARGB), new D3DSwToSurfaceScale(SurfaceType.IntArgbPre, D3DSurfaceData.ST_INT_ARGB_PRE), new D3DSwToSurfaceScale(SurfaceType.IntRgb, D3DSurfaceData.ST_INT_RGB), new D3DSwToSurfaceScale(SurfaceType.IntBgr, D3DSurfaceData.ST_INT_BGR), new D3DSwToSurfaceScale(SurfaceType.ThreeByteBgr, D3DSurfaceData.ST_3BYTE_BGR), new D3DSwToSurfaceScale(SurfaceType.Ushort565Rgb, D3DSurfaceData.ST_USHORT_565_RGB), new D3DSwToSurfaceScale(SurfaceType.Ushort555Rgb, D3DSurfaceData.ST_USHORT_555_RGB), new D3DSwToSurfaceScale(SurfaceType.ByteIndexed, D3DSurfaceData.ST_BYTE_INDEXED), new D3DSwToSurfaceTransform(SurfaceType.IntArgb, D3DSurfaceData.ST_INT_ARGB), new D3DSwToSurfaceTransform(SurfaceType.IntRgb, D3DSurfaceData.ST_INT_RGB), new D3DSwToSurfaceTransform(SurfaceType.IntBgr, D3DSurfaceData.ST_INT_BGR), new D3DSwToSurfaceTransform(SurfaceType.ThreeByteBgr, D3DSurfaceData.ST_3BYTE_BGR), new D3DSwToSurfaceTransform(SurfaceType.Ushort565Rgb, D3DSurfaceData.ST_USHORT_565_RGB), new D3DSwToSurfaceTransform(SurfaceType.Ushort555Rgb, D3DSurfaceData.ST_USHORT_555_RGB), new D3DSwToSurfaceTransform(SurfaceType.ByteIndexed, D3DSurfaceData.ST_BYTE_INDEXED), // D3DSurfaceData.ST_BYTE_INDEXED_BM),
transformBlitIntArgbPreToSurface, new D3DGeneralTransformedBlit(transformBlitIntArgbPreToSurface), // texture->surface ops
new D3DTextureToSurfaceBlit(), new D3DTextureToSurfaceScale(), new D3DTextureToSurfaceTransform(), // sw->texture ops
blitIntArgbPreToTexture, new D3DSwToTextureBlit(SurfaceType.IntRgb, D3DSurfaceData.ST_INT_RGB), new D3DSwToTextureBlit(SurfaceType.IntArgb, D3DSurfaceData.ST_INT_ARGB), new D3DSwToTextureBlit(SurfaceType.IntBgr, D3DSurfaceData.ST_INT_BGR), new D3DSwToTextureBlit(SurfaceType.ThreeByteBgr, D3DSurfaceData.ST_3BYTE_BGR), new D3DSwToTextureBlit(SurfaceType.Ushort565Rgb, D3DSurfaceData.ST_USHORT_565_RGB), new D3DSwToTextureBlit(SurfaceType.Ushort555Rgb, D3DSurfaceData.ST_USHORT_555_RGB), new D3DSwToTextureBlit(SurfaceType.ByteIndexed, D3DSurfaceData.ST_BYTE_INDEXED), // D3DSurfaceData.ST_BYTE_INDEXED_BM),
new D3DGeneralBlit(D3DSurfaceData.D3DTexture, CompositeType.SrcNoEa, blitIntArgbPreToTexture) };
GraphicsPrimitiveMgr.register(primitives);
}
Aggregations