diff options
author | Pierre Ossman <ossman@cendio.se> | 2018-10-31 17:08:59 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2018-11-01 16:11:42 +0100 |
commit | dd45b4490100f70e21000c5181540c224e0f3c41 (patch) | |
tree | 440df3c66f396e20c1dc40989d1ee40211252d26 /tests | |
parent | 2affd7753274ddf3b93505f0ae26af3c45aa3fec (diff) | |
download | tigervnc-dd45b4490100f70e21000c5181540c224e0f3c41.tar.gz tigervnc-dd45b4490100f70e21000c5181540c224e0f3c41.zip |
Let CMsgHandler::serverInit() handle initial set up
Avoid using the callbacks used for runtime changes for the initial
setup. They weren't really useful anyway as you could not allocate
a framebuffer without also knowing the pixel format. So make things
more clear by letting serverInit() get the initial settings.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/decperf.cxx | 6 | ||||
-rw-r--r-- | tests/encperf.cxx | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/tests/decperf.cxx b/tests/decperf.cxx index 056848ae..301e45e0 100644 --- a/tests/decperf.cxx +++ b/tests/decperf.cxx @@ -47,7 +47,7 @@ public: CConn(const char *filename); ~CConn(); - virtual void setDesktopSize(int w, int h); + virtual void initDone(); virtual void setPixelFormat(const rfb::PixelFormat& pf); virtual void setCursor(int, int, const rfb::Point&, const rdr::U8*); virtual void framebufferUpdateStart(); @@ -81,10 +81,8 @@ CConn::~CConn() delete in; } -void CConn::setDesktopSize(int w, int h) +void CConn::initDone() { - CConnection::setDesktopSize(w, h); - setFramebuffer(new rfb::ManagedPixelBuffer(filePF, server.width(), server.height())); diff --git a/tests/encperf.cxx b/tests/encperf.cxx index f8b2555f..6f9283b8 100644 --- a/tests/encperf.cxx +++ b/tests/encperf.cxx @@ -89,7 +89,7 @@ public: void getStats(double& ratio, unsigned long long& bytes, unsigned long long& rawEquivalent); - virtual void setDesktopSize(int w, int h); + virtual void initDone(); virtual void setCursor(int, int, const rfb::Point&, const rdr::U8*); virtual void framebufferUpdateStart(); virtual void framebufferUpdateEnd(); @@ -196,12 +196,10 @@ void CConn::getStats(double& ratio, unsigned long long& bytes, sc->getStats(ratio, bytes, rawEquivalent); } -void CConn::setDesktopSize(int w, int h) +void CConn::initDone() { rfb::ModifiablePixelBuffer *pb; - CConnection::setDesktopSize(w, h); - pb = new rfb::ManagedPixelBuffer((bool)translate ? fbPF : server.pf(), server.width(), server.height()); setFramebuffer(pb); |