#include "e_mod_main.h"
#include "e_mod_rdp.h"
+#define RDP_DEBUG 0
+
#define E_RDP_WIDTH 1280
#define E_RDP_HEIGHT 720
#define E_RDP_DEVICE_NAME "rdp_input"
cmd.bmp.bitmapDataLength = Stream_GetPosition(context->encode_stream);
cmd.bmp.bitmapData = Stream_Buffer(context->encode_stream);
-
+#if RDP_DEBUG
+ struct timeval start_tv, end_tv;
+ gettimeofday(&start_tv, NULL);
+#endif
update->SurfaceBits(update->context, &cmd);
+#if RDP_DEBUG
+ gettimeofday(&end_tv, NULL);
+ INF("pixman refresh time rfx: %ld ms", ((end_tv.tv_sec * 1000 + end_tv.tv_usec / 1000) - (start_tv.tv_sec * 1000 + start_tv.tv_usec / 1000)));
+#endif
}
cmd.bmp.bitmapDataLength = Stream_GetPosition(context->encode_stream);
cmd.bmp.bitmapData = Stream_Buffer(context->encode_stream);
-
+#if RDP_DEBUG
+ struct timeval start_tv, end_tv;
+ gettimeofday(&start_tv, NULL);
+#endif
update->SurfaceBits(update->context, &cmd);
+#if RDP_DEBUG
+ gettimeofday(&end_tv, NULL);
+ INF("pixman refresh time nsc: %ld ms", ((end_tv.tv_sec * 1000 + end_tv.tv_usec / 1000) - (start_tv.tv_sec * 1000 + start_tv.tv_usec / 1000)));
+#endif
}
static void
subrect.x1 = rect->x1;
subrect.x2 = rect->x2;
+#if RDP_DEBUG
+ struct timeval start_tv, end_tv;
+ gettimeofday(&start_tv, NULL);
+#endif
+
while (remainingHeight)
{
cmd.bmp.height = (remainingHeight > heightIncrement) ? heightIncrement : remainingHeight;
remainingHeight -= cmd.bmp.height;
top += cmd.bmp.height;
}
+#if RDP_DEBUG
+ gettimeofday(&end_tv, NULL);
+ INF("pixman refresh time raw: %ld ms", ((end_tv.tv_sec * 1000 + end_tv.tv_usec / 1000) - (start_tv.tv_sec * 1000 + start_tv.tv_usec / 1000)));
+#endif
}
free(cmd.bmp.bitmapData);
return ECORE_CALLBACK_CANCEL;
}
+#if RDP_DEBUG
+ struct timeval start_tv, end_capture_tv, end_refresh_tv;
+ gettimeofday(&start_tv, NULL);
+#endif
+
tbm_surface = _e_rdp_tbm_image_create(output, output->w, output->h, 0x00000000);
if (tbm_surface == NULL)
{
return ECORE_CALLBACK_RENEW;
}
+#if RDP_DEBUG
+ gettimeofday(&end_capture_tv, NULL);
+ iNF("pixman capture time: %ld ms", ((end_capture_tv.tv_sec * 1000 + end_capture_tv.tv_usec / 1000) - (start_tv.tv_sec * 1000 + start_tv.tv_usec / 1000)));
+#endif
+
/* sends a full refresh */
box.x1 = 0;
box.y1 = 0;
}
pixman_region32_fini(&damage);
+#if RDP_DEBUG
+ gettimeofday(&end_refresh_tv, NULL);
+ INF("pixman refresh time: %ld ms", ((end_refresh_tv.tv_sec * 1000 + end_refresh_tv.tv_usec / 1000) - (end_capture_tv.tv_sec * 1000 + end_capture_tv.tv_usec / 1000)));
+#endif
+
return ECORE_CALLBACK_RENEW;
}