We need more callbacks for correct operation of multi-threaded rect decoding.tags/v1.6.90
@@ -301,6 +301,29 @@ void CConnection::securityCompleted() | |||
writer_->writeClientInit(shared); | |||
} | |||
void CConnection::setDesktopSize(int w, int h) | |||
{ | |||
CMsgHandler::setDesktopSize(w,h); | |||
} | |||
void CConnection::setExtendedDesktopSize(unsigned reason, | |||
unsigned result, | |||
int w, int h, | |||
const ScreenSet& layout) | |||
{ | |||
CMsgHandler::setExtendedDesktopSize(reason, result, w, h, layout); | |||
} | |||
void CConnection::framebufferUpdateStart() | |||
{ | |||
CMsgHandler::framebufferUpdateStart(); | |||
} | |||
void CConnection::framebufferUpdateEnd() | |||
{ | |||
CMsgHandler::framebufferUpdateEnd(); | |||
} | |||
void CConnection::dataRect(const Rect& r, int encoding) | |||
{ | |||
decoder.decodeRect(r, encoding, framebuffer); |
@@ -92,6 +92,15 @@ namespace rfb { | |||
// Methods overridden from CMsgHandler | |||
// Note: These must be called by any deriving classes | |||
virtual void setDesktopSize(int w, int h); | |||
virtual void setExtendedDesktopSize(unsigned reason, unsigned result, | |||
int w, int h, | |||
const ScreenSet& layout); | |||
virtual void framebufferUpdateStart(); | |||
virtual void framebufferUpdateEnd(); | |||
virtual void dataRect(const Rect& r, int encoding); | |||
@@ -99,11 +99,15 @@ void CConn::setCursor(int, int, const rfb::Point&, void*, void*) | |||
void CConn::framebufferUpdateStart() | |||
{ | |||
CConnection::framebufferUpdateStart(); | |||
startCpuCounter(); | |||
} | |||
void CConn::framebufferUpdateEnd() | |||
{ | |||
CConnection::framebufferUpdateEnd(); | |||
endCpuCounter(); | |||
cpuTime += getCpuCounter(); |
@@ -208,6 +208,8 @@ void CConn::setCursor(int, int, const rfb::Point&, void*, void*) | |||
void CConn::framebufferUpdateStart() | |||
{ | |||
CConnection::framebufferUpdateStart(); | |||
updates.clear(); | |||
startCpuCounter(); | |||
} | |||
@@ -218,6 +220,8 @@ void CConn::framebufferUpdateEnd() | |||
rfb::PixelBuffer* pb = getFramebuffer(); | |||
rfb::Region clip(pb->getRect()); | |||
CConnection::framebufferUpdateEnd(); | |||
endCpuCounter(); | |||
decodeTime += getCpuCounter(); |
@@ -342,6 +342,8 @@ void CConn::setName(const char* name) | |||
// one. | |||
void CConn::framebufferUpdateStart() | |||
{ | |||
CConnection::framebufferUpdateStart(); | |||
// Note: This might not be true if sync fences are supported | |||
pendingUpdate = false; | |||
@@ -357,6 +359,8 @@ void CConn::framebufferUpdateStart() | |||
// appropriately, and then request another incremental update. | |||
void CConn::framebufferUpdateEnd() | |||
{ | |||
CConnection::framebufferUpdateEnd(); | |||
Fl::remove_timeout(handleUpdateTimeout, this); | |||
desktop->updateWindow(); | |||