diff --git a/src/servers/app/drawing/remote/RemoteMessage.cpp b/src/servers/app/drawing/remote/RemoteMessage.cpp index ceebf15d6c..1fa3ff44b4 100644 --- a/src/servers/app/drawing/remote/RemoteMessage.cpp +++ b/src/servers/app/drawing/remote/RemoteMessage.cpp @@ -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) diff --git a/src/servers/app/drawing/remote/RemoteMessage.h b/src/servers/app/drawing/remote/RemoteMessage.h index f32e19d85e..91db9f676a 100644 --- a/src/servers/app/drawing/remote/RemoteMessage.h +++ b/src/servers/app/drawing/remote/RemoteMessage.h @@ -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);