From 608b8a51e58e609664adc9596a83d189f22706df Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 28 Dec 2023 13:40:09 +0100 Subject: [PATCH] Remove unused setPixelFormat() callback This was made obsolete in dd45b44 when we extended the serverInit() callback. --- common/rfb/CMsgHandler.cxx | 5 ----- common/rfb/CMsgHandler.h | 13 ++++++------- tests/perf/decperf.cxx | 7 ------- tests/perf/encperf.cxx | 2 +- 4 files changed, 7 insertions(+), 20 deletions(-) diff --git a/common/rfb/CMsgHandler.cxx b/common/rfb/CMsgHandler.cxx index c3594af9..4489dbd4 100644 --- a/common/rfb/CMsgHandler.cxx +++ b/common/rfb/CMsgHandler.cxx @@ -59,11 +59,6 @@ void CMsgHandler::setExtendedDesktopSize(unsigned reason, unsigned result, server.setDimensions(width, height, layout); } -void CMsgHandler::setPixelFormat(const PixelFormat& pf) -{ - server.setPF(pf); -} - void CMsgHandler::setName(const char* name) { server.setName(name); diff --git a/common/rfb/CMsgHandler.h b/common/rfb/CMsgHandler.h index 16a53c6a..9e5f7de2 100644 --- a/common/rfb/CMsgHandler.h +++ b/common/rfb/CMsgHandler.h @@ -39,12 +39,12 @@ namespace rfb { CMsgHandler(); virtual ~CMsgHandler(); - // The following methods are called as corresponding messages are read. A - // derived class should override these methods as desired. Note that for - // the setDesktopSize(), setExtendedDesktopSize(), setPixelFormat(), - // setName(), serverInit() and clipboardCaps methods, a derived class - // should call on to CMsgHandler's methods to set the members of "server" - // appropriately. + // The following methods are called as corresponding messages are + // read. A derived class should override these methods as desired. + // Note that for the setDesktopSize(), setExtendedDesktopSize(), + // setName(), serverInit() and handleClipboardCaps() methods, a + // derived class should call on to CMsgHandler's methods to set the + // members of "server" appropriately. virtual void setDesktopSize(int w, int h); virtual void setExtendedDesktopSize(unsigned reason, unsigned result, @@ -53,7 +53,6 @@ namespace rfb { virtual void setCursor(int width, int height, const Point& hotspot, const uint8_t* data) = 0; virtual void setCursorPos(const Point& pos) = 0; - virtual void setPixelFormat(const PixelFormat& pf); virtual void setName(const char* name); virtual void fence(uint32_t flags, unsigned len, const uint8_t data[]); virtual void endOfContinuousUpdates(); diff --git a/tests/perf/decperf.cxx b/tests/perf/decperf.cxx index 66a50d02..ef53a686 100644 --- a/tests/perf/decperf.cxx +++ b/tests/perf/decperf.cxx @@ -68,7 +68,6 @@ public: ~CConn(); void initDone() override; - void setPixelFormat(const rfb::PixelFormat& pf) override; void setCursor(int, int, const rfb::Point&, const uint8_t*) override; void setCursorPos(const rfb::Point&) override; void framebufferUpdateStart() override; @@ -139,12 +138,6 @@ void CConn::initDone() server.height())); } -void CConn::setPixelFormat(const rfb::PixelFormat& /*pf*/) -{ - // Override format - CConnection::setPixelFormat(filePF); -} - void CConn::setCursor(int, int, const rfb::Point&, const uint8_t*) { } diff --git a/tests/perf/encperf.cxx b/tests/perf/encperf.cxx index 25dca490..ac8e9d47 100644 --- a/tests/perf/encperf.cxx +++ b/tests/perf/encperf.cxx @@ -189,7 +189,7 @@ CConn::CConn(const char *filename) // Nor the frame buffer size and format rfb::PixelFormat pf; pf.parse(format); - setPixelFormat(pf); + server.setPF(pf); setDesktopSize(width, height); sc = new SConn(); -- 2.39.5