Search in sources :

Example 1 with GraphicsPrimitive

use of sun.java2d.loops.GraphicsPrimitive in project jdk8u_jdk by JetBrains.

the class OGLAnyCompositeBlit method register.

static void register() {
    Blit blitIntArgbPreToSurface = new OGLSwToSurfaceBlit(SurfaceType.IntArgbPre, OGLSurfaceData.PF_INT_ARGB_PRE);
    Blit blitIntArgbPreToTexture = new OGLSwToTextureBlit(SurfaceType.IntArgbPre, OGLSurfaceData.PF_INT_ARGB_PRE);
    TransformBlit transformBlitIntArgbPreToSurface = new OGLSwToSurfaceTransform(SurfaceType.IntArgbPre, OGLSurfaceData.PF_INT_ARGB_PRE);
    OGLSurfaceToSwBlit blitSurfaceToIntArgbPre = new OGLSurfaceToSwBlit(SurfaceType.IntArgbPre, OGLSurfaceData.PF_INT_ARGB_PRE);
    GraphicsPrimitive[] primitives = { // surface->surface ops
    new OGLSurfaceToSurfaceBlit(), new OGLSurfaceToSurfaceScale(), new OGLSurfaceToSurfaceTransform(), // render-to-texture surface->surface ops
    new OGLRTTSurfaceToSurfaceBlit(), new OGLRTTSurfaceToSurfaceScale(), new OGLRTTSurfaceToSurfaceTransform(), // surface->sw ops
    new OGLSurfaceToSwBlit(SurfaceType.IntArgb, OGLSurfaceData.PF_INT_ARGB), blitSurfaceToIntArgbPre, // sw->surface ops
    blitIntArgbPreToSurface, new OGLSwToSurfaceBlit(SurfaceType.IntRgb, OGLSurfaceData.PF_INT_RGB), new OGLSwToSurfaceBlit(SurfaceType.IntRgbx, OGLSurfaceData.PF_INT_RGBX), new OGLSwToSurfaceBlit(SurfaceType.IntBgr, OGLSurfaceData.PF_INT_BGR), new OGLSwToSurfaceBlit(SurfaceType.IntBgrx, OGLSurfaceData.PF_INT_BGRX), new OGLSwToSurfaceBlit(SurfaceType.ThreeByteBgr, OGLSurfaceData.PF_3BYTE_BGR), new OGLSwToSurfaceBlit(SurfaceType.Ushort565Rgb, OGLSurfaceData.PF_USHORT_565_RGB), new OGLSwToSurfaceBlit(SurfaceType.Ushort555Rgb, OGLSurfaceData.PF_USHORT_555_RGB), new OGLSwToSurfaceBlit(SurfaceType.Ushort555Rgbx, OGLSurfaceData.PF_USHORT_555_RGBX), new OGLSwToSurfaceBlit(SurfaceType.ByteGray, OGLSurfaceData.PF_BYTE_GRAY), new OGLSwToSurfaceBlit(SurfaceType.UshortGray, OGLSurfaceData.PF_USHORT_GRAY), new OGLGeneralBlit(OGLSurfaceData.OpenGLSurface, CompositeType.AnyAlpha, blitIntArgbPreToSurface), new OGLAnyCompositeBlit(OGLSurfaceData.OpenGLSurface, blitSurfaceToIntArgbPre, blitSurfaceToIntArgbPre, blitIntArgbPreToSurface), new OGLAnyCompositeBlit(SurfaceType.Any, null, blitSurfaceToIntArgbPre, blitIntArgbPreToSurface), new OGLSwToSurfaceScale(SurfaceType.IntRgb, OGLSurfaceData.PF_INT_RGB), new OGLSwToSurfaceScale(SurfaceType.IntRgbx, OGLSurfaceData.PF_INT_RGBX), new OGLSwToSurfaceScale(SurfaceType.IntBgr, OGLSurfaceData.PF_INT_BGR), new OGLSwToSurfaceScale(SurfaceType.IntBgrx, OGLSurfaceData.PF_INT_BGRX), new OGLSwToSurfaceScale(SurfaceType.ThreeByteBgr, OGLSurfaceData.PF_3BYTE_BGR), new OGLSwToSurfaceScale(SurfaceType.Ushort565Rgb, OGLSurfaceData.PF_USHORT_565_RGB), new OGLSwToSurfaceScale(SurfaceType.Ushort555Rgb, OGLSurfaceData.PF_USHORT_555_RGB), new OGLSwToSurfaceScale(SurfaceType.Ushort555Rgbx, OGLSurfaceData.PF_USHORT_555_RGBX), new OGLSwToSurfaceScale(SurfaceType.ByteGray, OGLSurfaceData.PF_BYTE_GRAY), new OGLSwToSurfaceScale(SurfaceType.UshortGray, OGLSurfaceData.PF_USHORT_GRAY), new OGLSwToSurfaceScale(SurfaceType.IntArgbPre, OGLSurfaceData.PF_INT_ARGB_PRE), new OGLSwToSurfaceTransform(SurfaceType.IntRgb, OGLSurfaceData.PF_INT_RGB), new OGLSwToSurfaceTransform(SurfaceType.IntRgbx, OGLSurfaceData.PF_INT_RGBX), new OGLSwToSurfaceTransform(SurfaceType.IntBgr, OGLSurfaceData.PF_INT_BGR), new OGLSwToSurfaceTransform(SurfaceType.IntBgrx, OGLSurfaceData.PF_INT_BGRX), new OGLSwToSurfaceTransform(SurfaceType.ThreeByteBgr, OGLSurfaceData.PF_3BYTE_BGR), new OGLSwToSurfaceTransform(SurfaceType.Ushort565Rgb, OGLSurfaceData.PF_USHORT_565_RGB), new OGLSwToSurfaceTransform(SurfaceType.Ushort555Rgb, OGLSurfaceData.PF_USHORT_555_RGB), new OGLSwToSurfaceTransform(SurfaceType.Ushort555Rgbx, OGLSurfaceData.PF_USHORT_555_RGBX), new OGLSwToSurfaceTransform(SurfaceType.ByteGray, OGLSurfaceData.PF_BYTE_GRAY), new OGLSwToSurfaceTransform(SurfaceType.UshortGray, OGLSurfaceData.PF_USHORT_GRAY), transformBlitIntArgbPreToSurface, new OGLGeneralTransformedBlit(transformBlitIntArgbPreToSurface), // texture->surface ops
    new OGLTextureToSurfaceBlit(), new OGLTextureToSurfaceScale(), new OGLTextureToSurfaceTransform(), // sw->texture ops
    blitIntArgbPreToTexture, new OGLSwToTextureBlit(SurfaceType.IntRgb, OGLSurfaceData.PF_INT_RGB), new OGLSwToTextureBlit(SurfaceType.IntRgbx, OGLSurfaceData.PF_INT_RGBX), new OGLSwToTextureBlit(SurfaceType.IntBgr, OGLSurfaceData.PF_INT_BGR), new OGLSwToTextureBlit(SurfaceType.IntBgrx, OGLSurfaceData.PF_INT_BGRX), new OGLSwToTextureBlit(SurfaceType.ThreeByteBgr, OGLSurfaceData.PF_3BYTE_BGR), new OGLSwToTextureBlit(SurfaceType.Ushort565Rgb, OGLSurfaceData.PF_USHORT_565_RGB), new OGLSwToTextureBlit(SurfaceType.Ushort555Rgb, OGLSurfaceData.PF_USHORT_555_RGB), new OGLSwToTextureBlit(SurfaceType.Ushort555Rgbx, OGLSurfaceData.PF_USHORT_555_RGBX), new OGLSwToTextureBlit(SurfaceType.ByteGray, OGLSurfaceData.PF_BYTE_GRAY), new OGLSwToTextureBlit(SurfaceType.UshortGray, OGLSurfaceData.PF_USHORT_GRAY), new OGLGeneralBlit(OGLSurfaceData.OpenGLTexture, CompositeType.SrcNoEa, blitIntArgbPreToTexture) };
    GraphicsPrimitiveMgr.register(primitives);
}
Also used : TransformBlit(sun.java2d.loops.TransformBlit) GraphicsPrimitive(sun.java2d.loops.GraphicsPrimitive) Blit(sun.java2d.loops.Blit) TransformBlit(sun.java2d.loops.TransformBlit) ScaledBlit(sun.java2d.loops.ScaledBlit)

Example 2 with GraphicsPrimitive

use of sun.java2d.loops.GraphicsPrimitive 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);
}
Also used : TransformBlit(sun.java2d.loops.TransformBlit) GraphicsPrimitive(sun.java2d.loops.GraphicsPrimitive) Blit(sun.java2d.loops.Blit) TransformBlit(sun.java2d.loops.TransformBlit) ScaledBlit(sun.java2d.loops.ScaledBlit)

Aggregations

Blit (sun.java2d.loops.Blit)2 GraphicsPrimitive (sun.java2d.loops.GraphicsPrimitive)2 ScaledBlit (sun.java2d.loops.ScaledBlit)2 TransformBlit (sun.java2d.loops.TransformBlit)2