From c4b45a0c4dc6fdaaaa61a7e95dcb76f4825b8fbf Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 29 Dec 2010 07:04:01 +0000 Subject: [PATCH] Implement RP_DRAW_BITMAP_RECTS on the client side. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40015 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/remotedesktop/RemoteView.cpp | 31 ++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/apps/remotedesktop/RemoteView.cpp b/src/apps/remotedesktop/RemoteView.cpp index da509875fd..62f6aa30da 100644 --- a/src/apps/remotedesktop/RemoteView.cpp +++ b/src/apps/remotedesktop/RemoteView.cpp @@ -772,6 +772,35 @@ RemoteView::_DrawThread() break; } + case RP_DRAW_BITMAP_RECTS: + { + color_space colorSpace; + int32 rectCount; + uint32 flags, options; + + message.Read(options); + message.Read(colorSpace); + message.Read(flags); + message.Read(rectCount); + for (int32 i = 0; i < rectCount; i++) { + BBitmap *bitmap; + BRect viewRect; + + message.Read(viewRect); + if (message.ReadBitmap(&bitmap, true, colorSpace, + flags) != B_OK || bitmap == NULL) { + continue; + } + + offscreen->DrawBitmap(bitmap, bitmap->Bounds(), viewRect, + options); + invalidRegion.Include(viewRect); + delete bitmap; + } + + break; + } + case RP_STROKE_ARC: case RP_FILL_ARC: case RP_FILL_ARC_GRADIENT: @@ -1229,7 +1258,7 @@ RemoteView::_DrawThread() if (syncDrawing) { offscreen->Sync(); Invalidate(&invalidRegion); - } + } } }