[X2Go-Commits] [x2gokdrive] 01/01: make screen repaint faster.
git-admin at x2go.org
git-admin at x2go.org
Mon Oct 10 19:41:26 CEST 2022
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2gokdrive.
commit 4ac05e5cda49aa669a01361e16ad747d3fa19908
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date: Mon Oct 10 12:41:12 2022 -0500
make screen repaint faster.
---
debian/changelog | 1 +
x2gokdriveremote.c | 13 +++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 997128b..64b8988 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,6 +36,7 @@ x2gokdrive (0.0.0.1-0x2go1) UNRELEASED; urgency=medium
- change from alder32 to crc32 to avoid collisions on small frames.
- automatically decrease the jpeg quality when to many frames in queue.
- update the screen with png frames when no data is transmitted.
+ - make screen repaint faster.
[ Mihai Moldovan ]
* Initial release:
diff --git a/x2gokdriveremote.c b/x2gokdriveremote.c
index bd1f558..0c78073 100644
--- a/x2gokdriveremote.c
+++ b/x2gokdriveremote.c
@@ -1683,7 +1683,8 @@ void *send_frame_thread (void *threadid)
{
enum SelectionType r;
int dirty_region;
- unsigned int ms_to_wait=100;
+//wait 100*1000 microseconds
+ unsigned int ms_to_wait=100*1000;
struct timespec ts;
struct timeval tp;
@@ -1720,7 +1721,7 @@ void *send_frame_thread (void *threadid)
gettimeofday(&tp, NULL);
/* Convert from timeval to timespec */
ts.tv_sec = tp.tv_sec;
- ts.tv_nsec = tp.tv_usec * 1000+ms_to_wait*1000000UL;//wait ms_to_wait miliseconds
+ ts.tv_nsec = tp.tv_usec * 1000+ms_to_wait*1000UL;//wait ms_to_wait microseconds
if(ts.tv_nsec>=1000000000UL)
{
ts.tv_nsec-=1000000000UL;
@@ -1730,26 +1731,26 @@ void *send_frame_thread (void *threadid)
switch(pthread_cond_timedwait(&remoteVars.have_sendqueue_cond, &remoteVars.sendqueue_mutex, &ts))
{
case 0: //have a signal from other thread, continue execution
- ms_to_wait=100; //reset timer
+ ms_to_wait=100*1000; //reset timer
break;
case ETIMEDOUT: //timeout is ocured, we have nothing else to do, let's see if we need to update some screen regions
dirty_region=getDirtyScreenRegion();
if(dirty_region!=-1)
{
send_dirty_region(dirty_region);
- ms_to_wait=1; //we can start to repaint faster till we don't have any new data incoming
+ ms_to_wait=200; //we can start to repaint faster till we don't have any new data incoming
}
else
{
/* sleep till we have a signal from another thread if
*frame, cursor ,selection queue is empty and all regions are updated*/
- ms_to_wait=100; //reset timer
+ ms_to_wait=100*1000; //reset timer
pthread_cond_wait(&remoteVars.have_sendqueue_cond, &remoteVars.sendqueue_mutex);
}
break;
default:
EPHYR_DBG("Error is occured in pthread_cond_timedwait");
- ms_to_wait=100; //reset timer
+ ms_to_wait=100*1000; //reset timer
break;
}
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdrive.git
More information about the x2go-commits
mailing list