[haiku-commits] r40015 - haiku/trunk/src/apps/remotedesktop

Author: mmlr
Date: 2010-12-29 08:04:01 +0100 (Wed, 29 Dec 2010)
New Revision: 40015
Changeset: http://dev.haiku-os.org/changeset/40015

Modified:
   haiku/trunk/src/apps/remotedesktop/RemoteView.cpp
Log:
Implement RP_DRAW_BITMAP_RECTS on the client side.


Modified: haiku/trunk/src/apps/remotedesktop/RemoteView.cpp
===================================================================
--- haiku/trunk/src/apps/remotedesktop/RemoteView.cpp   2010-12-29 07:03:03 UTC 
(rev 40014)
+++ haiku/trunk/src/apps/remotedesktop/RemoteView.cpp   2010-12-29 07:04:01 UTC 
(rev 40015)
@@ -772,6 +772,35 @@
                                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 @@
                if (syncDrawing) {
                        offscreen->Sync();
                        Invalidate(&invalidRegion);
-               }                       
+               }
        }
 }
 


Other related posts:

  • » [haiku-commits] r40015 - haiku/trunk/src/apps/remotedesktop - mmlr