diff --git a/headers/os/interface/GraphicsDefs.h b/headers/os/interface/GraphicsDefs.h index b07053ce78..70b316548f 100644 --- a/headers/os/interface/GraphicsDefs.h +++ b/headers/os/interface/GraphicsDefs.h @@ -1,52 +1,19 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: GraphicsDefs.h -// Author: Frans van Nispen -// Description: BMessageFilter class creates objects that filter -// in-coming BMessages. -//------------------------------------------------------------------------------ - +/* + * Copyright 2008, Haiku Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _GRAPHICS_DEFS_H #define _GRAPHICS_DEFS_H -// Standard Includes ----------------------------------------------------------- -// System Includes ------------------------------------------------------------- #include #include -// Project Includes ------------------------------------------------------------ -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - - -//------------------------------------------------------------------------------ +// Pattern typedef struct pattern { - uint8 data[8]; + uint8 data[8]; } pattern; #ifdef __cplusplus @@ -69,7 +36,8 @@ extern const pattern B_SOLID_HIGH; extern const pattern B_MIXED_COLORS; extern const pattern B_SOLID_LOW; -//------------------------------------------------------------------------------ + +// rgb_color typedef struct rgb_color { uint8 red; @@ -119,8 +87,6 @@ make_color(uint8 red, uint8 green, uint8 blue, uint8 alpha = 255) } #endif -//------------------------------------------------------------------------------ - extern const rgb_color B_TRANSPARENT_COLOR; extern const uint8 B_TRANSPARENT_MAGIC_CMAP8; extern const uint16 B_TRANSPARENT_MAGIC_RGBA15; @@ -131,7 +97,8 @@ extern const uint32 B_TRANSPARENT_MAGIC_RGBA32_BIG; extern const uint8 B_TRANSPARENT_8_BIT; extern const rgb_color B_TRANSPARENT_32_BIT; -//------------------------------------------------------------------------------ + +// color map typedef struct color_map { int32 id; @@ -140,6 +107,9 @@ typedef struct color_map { uint8 index_map[32768]; } color_map; + +// overlay + typedef struct overlay_rect_limits { uint16 horizontal_alignment; uint16 vertical_alignment; @@ -162,133 +132,128 @@ typedef struct overlay_restrictions { uint32 reserved[8]; } overlay_restrictions; -//------------------------------------------------------------------------------ + +// screen ID struct screen_id { int32 id; }; extern const struct screen_id B_MAIN_SCREEN_ID; -//------------------------------------------------------------------------------ -typedef enum -{ - B_NO_COLOR_SPACE = 0x0000, //* byte in memory order, high bit first - - // linear color space (little endian is the default) - B_RGB32 = 0x0008, //* B[7:0] G[7:0] R[7:0] -[7:0] - B_RGBA32 = 0x2008, // B[7:0] G[7:0] R[7:0] A[7:0] - B_RGB24 = 0x0003, // B[7:0] G[7:0] R[7:0] - B_RGB16 = 0x0005, // G[2:0],B[4:0] R[4:0],G[5:3] - B_RGB15 = 0x0010, // G[2:0],B[4:0] -[0],R[4:0],G[4:3] - B_RGBA15 = 0x2010, // G[2:0],B[4:0] A[0],R[4:0],G[4:3] - B_CMAP8 = 0x0004, // D[7:0] - B_GRAY8 = 0x0002, // Y[7:0] - B_GRAY1 = 0x0001, // Y0[0],Y1[0],Y2[0],Y3[0],Y4[0],Y5[0],Y6[0],Y7[0] +// color spaces - // big endian version, when the encoding is not endianess independant - B_RGB32_BIG = 0x1008, // -[7:0] R[7:0] G[7:0] B[7:0] - B_RGBA32_BIG = 0x3008, // A[7:0] R[7:0] G[7:0] B[7:0] - B_RGB24_BIG = 0x1003, // R[7:0] G[7:0] B[7:0] - B_RGB16_BIG = 0x1005, // R[4:0],G[5:3] G[2:0],B[4:0] - B_RGB15_BIG = 0x1010, // -[0],R[4:0],G[4:3] G[2:0],B[4:0] - B_RGBA15_BIG = 0x3010, // A[0],R[4:0],G[4:3] G[2:0],B[4:0] +typedef enum { + B_NO_COLOR_SPACE = 0x0000, - // little-endian declarations, for completness - B_RGB32_LITTLE = B_RGB32, - B_RGBA32_LITTLE = B_RGBA32, - B_RGB24_LITTLE = B_RGB24, - B_RGB16_LITTLE = B_RGB16, - B_RGB15_LITTLE = B_RGB15, - B_RGBA15_LITTLE = B_RGBA15, + // linear color space (little endian) + B_RGB32 = 0x0008, // BGR- + B_RGBA32 = 0x2008, // BGRA + B_RGB24 = 0x0003, // BGR + B_RGB16 = 0x0005, + B_RGB15 = 0x0010, + B_RGBA15 = 0x2010, + B_CMAP8 = 0x0004, + B_GRAY8 = 0x0002, + B_GRAY1 = 0x0001, - // non linear color space -- note that these are here for exchange purposes; - // a BBitmap or BView may not necessarily support all these color spaces. + // big endian version + B_RGB32_BIG = 0x1008, // -RGB + B_RGBA32_BIG = 0x3008, // ARGB + B_RGB24_BIG = 0x1003, // RGB + B_RGB16_BIG = 0x1005, + B_RGB15_BIG = 0x1010, + B_RGBA15_BIG = 0x3010, - // Loss/Saturation points are Y 16-235 (absoulte); Cb/Cr 16-240 (center 128) + // explicit little-endian for completeness + B_RGB32_LITTLE = B_RGB32, + B_RGBA32_LITTLE = B_RGBA32, + B_RGB24_LITTLE = B_RGB24, + B_RGB16_LITTLE = B_RGB16, + B_RGB15_LITTLE = B_RGB15, + B_RGBA15_LITTLE = B_RGBA15, - B_YCbCr422 = 0x4000, // Y0[7:0] Cb0[7:0] Y1[7:0] Cr0[7:0] Y2[7:0]... - // Cb2[7:0] Y3[7:0] Cr2[7:0] - B_YCbCr411 = 0x4001, // Cb0[7:0] Y0[7:0] Cr0[7:0] Y1[7:0] Cb4[7:0]... - // Y2[7:0] Cr4[7:0] Y3[7:0] Y4[7:0] Y5[7:0]... - // Y6[7:0] Y7[7:0] - B_YCbCr444 = 0x4003, // Y0[7:0] Cb0[7:0] Cr0[7:0] - B_YCbCr420 = 0x4004, // Non-interlaced only, Cb0 Y0 Y1 Cb2 Y2 Y3 - // on even scan lines, Cr0 Y0 Y1 Cr2 Y2 Y3 - // on odd scan lines + // non linear color space -- incidently, all with 8 bits per value + // Note, BBitmap and BView do not support all of these! - // Extrema points are - // Y 0 - 207 (absolute) - // U -91 - 91 (offset 128) - // V -127 - 127 (offset 128) - // note that YUV byte order is different from YCbCr - // USE YCbCr, not YUV, when that's what you mean! - B_YUV422 = 0x4020, // U0[7:0] Y0[7:0] V0[7:0] Y1[7:0] ... - // U2[7:0] Y2[7:0] V2[7:0] Y3[7:0] - B_YUV411 = 0x4021, // U0[7:0] Y0[7:0] Y1[7:0] V0[7:0] Y2[7:0] Y3[7:0] - // U4[7:0] Y4[7:0] Y5[7:0] V4[7:0] Y6[7:0] Y7[7:0] - B_YUV444 = 0x4023, // U0[7:0] Y0[7:0] V0[7:0] U1[7:0] Y1[7:0] V1[7:0] - B_YUV420 = 0x4024, // Non-interlaced only, U0 Y0 Y1 U2 Y2 Y3 - // on even scan lines, V0 Y0 Y1 V2 Y2 Y3 - // on odd scan lines - B_YUV9 = 0x402C, // planar? 410? - B_YUV12 = 0x402D, // planar? 420? + // loss/saturation points are Y 16-235 (absolute), Cb/Cr 16-240 (center 128) - B_UVL24 = 0x4030, // U0[7:0] V0[7:0] L0[7:0] ... - B_UVL32 = 0x4031, // U0[7:0] V0[7:0] L0[7:0] X0[7:0]... - B_UVLA32 = 0x6031, // U0[7:0] V0[7:0] L0[7:0] A0[7:0]... + B_YCbCr422 = 0x4000, // Y0 Cb0 Y1 Cr0 Y2... + // Cb2 Y3 Cr2... + B_YCbCr411 = 0x4001, // Cb0 Y0 Cr0 Y1 Cb4... + // Y2 Cr4 Y3 Y4 Y5... + // Y6 Y7... + B_YCbCr444 = 0x4003, // Y Cb Cr + B_YCbCr420 = 0x4004, // Non-interlaced only + // on even scan lines: Cb0 Y0 Y1 Cb2 Y2 Y3 + // on odd scan lines: Cr0 Y0 Y1 Cr2 Y2 Y3 - B_LAB24 = 0x4032, // L0[7:0] a0[7:0] b0[7:0] ... (a is not alpha!) - B_LAB32 = 0x4033, // L0[7:0] a0[7:0] b0[7:0] X0[7:0] ... (b is not alpha!) - B_LABA32 = 0x6033, // L0[7:0] a0[7:0] b0[7:0] A0[7:0] ... (A is alpha) + // Extrema points are: + // Y 0 - 207 (absolute) + // U -91 - 91 (offset 128) + // V -127 - 127 (offset 128) - // red is at hue = 0 + // Note that YUV byte order is different from YCbCr; use YCbCr, not YUV, + // when that's what you mean! + B_YUV422 = 0x4020, // U0 Y0 V0 Y1... + // U2 Y2 V2 Y3... + B_YUV411 = 0x4021, // U0 Y0 Y1 V0 Y2 Y3... + // U4 Y4 Y5 V4 Y6 Y7... + B_YUV444 = 0x4023, // U0 Y0 V0 U1 Y1 V1 + B_YUV420 = 0x4024, // Non-interlaced only + // on even scan lines: U0 Y0 Y1 U2 Y2 Y3 + // on odd scan lines: V0 Y0 Y1 V2 Y2 Y3 + B_YUV9 = 0x402C, + B_YUV12 = 0x402D, - B_HSI24 = 0x4040, // H[7:0] S[7:0] I[7:0] - B_HSI32 = 0x4041, // H[7:0] S[7:0] I[7:0] X[7:0] - B_HSIA32 = 0x6041, // H[7:0] S[7:0] I[7:0] A[7:0] + B_UVL24 = 0x4030, // UVL + B_UVL32 = 0x4031, // UVL- + B_UVLA32 = 0x6031, // UVLA - B_HSV24 = 0x4042, // H[7:0] S[7:0] V[7:0] - B_HSV32 = 0x4043, // H[7:0] S[7:0] V[7:0] X[7:0] - B_HSVA32 = 0x6043, // H[7:0] S[7:0] V[7:0] A[7:0] + // L lightness, a/b color-opponent dimensions + B_LAB24 = 0x4032, // Lab + B_LAB32 = 0x4033, // Lab- + B_LABA32 = 0x6033, // LabA - B_HLS24 = 0x4044, // H[7:0] L[7:0] S[7:0] - B_HLS32 = 0x4045, // H[7:0] L[7:0] S[7:0] X[7:0] - B_HLSA32 = 0x6045, // H[7:0] L[7:0] S[7:0] A[7:0] + // Red is at hue 0 + B_HSI24 = 0x4040, // HSI + B_HSI32 = 0x4041, // HSI- + B_HSIA32 = 0x6041, // HSIA - B_CMY24 = 0xC001, // C[7:0] M[7:0] Y[7:0] No gray removal done - B_CMY32 = 0xC002, // C[7:0] M[7:0] Y[7:0] X[7:0] No gray removal done - B_CMYA32 = 0xE002, // C[7:0] M[7:0] Y[7:0] A[7:0] No gray removal done - B_CMYK32 = 0xC003, // C[7:0] M[7:0] Y[7:0] K[7:0] + B_HSV24 = 0x4042, // HSV + B_HSV32 = 0x4043, // HSV- + B_HSVA32 = 0x6043, // HSVA + + B_HLS24 = 0x4044, // HLS + B_HLS32 = 0x4045, // HLS- + B_HLSA32 = 0x6045, // HLSA + + B_CMY24 = 0xC001, // CMY + B_CMY32 = 0xC002, // CMY- + B_CMYA32 = 0xE002, // CMYA + B_CMYK32 = 0xC003, // CMYK // compatibility declarations - B_MONOCHROME_1_BIT = B_GRAY1, - B_GRAYSCALE_8_BIT = B_GRAY8, - B_COLOR_8_BIT = B_CMAP8, - B_RGB_32_BIT = B_RGB32, - B_RGB_16_BIT = B_RGB15, - B_BIG_RGB_32_BIT = B_RGB32_BIG, - B_BIG_RGB_16_BIT = B_RGB15_BIG + B_MONOCHROME_1_BIT = B_GRAY1, + B_GRAYSCALE_8_BIT = B_GRAY8, + B_COLOR_8_BIT = B_CMAP8, + B_RGB_32_BIT = B_RGB32, + B_RGB_16_BIT = B_RGB15, + B_BIG_RGB_32_BIT = B_RGB32_BIG, + B_BIG_RGB_16_BIT = B_RGB15_BIG } color_space; -// Find out whether a specific color space is supported by BBitmaps. -// Support_flags will be set to what kinds of support are available. -// If support_flags is set to 0, false will be returned. -enum { - B_VIEWS_SUPPORT_DRAW_BITMAP = 0x1, - B_BITMAPS_SUPPORT_ATTACHED_VIEWS = 0x2 -}; -bool bitmaps_support_space(color_space space, uint32 * support_flags); +// Bitmap Support Flags -//------------------------------------------------------------------------------ -// "pixel_chunk" is the native increment from one pixel starting on an integral byte -// to the next. "row_alignment" is the native alignment for pixel scanline starts. -// "pixels_per_chunk" is the number of pixels in a pixel_chunk. For instance, B_GRAY1 -// sets pixel_chunk to 1, row_alignment to 4 and pixels_per_chunk to 8, whereas -// B_RGB24 sets pixel_chunk to 3, row_alignment to 4 and pixels_per_chunk to 1. -//------------------------------------------------------------------------------ -status_t get_pixel_size_for(color_space space, size_t * pixel_chunk, - size_t * row_alignment, size_t * pixels_per_chunk); +enum { + B_VIEWS_SUPPORT_DRAW_BITMAP = 0x1, + B_BITMAPS_SUPPORT_ATTACHED_VIEWS = 0x2, + B_BITMAPS_SUPPORT_OVERLAY = 0x4, +}; +bool bitmaps_support_space(color_space space, uint32* _supportFlags); + +status_t get_pixel_size_for(color_space space, size_t* _pixelChunk, + size_t* _rowAlignment, size_t* _pixelsPerChunk); enum buffer_orientation { @@ -299,8 +264,9 @@ enum buffer_orientation { enum buffer_layout { B_BUFFER_NONINTERLEAVED = 1 }; + -//------------------------------------------------------------------------------ +// Drawing Modes enum drawing_mode { B_OP_COPY, @@ -317,52 +283,45 @@ enum drawing_mode { }; enum source_alpha { - B_PIXEL_ALPHA=0, + B_PIXEL_ALPHA = 0, B_CONSTANT_ALPHA }; enum alpha_function { - B_ALPHA_OVERLAY=0, + B_ALPHA_OVERLAY = 0, B_ALPHA_COMPOSITE }; + +// Fixed Screen Modes + enum { - B_8_BIT_640x480 = 0x00000001, - B_8_BIT_800x600 = 0x00000002, - B_8_BIT_1024x768 = 0x00000004, - B_8_BIT_1280x1024 = 0x00000008, - B_8_BIT_1600x1200 = 0x00000010, - B_16_BIT_640x480 = 0x00000020, - B_16_BIT_800x600 = 0x00000040, - B_16_BIT_1024x768 = 0x00000080, - B_16_BIT_1280x1024 = 0x00000100, - B_16_BIT_1600x1200 = 0x00000200, - B_32_BIT_640x480 = 0x00000400, - B_32_BIT_800x600 = 0x00000800, - B_32_BIT_1024x768 = 0x00001000, - B_32_BIT_1280x1024 = 0x00002000, - B_32_BIT_1600x1200 = 0x00004000, - B_8_BIT_1152x900 = 0x00008000, - B_16_BIT_1152x900 = 0x00010000, - B_32_BIT_1152x900 = 0x00020000, - B_15_BIT_640x480 = 0x00040000, - B_15_BIT_800x600 = 0x00080000, - B_15_BIT_1024x768 = 0x00100000, - B_15_BIT_1280x1024 = 0x00200000, - B_15_BIT_1600x1200 = 0x00400000, - B_15_BIT_1152x900 = 0x00800000, + B_8_BIT_640x480 = 0x00000001, + B_8_BIT_800x600 = 0x00000002, + B_8_BIT_1024x768 = 0x00000004, + B_8_BIT_1280x1024 = 0x00000008, + B_8_BIT_1600x1200 = 0x00000010, + B_16_BIT_640x480 = 0x00000020, + B_16_BIT_800x600 = 0x00000040, + B_16_BIT_1024x768 = 0x00000080, + B_16_BIT_1280x1024 = 0x00000100, + B_16_BIT_1600x1200 = 0x00000200, + B_32_BIT_640x480 = 0x00000400, + B_32_BIT_800x600 = 0x00000800, + B_32_BIT_1024x768 = 0x00001000, + B_32_BIT_1280x1024 = 0x00002000, + B_32_BIT_1600x1200 = 0x00004000, + B_8_BIT_1152x900 = 0x00008000, + B_16_BIT_1152x900 = 0x00010000, + B_32_BIT_1152x900 = 0x00020000, + B_15_BIT_640x480 = 0x00040000, + B_15_BIT_800x600 = 0x00080000, + B_15_BIT_1024x768 = 0x00100000, + B_15_BIT_1280x1024 = 0x00200000, + B_15_BIT_1600x1200 = 0x00400000, + B_15_BIT_1152x900 = 0x00800000, - // do not use B_FAKE_DEVICE--it will go away! - B_FAKE_DEVICE = 0x40000000, - B_8_BIT_640x400 = (int)0x80000000 + B_8_BIT_640x400 = 0x80000000 }; -#endif // _GRAPHICSDEFS_H - -/* - * $Log $ - * - * $Id $ - * - */ - +#endif // _GRAPHICS_DEFS_H diff --git a/src/kits/interface/GraphicsDefs.cpp b/src/kits/interface/GraphicsDefs.cpp index 6886a33900..9be9186b70 100644 --- a/src/kits/interface/GraphicsDefs.cpp +++ b/src/kits/interface/GraphicsDefs.cpp @@ -1,34 +1,21 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2004, Haiku -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: GraphicsDefs.cpp -// Author: DarkWyrm -// Caz -// Axel Dörfler -// Description: Graphics functions and variables for the Interface Kit -// -//------------------------------------------------------------------------------ +/* + * Copyright 2001-2008, Haiku. + * Distributed under the terms of the MIT License. + * + * Authors: + * DarkWyrm + * Caz + * Axel Dörfler, axeld@pinc-software.de + */ + +//! Graphics functions and variables for the Interface Kit #include +#include +#include + + // patterns const pattern B_SOLID_HIGH = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}; const pattern B_MIXED_COLORS = {{0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55}}; @@ -50,7 +37,8 @@ const struct screen_id B_MAIN_SCREEN_ID = {0}; status_t -get_pixel_size_for(color_space space, size_t *pixelChunk, size_t *rowAlignment, size_t *pixelsPerChunk) +get_pixel_size_for(color_space space, size_t *pixelChunk, size_t *rowAlignment, + size_t *pixelsPerChunk) { status_t status = B_OK; int32 bytesPerPixel = 0; @@ -152,12 +140,22 @@ bitmaps_support_space(color_space space, uint32 *supportFlags) case B_RGB16: case B_RGB15: case B_RGBA15: case B_RGB16_BIG: case B_RGB15_BIG: case B_RGBA15_BIG: case B_CMAP8: case B_GRAY8: case B_GRAY1: - if (supportFlags) { - *supportFlags = 0; - *supportFlags |= B_VIEWS_SUPPORT_DRAW_BITMAP; - *supportFlags |= B_BITMAPS_SUPPORT_ATTACHED_VIEWS; + if (supportFlags != NULL) { + *supportFlags = B_VIEWS_SUPPORT_DRAW_BITMAP + | B_BITMAPS_SUPPORT_ATTACHED_VIEWS; + + BPrivate::AppServerLink link; + link.StartMessage(AS_GET_BITMAP_SUPPORT_FLAGS); + + int32 code; + if (link.FlushWithReply(code) == B_OK && code == B_OK) { + uint32 flags = 0; + if (link.Read(&flags) == B_OK) + *supportFlags |= flags; + } } break; + // supported, but cannot draw case B_YCbCr422: case B_YCbCr411: case B_YCbCr444: case B_YCbCr420: case B_YUV422: case B_YUV411: case B_YUV444: case B_YUV420: diff --git a/src/servers/app/ServerApp.cpp b/src/servers/app/ServerApp.cpp index 31589d700b..274e2962ca 100644 --- a/src/servers/app/ServerApp.cpp +++ b/src/servers/app/ServerApp.cpp @@ -682,6 +682,21 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link) fLink.Flush(); break; } + case AS_GET_BITMAP_SUPPORT_FLAGS: + { + uint32 colorSpace; + if (link.Read(&colorSpace) != B_OK) + break; + + bool overlay = fDesktop->HWInterface()->CheckOverlayRestrictions( + 64, 64, (color_space)colorSpace); + uint32 flags = overlay ? B_BITMAPS_SUPPORT_OVERLAY : 0; + + fLink.StartMessage(B_OK); + fLink.Attach(flags); + fLink.Flush(); + break; + } case AS_CREATE_PICTURE: {