Add way to add a "minimal" bitmap without colorspace/flags for adding multiple
similar bitmaps. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40003 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
645e9fe135
commit
8e164a0fe2
@ -58,13 +58,16 @@ RemoteMessage::NextMessage(uint16& code)
|
||||
|
||||
#ifndef CLIENT_COMPILE
|
||||
void
|
||||
RemoteMessage::AddBitmap(const ServerBitmap& bitmap)
|
||||
RemoteMessage::AddBitmap(const ServerBitmap& bitmap, bool minimal)
|
||||
{
|
||||
Add(bitmap.Width());
|
||||
Add(bitmap.Height());
|
||||
Add(bitmap.BytesPerRow());
|
||||
Add(bitmap.ColorSpace());
|
||||
Add(bitmap.Flags());
|
||||
|
||||
if (!minimal) {
|
||||
Add(bitmap.ColorSpace());
|
||||
Add(bitmap.Flags());
|
||||
}
|
||||
|
||||
uint32 bitsLength = bitmap.BitsLength();
|
||||
Add(bitsLength);
|
||||
@ -279,17 +282,21 @@ RemoteMessage::ReadString(char** _string, size_t& _length)
|
||||
|
||||
|
||||
status_t
|
||||
RemoteMessage::ReadBitmap(BBitmap** _bitmap)
|
||||
RemoteMessage::ReadBitmap(BBitmap** _bitmap, bool minimal,
|
||||
color_space colorSpace, uint32 flags)
|
||||
{
|
||||
color_space colorSpace;
|
||||
uint32 bitsLength, flags;
|
||||
uint32 bitsLength;
|
||||
int32 width, height, bytesPerRow;
|
||||
|
||||
Read(width);
|
||||
Read(height);
|
||||
Read(bytesPerRow);
|
||||
Read(colorSpace);
|
||||
Read(flags);
|
||||
|
||||
if (!minimal) {
|
||||
Read(colorSpace);
|
||||
Read(flags);
|
||||
}
|
||||
|
||||
Read(bitsLength);
|
||||
|
||||
if (bitsLength > fDataLeft)
|
||||
|
@ -60,6 +60,7 @@ enum {
|
||||
RP_COPY_RECT_NO_CLIPPING,
|
||||
RP_INVERT_RECT,
|
||||
RP_DRAW_BITMAP,
|
||||
RP_DRAW_BITMAP_RECTS,
|
||||
|
||||
RP_STROKE_ARC = 80,
|
||||
RP_STROKE_BEZIER,
|
||||
@ -145,7 +146,8 @@ public:
|
||||
void AddGradient(const BGradient& gradient);
|
||||
|
||||
#ifndef CLIENT_COMPILE
|
||||
void AddBitmap(const ServerBitmap& bitmap);
|
||||
void AddBitmap(const ServerBitmap& bitmap,
|
||||
bool minimal = false);
|
||||
void AddFont(const ServerFont& font);
|
||||
void AddPattern(const Pattern& pattern);
|
||||
void AddDrawState(const DrawState& drawState);
|
||||
@ -168,7 +170,10 @@ public:
|
||||
// sets viewstate and returns pattern
|
||||
|
||||
status_t ReadString(char** _string, size_t& length);
|
||||
status_t ReadBitmap(BBitmap** _bitmap);
|
||||
status_t ReadBitmap(BBitmap** _bitmap,
|
||||
bool minimal = false,
|
||||
color_space colorSpace = B_RGB32,
|
||||
uint32 flags = 0);
|
||||
status_t ReadGradient(BGradient** _gradient);
|
||||
status_t ReadArrayLine(BPoint& startPoint,
|
||||
BPoint& endPoint, rgb_color& color);
|
||||
|
Loading…
x
Reference in New Issue
Block a user