| directfb.h | | directfb.h | |
| | | | |
| skipping to change at line 771 | | skipping to change at line 771 | |
| DSDRAW_DEMULTIPLY = 0x00000010, /* divides the color by the al
pha before writing the | | DSDRAW_DEMULTIPLY = 0x00000010, /* divides the color by the al
pha before writing the | |
| data to the destination */ | | data to the destination */ | |
| DSDRAW_XOR = 0x00000020 /* bitwise xor the destination
pixels with the | | DSDRAW_XOR = 0x00000020 /* bitwise xor the destination
pixels with the | |
| specified color after premu
ltiplication */ | | specified color after premu
ltiplication */ | |
| } DFBSurfaceDrawingFlags; | | } DFBSurfaceDrawingFlags; | |
| | | | |
| /* | | /* | |
| * Flags controlling blitting commands. | | * Flags controlling blitting commands. | |
| */ | | */ | |
| typedef enum { | | typedef enum { | |
|
| DSBLIT_NOFX = 0x00000000, /* uses none of the effects */ | | DSBLIT_NOFX = 0x00000000, /* uses none of the effect | |
| DSBLIT_BLEND_ALPHACHANNEL = 0x00000001, /* enables blending and uses | | s */ | |
| alphachannel from source */ | | DSBLIT_BLEND_ALPHACHANNEL = 0x00000001, /* enables blending and us | |
| DSBLIT_BLEND_COLORALPHA = 0x00000002, /* enables blending and uses | | es | |
| alpha value from color */ | | alphachannel from sourc | |
| DSBLIT_COLORIZE = 0x00000004, /* modulates source color with | | e */ | |
| the color's r/g/b values */ | | DSBLIT_BLEND_COLORALPHA = 0x00000002, /* enables blending and us | |
| DSBLIT_SRC_COLORKEY = 0x00000008, /* don't blit pixels matching | | es | |
| the source color key */ | | alpha value from color | |
| DSBLIT_DST_COLORKEY = 0x00000010, /* write to destination only i | | */ | |
| f the destination pixel | | DSBLIT_COLORIZE = 0x00000004, /* modulates source color | |
| matches the destination col | | with | |
| or key */ | | the color's r/g/b value | |
| DSBLIT_SRC_PREMULTIPLY = 0x00000020, /* modulates the source color | | s */ | |
| with the (modulated) | | DSBLIT_SRC_COLORKEY = 0x00000008, /* don't blit pixels match | |
| source alpha */ | | ing the source color key */ | |
| DSBLIT_DST_PREMULTIPLY = 0x00000040, /* modulates the dest. color w | | DSBLIT_DST_COLORKEY = 0x00000010, /* write to destination on | |
| ith the dest. alpha */ | | ly if the destination pixel | |
| DSBLIT_DEMULTIPLY = 0x00000080, /* divides the color by the al | | matches the destination | |
| pha before writing the | | color key */ | |
| data to the destination */ | | DSBLIT_SRC_PREMULTIPLY = 0x00000020, /* modulates the source co | |
| DSBLIT_DEINTERLACE = 0x00000100, /* deinterlaces the source dur | | lor with the (modulated) | |
| ing blitting by reading | | source alpha */ | |
| only one field (every secon | | DSBLIT_DST_PREMULTIPLY = 0x00000040, /* modulates the dest. col | |
| d line of full | | or with the dest. alpha */ | |
| image) scaling it verticall | | DSBLIT_DEMULTIPLY = 0x00000080, /* divides the color by th | |
| y by factor two */ | | e alpha before writing the | |
| DSBLIT_SRC_PREMULTCOLOR = 0x00000200, /* modulates the source color | | data to the destination | |
| with the color alpha */ | | */ | |
| DSBLIT_XOR = 0x00000400, /* bitwise xor the destination | | DSBLIT_DEINTERLACE = 0x00000100, /* deinterlaces the source | |
| pixels with the | | during blitting by reading | |
| source pixels after premult | | only one field (every s | |
| iplication */ | | econd line of full | |
| DSBLIT_INDEX_TRANSLATION = 0x00000800, /* do fast indexed to indexed | | image) scaling it verti | |
| translation, | | cally by factor two */ | |
| this flag is mutual exclusi | | DSBLIT_SRC_PREMULTCOLOR = 0x00000200, /* modulates the source co | |
| ve with all others */ | | lor with the color alpha */ | |
| DSBLIT_ROTATE90 = 0x00002000, /* rotate the image by 90 degr | | DSBLIT_XOR = 0x00000400, /* bitwise xor the destina | |
| ee */ | | tion pixels with the | |
| DSBLIT_ROTATE180 = 0x00001000, /* rotate the image by 180 deg | | source pixels after pre | |
| ree */ | | multiplication */ | |
| DSBLIT_ROTATE270 = 0x00004000, /* rotate the image by 270 deg | | DSBLIT_INDEX_TRANSLATION = 0x00000800, /* do fast indexed to inde | |
| ree */ | | xed translation, | |
| DSBLIT_COLORKEY_PROTECT = 0x00010000, /* make sure written pixels do | | this flag is mutual exc | |
| n't match color key (internal only ATM) */ | | lusive with all others */ | |
| DSBLIT_SRC_MASK_ALPHA = 0x00100000, /* modulate source alpha chann | | DSBLIT_ROTATE90 = 0x00002000, /* rotate the image by 90 | |
| el with alpha channel from source mask, | | degree */ | |
| see also IDirectFBSurface:: | | DSBLIT_ROTATE180 = 0x00001000, /* rotate the image by 180 | |
| SetSourceMask() */ | | degree */ | |
| DSBLIT_SRC_MASK_COLOR = 0x00200000, /* modulate source color chann | | DSBLIT_ROTATE270 = 0x00004000, /* rotate the image by 270 | |
| els with color channels from source mask, | | degree */ | |
| see also IDirectFBSurface:: | | DSBLIT_COLORKEY_PROTECT = 0x00010000, /* make sure written pixel | |
| SetSourceMask() */ | | s don't match color key (internal only ATM) */ | |
| DSBLIT_SOURCE2 = 0x00400000, /* use secondary source instea | | DSBLIT_SRC_COLORKEY_EXTENDED = 0x00020000, /* use extended source col | |
| d of destination for reading */ | | or key */ | |
| DSBLIT_FLIP_HORIZONTAL = 0x01000000, /* flip the image horizontally | | DSBLIT_DST_COLORKEY_EXTENDED = 0x00040000, /* use extended destinatio | |
| */ | | n color key */ | |
| DSBLIT_FLIP_VERTICAL = 0x02000000, /* flip the image vertically * | | DSBLIT_SRC_MASK_ALPHA = 0x00100000, /* modulate source alpha c | |
| / | | hannel with alpha channel from source mask, | |
| DSBLIT_ROP = 0x04000000, /* use rop setting */ | | see also IDirectFBSurfa | |
| | | ce::SetSourceMask() */ | |
| | | DSBLIT_SRC_MASK_COLOR = 0x00200000, /* modulate source color c | |
| | | hannels with color channels from source mask, | |
| | | see also IDirectFBSurfa | |
| | | ce::SetSourceMask() */ | |
| | | DSBLIT_SOURCE2 = 0x00400000, /* use secondary source in | |
| | | stead of destination for reading */ | |
| | | DSBLIT_FLIP_HORIZONTAL = 0x01000000, /* flip the image horizont | |
| | | ally */ | |
| | | DSBLIT_FLIP_VERTICAL = 0x02000000, /* flip the image vertical | |
| | | ly */ | |
| | | DSBLIT_ROP = 0x04000000, /* use rop setting */ | |
| | | DSBLIT_SRC_COLORMATRIX = 0x08000000, /* use source color matrix | |
| | | setting */ | |
| | | DSBLIT_SRC_CONVOLUTION = 0x10000000, /* use source convolution | |
| | | filter */ | |
| } DFBSurfaceBlittingFlags; | | } DFBSurfaceBlittingFlags; | |
| | | | |
| /* | | /* | |
| * Options for drawing and blitting operations. Not mandatory for accelerat
ion. | | * Options for drawing and blitting operations. Not mandatory for accelerat
ion. | |
| */ | | */ | |
| typedef enum { | | typedef enum { | |
| DSRO_NONE = 0x00000000, /* None of these. */ | | DSRO_NONE = 0x00000000, /* None of these. */ | |
| | | | |
| DSRO_SMOOTH_UPSCALE = 0x00000001, /* Use interpolation for upsca
le StretchBlit(). */ | | DSRO_SMOOTH_UPSCALE = 0x00000001, /* Use interpolation for upsca
le StretchBlit(). */ | |
| DSRO_SMOOTH_DOWNSCALE = 0x00000002, /* Use interpolation for downs
cale StretchBlit(). */ | | DSRO_SMOOTH_DOWNSCALE = 0x00000002, /* Use interpolation for downs
cale StretchBlit(). */ | |
| | | | |
| skipping to change at line 837 | | skipping to change at line 841 | |
| typedef enum { | | typedef enum { | |
| DFXL_NONE = 0x00000000, /* None of these. */ | | DFXL_NONE = 0x00000000, /* None of these. */ | |
| | | | |
| DFXL_FILLRECTANGLE = 0x00000001, /* FillRectangle() is accelerated.
*/ | | DFXL_FILLRECTANGLE = 0x00000001, /* FillRectangle() is accelerated.
*/ | |
| DFXL_DRAWRECTANGLE = 0x00000002, /* DrawRectangle() is accelerated.
*/ | | DFXL_DRAWRECTANGLE = 0x00000002, /* DrawRectangle() is accelerated.
*/ | |
| DFXL_DRAWLINE = 0x00000004, /* DrawLine() is accelerated. */ | | DFXL_DRAWLINE = 0x00000004, /* DrawLine() is accelerated. */ | |
| DFXL_FILLTRIANGLE = 0x00000008, /* FillTriangle() is accelerated. *
/ | | DFXL_FILLTRIANGLE = 0x00000008, /* FillTriangle() is accelerated. *
/ | |
| DFXL_FILLTRAPEZOID = 0x00000010, /* FillTrapezoid() is accelerated.
*/ | | DFXL_FILLTRAPEZOID = 0x00000010, /* FillTrapezoid() is accelerated.
*/ | |
| DFXL_FILLQUADRANGLE = 0x00000020, /* FillQuadrangle() is accelerated.
*/ | | DFXL_FILLQUADRANGLE = 0x00000020, /* FillQuadrangle() is accelerated.
*/ | |
| | | | |
|
| | | DFXL_DRAWMONOGLYPH = 0x00001000, /* DrawMonoGlyphs() is accelerated. | |
| | | */ | |
| | | | |
| DFXL_BLIT = 0x00010000, /* Blit() and TileBlit() are accele
rated. */ | | DFXL_BLIT = 0x00010000, /* Blit() and TileBlit() are accele
rated. */ | |
| DFXL_STRETCHBLIT = 0x00020000, /* StretchBlit() is accelerated. */ | | DFXL_STRETCHBLIT = 0x00020000, /* StretchBlit() is accelerated. */ | |
| DFXL_TEXTRIANGLES = 0x00040000, /* TextureTriangles() is accelerate
d. */ | | DFXL_TEXTRIANGLES = 0x00040000, /* TextureTriangles() is accelerate
d. */ | |
| DFXL_BLIT2 = 0x00080000, /* BatchBlit2() is accelerated. */ | | DFXL_BLIT2 = 0x00080000, /* BatchBlit2() is accelerated. */ | |
| | | | |
| DFXL_DRAWSTRING = 0x01000000, /* DrawString() and DrawGlyph() are
accelerated. */ | | DFXL_DRAWSTRING = 0x01000000, /* DrawString() and DrawGlyph() are
accelerated. */ | |
| | | | |
| DFXL_ALL = 0x010F003F, /* All drawing/blitting functions.
*/ | | DFXL_ALL = 0x010F003F, /* All drawing/blitting functions.
*/ | |
|
| DFXL_ALL_DRAW = 0x0000003F, /* All drawing functions. */ | | DFXL_ALL_DRAW = 0x0000103F, /* All drawing functions. */ | |
| DFXL_ALL_BLIT = 0x010F0000, /* All blitting functions. */ | | DFXL_ALL_BLIT = 0x010F0000, /* All blitting functions. */ | |
| } DFBAccelerationMask; | | } DFBAccelerationMask; | |
| | | | |
| #define DFB_MASK_BYTE0 0x000000ff | | #define DFB_MASK_BYTE0 0x000000ff | |
| #define DFB_MASK_BYTE1 0x0000ff00 | | #define DFB_MASK_BYTE1 0x0000ff00 | |
| #define DFB_MASK_BYTE2 0x00ff0000 | | #define DFB_MASK_BYTE2 0x00ff0000 | |
| #define DFB_MASK_BYTE3 0xff000000 | | #define DFB_MASK_BYTE3 0xff000000 | |
| | | | |
| /* | | /* | |
| * @internal | | * @internal | |
| | | | |
| skipping to change at line 1318 | | skipping to change at line 1324 | |
| /* 24 bit VYU 4:4:4 (3 byte, Cr 8@16, Y 8@8, Cb 8@0) */ | | /* 24 bit VYU 4:4:4 (3 byte, Cr 8@16, Y 8@8, Cb 8@0) */ | |
| DSPF_VYU = DFB_SURFACE_PIXELFORMAT( 34, 24, 0, 0, 0, 3, 0, 0, 0,
0, 0 ), | | DSPF_VYU = DFB_SURFACE_PIXELFORMAT( 34, 24, 0, 0, 0, 3, 0, 0, 0,
0, 0 ), | |
| | | | |
| /* 1 bit alpha (1 byte/ 8 pixel, LEAST significant bit used first) */ | | /* 1 bit alpha (1 byte/ 8 pixel, LEAST significant bit used first) */ | |
| DSPF_A1_LSB = DFB_SURFACE_PIXELFORMAT( 35, 0, 1, 1, 1, 0, 7, 0, 0,
0, 0 ), | | DSPF_A1_LSB = DFB_SURFACE_PIXELFORMAT( 35, 0, 1, 1, 1, 0, 7, 0, 0,
0, 0 ), | |
| | | | |
| /* 16 bit YUV (8 bit Y plane followed by 8 bit 2x1 subsampled V/U pl
anes) */ | | /* 16 bit YUV (8 bit Y plane followed by 8 bit 2x1 subsampled V/U pl
anes) */ | |
| DSPF_YV16 = DFB_SURFACE_PIXELFORMAT( 36, 16, 0, 0, 0, 1, 0, 0, 1,
0, 0 ), | | DSPF_YV16 = DFB_SURFACE_PIXELFORMAT( 36, 16, 0, 0, 0, 1, 0, 0, 1,
0, 0 ), | |
| | | | |
| /* 32 bit ABGR (4 byte, alpha 8@24, blue 8@16, green 8@8, red 8@0) */ | | /* 32 bit ABGR (4 byte, alpha 8@24, blue 8@16, green 8@8, red 8@0) */ | |
|
| DSPF_ABGR = DFB_SURFACE_PIXELFORMAT( 37, 24, 8, 1, 0, 4, 0, 0, 0, | | DSPF_ABGR = DFB_SURFACE_PIXELFORMAT( 37, 24, 8, 1, 0, 4, 0, 0, 0, | |
| 0, 0 ) | | 0, 0 ), | |
| | | | |
| | | /* 32 bit RGBAF (4 byte, red 8@24, green 8@16, blue 8@8, alpha 7@1, fl | |
| | | ash 1@0 */ | |
| | | DSPF_RGBAF88871 = DFB_SURFACE_PIXELFORMAT( 38, 24, 7, 1, 0, 4, 0, 0, 0 | |
| | | , 0, 0 ) | |
| | | | |
| } DFBSurfacePixelFormat; | | } DFBSurfacePixelFormat; | |
| | | | |
| /* Number of pixelformats defined */ | | /* Number of pixelformats defined */ | |
|
| #define DFB_NUM_PIXELFORMATS 38 | | #define DFB_NUM_PIXELFORMATS 39 | |
| | | | |
| /* These macros extract information about the pixel format. */ | | /* These macros extract information about the pixel format. */ | |
| #define DFB_PIXELFORMAT_INDEX(fmt) (((fmt) & 0x0000007F) ) | | #define DFB_PIXELFORMAT_INDEX(fmt) (((fmt) & 0x0000007F) ) | |
| | | | |
| #define DFB_COLOR_BITS_PER_PIXEL(fmt) (((fmt) & 0x00000F80) >> 7) | | #define DFB_COLOR_BITS_PER_PIXEL(fmt) (((fmt) & 0x00000F80) >> 7) | |
| | | | |
| #define DFB_ALPHA_BITS_PER_PIXEL(fmt) (((fmt) & 0x0000F000) >> 12) | | #define DFB_ALPHA_BITS_PER_PIXEL(fmt) (((fmt) & 0x0000F000) >> 12) | |
| | | | |
| #define DFB_PIXELFORMAT_HAS_ALPHA(fmt) (((fmt) & 0x00010000) != 0) | | #define DFB_PIXELFORMAT_HAS_ALPHA(fmt) (((fmt) & 0x00010000) != 0) | |
| | | | |
| | | | |
| skipping to change at line 1366 | | skipping to change at line 1375 | |
| ((fmt) == DSPF_RGB332) || \ | | ((fmt) == DSPF_RGB332) || \ | |
| ((fmt) == DSPF_AiRGB) || \ | | ((fmt) == DSPF_AiRGB) || \ | |
| ((fmt) == DSPF_ARGB2554) || \ | | ((fmt) == DSPF_ARGB2554) || \ | |
| ((fmt) == DSPF_ARGB4444) || \ | | ((fmt) == DSPF_ARGB4444) || \ | |
| ((fmt) == DSPF_RGBA4444) || \ | | ((fmt) == DSPF_RGBA4444) || \ | |
| ((fmt) == DSPF_ARGB1666) || \ | | ((fmt) == DSPF_ARGB1666) || \ | |
| ((fmt) == DSPF_ARGB6666) || \ | | ((fmt) == DSPF_ARGB6666) || \ | |
| ((fmt) == DSPF_RGB18) || \ | | ((fmt) == DSPF_RGB18) || \ | |
| ((fmt) == DSPF_RGB444) || \ | | ((fmt) == DSPF_RGB444) || \ | |
| ((fmt) == DSPF_RGB555) || \ | | ((fmt) == DSPF_RGB555) || \ | |
|
| ((fmt) == DSPF_BGR555)) | | ((fmt) == DSPF_BGR555) || \ | |
| | | ((fmt) == DSPF_RGBAF88871)) | |
| | | | |
| #define DFB_COLOR_IS_YUV(fmt) \ | | #define DFB_COLOR_IS_YUV(fmt) \ | |
| (((fmt) == DSPF_YUY2) || \ | | (((fmt) == DSPF_YUY2) || \ | |
| ((fmt) == DSPF_UYVY) || \ | | ((fmt) == DSPF_UYVY) || \ | |
| ((fmt) == DSPF_I420) || \ | | ((fmt) == DSPF_I420) || \ | |
| ((fmt) == DSPF_YV12) || \ | | ((fmt) == DSPF_YV12) || \ | |
| ((fmt) == DSPF_NV12) || \ | | ((fmt) == DSPF_NV12) || \ | |
| ((fmt) == DSPF_NV16) || \ | | ((fmt) == DSPF_NV16) || \ | |
| ((fmt) == DSPF_NV21) || \ | | ((fmt) == DSPF_NV21) || \ | |
| ((fmt) == DSPF_AYUV)) | | ((fmt) == DSPF_AYUV)) | |
| | | | |
| skipping to change at line 3552 | | skipping to change at line 3562 | |
| } DFBSurfaceRopCode; | | } DFBSurfaceRopCode; | |
| | | | |
| /* | | /* | |
| * Available pattern mode | | * Available pattern mode | |
| */ | | */ | |
| typedef enum { | | typedef enum { | |
| DSPM_8_8_MONO = 0, | | DSPM_8_8_MONO = 0, | |
| DSPM_32_32_MONO = 1, | | DSPM_32_32_MONO = 1, | |
| } DFBSurfacePatternMode; | | } DFBSurfacePatternMode; | |
| | | | |
|
| | | /* | |
| | | * Color key polarity | |
| | | */ | |
| | | typedef enum { | |
| | | DCKP_DEFAULT = 0, | |
| | | DCKP_OTHER = 1 | |
| | | } DFBColorKeyPolarity; | |
| | | | |
| | | /* | |
| | | * Extended color key definition | |
| | | */ | |
| | | typedef struct { | |
| | | DFBColorKeyPolarity polarity; | |
| | | DFBColor lower; | |
| | | DFBColor upper; | |
| | | } DFBColorKeyExtended; | |
| | | | |
| | | /* | |
| | | * Attributes for DrawMonoGlyphs | |
| | | */ | |
| | | typedef struct { | |
| | | int width; /* glyph width */ | |
| | | int height; /* glyph height */ | |
| | | int rowbyte; /* glyph rowbyte */ | |
| | | int bitoffset; /* glyph bitoffset */ | |
| | | int fgcolor; /* foreground color */ | |
| | | int bgcolor; /* background color */ | |
| | | int hzoom; /* horizontal zoom factor */ | |
| | | int vzoom; /* vertical zoom factor */ | |
| | | } DFBMonoGlyphAttributes; | |
| | | | |
| | | /* | |
| | | * Convolution filter | |
| | | * | |
| | | * The kernel consists of 3x3 fixed point 16.16 values. | |
| | | * Additionally there are scale and bias, also fixed point 16.16 values. | |
| | | */ | |
| | | typedef struct { | |
| | | s32 kernel[9]; | |
| | | s32 scale; | |
| | | s32 bias; | |
| | | } DFBConvolutionFilter; | |
| | | | |
| /******************** | | /******************** | |
| * IDirectFBSurface * | | * IDirectFBSurface * | |
| ********************/ | | ********************/ | |
| | | | |
| /* | | /* | |
| * <i>No summary yet...</i> | | * <i>No summary yet...</i> | |
| */ | | */ | |
| D_DEFINE_INTERFACE( IDirectFBSurface, | | D_DEFINE_INTERFACE( IDirectFBSurface, | |
| | | | |
| /** Retrieving information **/ | | /** Retrieving information **/ | |
| | | | |
| skipping to change at line 4473 | | skipping to change at line 4526 | |
| * pattern_mode: 8*8 mono or 32 * 32 mono | | * pattern_mode: 8*8 mono or 32 * 32 mono | |
| */ | | */ | |
| DFBResult (*SetRop) ( | | DFBResult (*SetRop) ( | |
| IDirectFBSurface *thiz, | | IDirectFBSurface *thiz, | |
| DFBSurfaceRopCode rop_code, | | DFBSurfaceRopCode rop_code, | |
| const DFBColor *fg_color, | | const DFBColor *fg_color, | |
| const DFBColor *bg_color, | | const DFBColor *bg_color, | |
| const u32 *pattern, | | const u32 *pattern, | |
| DFBSurfacePatternMode pattern_mode | | DFBSurfacePatternMode pattern_mode | |
| ); | | ); | |
|
| | | | |
| | | /* | |
| | | * Sets extended source color keying. | |
| | | */ | |
| | | DFBResult (*SetSrcColorKeyExtended) ( | |
| | | IDirectFBSurface *thiz, | |
| | | const DFBColorKeyExtended *key_extended | |
| | | ); | |
| | | | |
| | | /* | |
| | | * Sets extended destination color keying. | |
| | | */ | |
| | | DFBResult (*SetDstColorKeyExtended) ( | |
| | | IDirectFBSurface *thiz, | |
| | | const DFBColorKeyExtended *colorkey_extended | |
| | | ); | |
| | | | |
| | | /** Drawing functions **/ | |
| | | | |
| | | /* | |
| | | * Blit monochrome glyph data with attributes. | |
| | | * | |
| | | * This is a very special function with no software implementation yet | |
| | | . | |
| | | */ | |
| | | DFBResult (*DrawMonoGlyphs) ( | |
| | | IDirectFBSurface *thiz, | |
| | | const void *glyph[], | |
| | | const DFBMonoGlyphAttributes *attributes, | |
| | | const DFBPoint *dest_points, | |
| | | unsigned int num | |
| | | ); | |
| | | | |
| | | /** Blitting control **/ | |
| | | | |
| | | /* | |
| | | * Set the source color matrix. | |
| | | * | |
| | | * Enable usage of this matrix by setting DSBLIT_SRC_COLORMATRIX via I | |
| | | DirectFBSurface::SetBlittingFlags(). | |
| | | * | |
| | | * The matrix consists of 4x3 fixed point 16.16 values. | |
| | | * The order in the array is from left to right and from top to bottom | |
| | | . | |
| | | * | |
| | | * All RGB values will be transformed: | |
| | | * | |
| | | * <pre> | |
| | | * R' = R * v0 + G * v1 + B * v2 + v3 | |
| | | * G' = R * v4 + G * v5 + B * v6 + v7 | |
| | | * B' = R * v8 + G * v9 + B * v10 + v11 | |
| | | * </pre> | |
| | | */ | |
| | | DFBResult (*SetSrcColorMatrix) ( | |
| | | IDirectFBSurface *thiz, | |
| | | const s32 *matrix | |
| | | ); | |
| | | | |
| | | /* | |
| | | * Set the source convolution filter. | |
| | | * | |
| | | * Enable usage of this filter by setting DSBLIT_SRC_CONVOLUTION via I | |
| | | DirectFBSurface::SetBlittingFlags(). | |
| | | */ | |
| | | DFBResult (*SetSrcConvolution) ( | |
| | | IDirectFBSurface *thiz, | |
| | | const DFBConvolutionFilter *filter | |
| | | ); | |
| ) | | ) | |
| | | | |
| /******************** | | /******************** | |
| * IDirectFBPalette * | | * IDirectFBPalette * | |
| ********************/ | | ********************/ | |
| | | | |
| /* | | /* | |
| * <i>No summary yet...</i> | | * <i>No summary yet...</i> | |
| */ | | */ | |
| D_DEFINE_INTERFACE( IDirectFBPalette, | | D_DEFINE_INTERFACE( IDirectFBPalette, | |
| | | | |
End of changes. 8 change blocks. |
| 65 lines changed or deleted | | 201 lines changed or added | |
|
| directfb_strings.h | | directfb_strings.h | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 50 | |
| { DSPF_RGB555, "RGB555" }, \ | | { DSPF_RGB555, "RGB555" }, \ | |
| { DSPF_BGR555, "BGR555" }, \ | | { DSPF_BGR555, "BGR555" }, \ | |
| { DSPF_RGBA5551, "RGBA5551" }, \ | | { DSPF_RGBA5551, "RGBA5551" }, \ | |
| { DSPF_YUV444P, "YUV444P" }, \ | | { DSPF_YUV444P, "YUV444P" }, \ | |
| { DSPF_ARGB8565, "ARGB8565" }, \ | | { DSPF_ARGB8565, "ARGB8565" }, \ | |
| { DSPF_AVYU, "AVYU" }, \ | | { DSPF_AVYU, "AVYU" }, \ | |
| { DSPF_VYU, "VYU" }, \ | | { DSPF_VYU, "VYU" }, \ | |
| { DSPF_A1_LSB, "A1_LSB" }, \ | | { DSPF_A1_LSB, "A1_LSB" }, \ | |
| { DSPF_YV16, "YV16" }, \ | | { DSPF_YV16, "YV16" }, \ | |
| { DSPF_ABGR, "ABGR" }, \ | | { DSPF_ABGR, "ABGR" }, \ | |
|
| | | { DSPF_RGBAF88871, "RGBAF88871" }, \ | |
| { DSPF_UNKNOWN, "UNKNOWN" } \ | | { DSPF_UNKNOWN, "UNKNOWN" } \ | |
| }; | | }; | |
| | | | |
| struct DFBColorSpaceName { | | struct DFBColorSpaceName { | |
| DFBSurfaceColorSpace colorspace; | | DFBSurfaceColorSpace colorspace; | |
| const char *name; | | const char *name; | |
| }; | | }; | |
| | | | |
| #define DirectFBColorSpaceNames(Identifier) struct DFBColorSpaceName Identi
fier[] = { \ | | #define DirectFBColorSpaceNames(Identifier) struct DFBColorSpaceName Identi
fier[] = { \ | |
| { DSCS_RGB, "RGB" }, \ | | { DSCS_RGB, "RGB" }, \ | |
| | | | |
| skipping to change at line 117 | | skipping to change at line 118 | |
| { DSBLIT_DST_PREMULTIPLY, "DST_PREMULTIPLY" }, \ | | { DSBLIT_DST_PREMULTIPLY, "DST_PREMULTIPLY" }, \ | |
| { DSBLIT_DEMULTIPLY, "DEMULTIPLY" }, \ | | { DSBLIT_DEMULTIPLY, "DEMULTIPLY" }, \ | |
| { DSBLIT_DEINTERLACE, "DEINTERLACE" }, \ | | { DSBLIT_DEINTERLACE, "DEINTERLACE" }, \ | |
| { DSBLIT_SRC_PREMULTCOLOR, "SRC_PREMULTCOLOR" }, \ | | { DSBLIT_SRC_PREMULTCOLOR, "SRC_PREMULTCOLOR" }, \ | |
| { DSBLIT_XOR, "XOR" }, \ | | { DSBLIT_XOR, "XOR" }, \ | |
| { DSBLIT_INDEX_TRANSLATION, "INDEX_TRANSLATION" }, \ | | { DSBLIT_INDEX_TRANSLATION, "INDEX_TRANSLATION" }, \ | |
| { DSBLIT_ROTATE90, "ROTATE90" }, \ | | { DSBLIT_ROTATE90, "ROTATE90" }, \ | |
| { DSBLIT_ROTATE180, "ROTATE180" }, \ | | { DSBLIT_ROTATE180, "ROTATE180" }, \ | |
| { DSBLIT_ROTATE270, "ROTATE270" }, \ | | { DSBLIT_ROTATE270, "ROTATE270" }, \ | |
| { DSBLIT_COLORKEY_PROTECT, "COLORKEY_PROTECT" }, \ | | { DSBLIT_COLORKEY_PROTECT, "COLORKEY_PROTECT" }, \ | |
|
| | | { DSBLIT_SRC_COLORKEY_EXTENDED, "SRC_COLORKEY_EXTENDED" }, \ | |
| | | { DSBLIT_DST_COLORKEY_EXTENDED, "DST_COLORKEY_EXTENDED" }, \ | |
| { DSBLIT_SRC_MASK_ALPHA, "SRC_MASK_ALPHA" }, \ | | { DSBLIT_SRC_MASK_ALPHA, "SRC_MASK_ALPHA" }, \ | |
| { DSBLIT_SRC_MASK_COLOR, "SRC_MASK_COLOR" }, \ | | { DSBLIT_SRC_MASK_COLOR, "SRC_MASK_COLOR" }, \ | |
| { DSBLIT_SOURCE2, "SOURCE2" }, \ | | { DSBLIT_SOURCE2, "SOURCE2" }, \ | |
| { DSBLIT_FLIP_HORIZONTAL, "FLIP_HORIZONTAL" }, \ | | { DSBLIT_FLIP_HORIZONTAL, "FLIP_HORIZONTAL" }, \ | |
| { DSBLIT_FLIP_VERTICAL, "FLIP_VERTICAL" }, \ | | { DSBLIT_FLIP_VERTICAL, "FLIP_VERTICAL" }, \ | |
| { DSBLIT_ROP, "ROP" }, \ | | { DSBLIT_ROP, "ROP" }, \ | |
|
| | | { DSBLIT_SRC_COLORMATRIX, "SRC_COLORMATRIX" }, \ | |
| | | { DSBLIT_SRC_CONVOLUTION, "SRC_CONVOLUTION" }, \ | |
| { DSBLIT_NOFX, "NOFX" } \ | | { DSBLIT_NOFX, "NOFX" } \ | |
| }; | | }; | |
| | | | |
| struct DFBSurfaceBlendFunctionName { | | struct DFBSurfaceBlendFunctionName { | |
| DFBSurfaceBlendFunction function; | | DFBSurfaceBlendFunction function; | |
| const char *name; | | const char *name; | |
| }; | | }; | |
| | | | |
| #define DirectFBSurfaceBlendFunctionNames(Identifier) struct DFBSurfaceBlen
dFunctionName Identifier[] = { \ | | #define DirectFBSurfaceBlendFunctionNames(Identifier) struct DFBSurfaceBlen
dFunctionName Identifier[] = { \ | |
| { DSBF_ZERO, "ZERO" }, \ | | { DSBF_ZERO, "ZERO" }, \ | |
| | | | |
| skipping to change at line 519 | | skipping to change at line 524 | |
| const char *name; | | const char *name; | |
| }; | | }; | |
| | | | |
| #define DirectFBAccelerationMaskNames(Identifier) struct DFBAccelerationMas
kName Identifier[] = { \ | | #define DirectFBAccelerationMaskNames(Identifier) struct DFBAccelerationMas
kName Identifier[] = { \ | |
| { DFXL_FILLRECTANGLE, "FILLRECTANGLE" }, \ | | { DFXL_FILLRECTANGLE, "FILLRECTANGLE" }, \ | |
| { DFXL_DRAWRECTANGLE, "DRAWRECTANGLE" }, \ | | { DFXL_DRAWRECTANGLE, "DRAWRECTANGLE" }, \ | |
| { DFXL_DRAWLINE, "DRAWLINE" }, \ | | { DFXL_DRAWLINE, "DRAWLINE" }, \ | |
| { DFXL_FILLTRIANGLE, "FILLTRIANGLE" }, \ | | { DFXL_FILLTRIANGLE, "FILLTRIANGLE" }, \ | |
| { DFXL_FILLTRAPEZOID, "FILLTRAPEZOID" }, \ | | { DFXL_FILLTRAPEZOID, "FILLTRAPEZOID" }, \ | |
| { DFXL_FILLQUADRANGLE, "FILLQUADRANGLE" }, \ | | { DFXL_FILLQUADRANGLE, "FILLQUADRANGLE" }, \ | |
|
| | | { DFXL_DRAWMONOGLYPH, "DRAWMONOGLYPH" }, \ | |
| { DFXL_BLIT, "BLIT" }, \ | | { DFXL_BLIT, "BLIT" }, \ | |
| { DFXL_STRETCHBLIT, "STRETCHBLIT" }, \ | | { DFXL_STRETCHBLIT, "STRETCHBLIT" }, \ | |
| { DFXL_TEXTRIANGLES, "TEXTRIANGLES" }, \ | | { DFXL_TEXTRIANGLES, "TEXTRIANGLES" }, \ | |
| { DFXL_BLIT2, "BLIT2" }, \ | | { DFXL_BLIT2, "BLIT2" }, \ | |
| { DFXL_DRAWSTRING, "DRAWSTRING" }, \ | | { DFXL_DRAWSTRING, "DRAWSTRING" }, \ | |
| { DFXL_NONE, "NONE" } \ | | { DFXL_NONE, "NONE" } \ | |
| }; | | }; | |
| | | | |
| struct DFBWaterElementTypeName { | | struct DFBWaterElementTypeName { | |
| WaterElementType type; | | WaterElementType type; | |
| | | | |
End of changes. 4 change blocks. |
| 0 lines changed or deleted | | 6 lines changed or added | |
|
| state.h | | state.h | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 68 | |
| SMF_DST_COLORKEY = 0x00000080, | | SMF_DST_COLORKEY = 0x00000080, | |
| | | | |
| SMF_DESTINATION = 0x00000100, | | SMF_DESTINATION = 0x00000100, | |
| SMF_SOURCE = 0x00000200, | | SMF_SOURCE = 0x00000200, | |
| SMF_SOURCE_MASK = 0x00000400, | | SMF_SOURCE_MASK = 0x00000400, | |
| SMF_SOURCE_MASK_VALS = 0x00000800, | | SMF_SOURCE_MASK_VALS = 0x00000800, | |
| | | | |
| SMF_INDEX_TRANSLATION = 0x00001000, | | SMF_INDEX_TRANSLATION = 0x00001000, | |
| SMF_COLORKEY = 0x00002000, | | SMF_COLORKEY = 0x00002000, | |
| SMF_WRITE_MASK_BITS = 0x00004000, | | SMF_WRITE_MASK_BITS = 0x00004000, | |
|
| | | SMF_SRC_COLORMATRIX = 0x00008000, | |
| | | | |
| SMF_RENDER_OPTIONS = 0x00010000, | | SMF_RENDER_OPTIONS = 0x00010000, | |
| SMF_MATRIX = 0x00020000, | | SMF_MATRIX = 0x00020000, | |
| | | | |
|
| | | SMF_SRC_COLORKEY_EXTENDED = 0x00040000, | |
| | | SMF_DST_COLORKEY_EXTENDED = 0x00080000, | |
| | | | |
| SMF_SOURCE2 = 0x00100000, | | SMF_SOURCE2 = 0x00100000, | |
|
| | | SMF_SRC_CONVOLUTION = 0x00200000, | |
| | | | |
| SMF_ROP_CODE = 0x01000000, | | SMF_ROP_CODE = 0x01000000, | |
| SMF_ROP_FG_COLOR = 0x02000000, | | SMF_ROP_FG_COLOR = 0x02000000, | |
| SMF_ROP_BG_COLOR = 0x04000000, | | SMF_ROP_BG_COLOR = 0x04000000, | |
| SMF_ROP_PATTERN = 0x08000000, | | SMF_ROP_PATTERN = 0x08000000, | |
| | | | |
|
| SMF_ALL = 0x0F137FFF | | SMF_ALL = 0x0F3FFFFF | |
| } StateModificationFlags; | | } StateModificationFlags; | |
| | | | |
| typedef enum { | | typedef enum { | |
| CSF_NONE = 0x00000000, | | CSF_NONE = 0x00000000, | |
| | | | |
| CSF_DESTINATION = 0x00000001, /* destination is set using df
b_state_set_destination() */ | | CSF_DESTINATION = 0x00000001, /* destination is set using df
b_state_set_destination() */ | |
| CSF_SOURCE = 0x00000002, /* source is set using dfb_sta
te_set_source() */ | | CSF_SOURCE = 0x00000002, /* source is set using dfb_sta
te_set_source() */ | |
| CSF_SOURCE_MASK = 0x00000008, /* source mask is set using df
b_state_set_source_mask() */ | | CSF_SOURCE_MASK = 0x00000008, /* source mask is set using df
b_state_set_source_mask() */ | |
| | | | |
| CSF_SOURCE_LOCKED = 0x00000010, /* source surface is locked */ | | CSF_SOURCE_LOCKED = 0x00000010, /* source surface is locked */ | |
| | | | |
| skipping to change at line 191 | | skipping to change at line 196 | |
| DFBColor colors[DFB_COLOR_IDS_MAX]; /* colors
for drawing or modulation */ | | DFBColor colors[DFB_COLOR_IDS_MAX]; /* colors
for drawing or modulation */ | |
| unsigned int color_indices[DFB_COLOR_IDS_MAX]; /* indices
to colors in palette */ | | unsigned int color_indices[DFB_COLOR_IDS_MAX]; /* indices
to colors in palette */ | |
| | | | |
| u64 write_mask_bits; /* write mask bits */ | | u64 write_mask_bits; /* write mask bits */ | |
| | | | |
| DFBSurfaceRopCode rop_code; | | DFBSurfaceRopCode rop_code; | |
| DFBColor rop_fg_color; | | DFBColor rop_fg_color; | |
| DFBColor rop_bg_color; | | DFBColor rop_bg_color; | |
| u32 rop_pattern[32]; | | u32 rop_pattern[32]; | |
| DFBSurfacePatternMode rop_pattern_mode; | | DFBSurfacePatternMode rop_pattern_mode; | |
|
| | | | |
| | | DFBColorKeyExtended src_colorkey_extended; | |
| | | DFBColorKeyExtended dst_colorkey_extended; | |
| | | | |
| | | s32 src_colormatrix[12]; /* transformation ma | |
| | | trix for DSBLIT_SRC_COLORMATRIX (fixed 16.16) */ | |
| | | | |
| | | DFBConvolutionFilter src_convolution; | |
| }; | | }; | |
| | | | |
| int dfb_state_init( CardState *state, CoreDFB *core ); | | int dfb_state_init( CardState *state, CoreDFB *core ); | |
| void dfb_state_destroy( CardState *state ); | | void dfb_state_destroy( CardState *state ); | |
| | | | |
| DFBResult dfb_state_set_destination( CardState *state, CoreSurface *destina
tion ); | | DFBResult dfb_state_set_destination( CardState *state, CoreSurface *destina
tion ); | |
| DFBResult dfb_state_set_source( CardState *state, CoreSurface *source ); | | DFBResult dfb_state_set_source( CardState *state, CoreSurface *source ); | |
| DFBResult dfb_state_set_source_mask( CardState *state, CoreSurface *source_
mask ); | | DFBResult dfb_state_set_source_mask( CardState *state, CoreSurface *source_
mask ); | |
| DFBResult dfb_state_set_source2( CardState *state, CoreSurface *source2 ); | | DFBResult dfb_state_set_source2( CardState *state, CoreSurface *source2 ); | |
| | | | |
| | | | |
| skipping to change at line 214 | | skipping to change at line 226 | |
| const int *indices, | | const int *indices, | |
| int num_indices ); | | int num_indices ); | |
| | | | |
| void dfb_state_set_matrix( CardState *state, | | void dfb_state_set_matrix( CardState *state, | |
| const s32 *matrix ); | | const s32 *matrix ); | |
| | | | |
| void dfb_state_set_rop_pattern( CardState *state, | | void dfb_state_set_rop_pattern( CardState *state, | |
| const u32 *pattern, | | const u32 *pattern, | |
| DFBSurfacePatternMode pattern_mode ); | | DFBSurfacePatternMode pattern_mode ); | |
| | | | |
|
| | | void dfb_state_set_src_colormatrix( CardState *state, | |
| | | const s32 *matrix ); | |
| | | | |
| | | void dfb_state_set_src_convolution( CardState *state, | |
| | | const DFBConvolutionFilter *filter ); | |
| | | | |
| static inline void | | static inline void | |
| dfb_state_get_serial( const CardState *state, CoreGraphicsSerial *ret_seria
l ) | | dfb_state_get_serial( const CardState *state, CoreGraphicsSerial *ret_seria
l ) | |
| { | | { | |
| D_ASSERT( state != NULL ); | | D_ASSERT( state != NULL ); | |
| D_ASSERT( ret_serial != NULL ); | | D_ASSERT( ret_serial != NULL ); | |
| | | | |
| *ret_serial = state->serial; | | *ret_serial = state->serial; | |
| } | | } | |
| | | | |
| static inline void | | static inline void | |
| | | | |
| skipping to change at line 407 | | skipping to change at line 425 | |
| D_FLAGS_ASSERT( flags, DSMF_ALL ); | | D_FLAGS_ASSERT( flags, DSMF_ALL ); | |
| | | | |
| if (! DFB_POINT_EQUAL( state->src_mask_offset, *offset ) || state->src
_mask_flags != flags) { | | if (! DFB_POINT_EQUAL( state->src_mask_offset, *offset ) || state->src
_mask_flags != flags) { | |
| state->src_mask_offset = *offset; | | state->src_mask_offset = *offset; | |
| state->src_mask_flags = flags; | | state->src_mask_flags = flags; | |
| | | | |
| state->modified = (StateModificationFlags)( state->modified | SMF
_SOURCE_MASK_VALS ); | | state->modified = (StateModificationFlags)( state->modified | SMF
_SOURCE_MASK_VALS ); | |
| } | | } | |
| } | | } | |
| | | | |
|
| | | static inline void dfb_state_set_src_colorkey_extended( CardState *state, c | |
| | | onst DFBColorKeyExtended *key ) | |
| | | { | |
| | | D_MAGIC_ASSERT( state, CardState ); | |
| | | D_ASSERT( key != NULL ); | |
| | | | |
| | | if (state->src_colorkey_extended.polarity != key->polarity || | |
| | | ! DFB_COLOR_EQUAL( state->src_colorkey_extended.lower, key->lower | |
| | | ) || | |
| | | ! DFB_COLOR_EQUAL( state->src_colorkey_extended.upper, key->upper | |
| | | )) | |
| | | { | |
| | | state->src_colorkey_extended = *key; | |
| | | state->modified = (StateModificationFlags)( state->m | |
| | | odified | SMF_SRC_COLORKEY_EXTENDED ); | |
| | | } | |
| | | } | |
| | | | |
| | | static inline void dfb_state_set_dst_colorkey_extended( CardState *state, c | |
| | | onst DFBColorKeyExtended *key ) | |
| | | { | |
| | | D_MAGIC_ASSERT( state, CardState ); | |
| | | D_ASSERT( key != NULL ); | |
| | | | |
| | | if (state->dst_colorkey_extended.polarity != key->polarity || | |
| | | ! DFB_COLOR_EQUAL( state->dst_colorkey_extended.lower, key->lower | |
| | | ) || | |
| | | ! DFB_COLOR_EQUAL( state->dst_colorkey_extended.upper, key->upper | |
| | | )) | |
| | | { | |
| | | state->dst_colorkey_extended = *key; | |
| | | state->modified = (StateModificationFlags)( state->m | |
| | | odified | SMF_DST_COLORKEY_EXTENDED ); | |
| | | } | |
| | | } | |
| | | | |
| /* | | /* | |
| * Multifunctional color configuration function. | | * Multifunctional color configuration function. | |
| * | | * | |
| * Always tries to set both color and index. | | * Always tries to set both color and index. | |
| * | | * | |
| * If color index is -1, color is used and searched in palette of destinati
on surface if present. | | * If color index is -1, color is used and searched in palette of destinati
on surface if present. | |
| * If color index is valid the color is looked up in palette if present. | | * If color index is valid the color is looked up in palette if present. | |
| */ | | */ | |
| void dfb_state_set_color_or_index( CardState *state, | | void dfb_state_set_color_or_index( CardState *state, | |
| const DFBColor *color, | | const DFBColor *color, | |
| | | | |
End of changes. 7 change blocks. |
| 1 lines changed or deleted | | 56 lines changed or added | |
|