From b6ad94407e13fa08c4d71f0c31ce500f2213ce97 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 1 Dec 2019 19:29:48 +0100 Subject: [PATCH] WindowServer: Remove unused GetWindowBackingStore IPC request --- Servers/WindowServer/WSAPITypes.h | 2 -- Servers/WindowServer/WSClientConnection.cpp | 27 --------------------- Servers/WindowServer/WSClientConnection.h | 1 - Servers/WindowServer/WSEvent.h | 15 ------------ 4 files changed, 45 deletions(-) diff --git a/Servers/WindowServer/WSAPITypes.h b/Servers/WindowServer/WSAPITypes.h index 75597fcaf1..20908401d0 100644 --- a/Servers/WindowServer/WSAPITypes.h +++ b/Servers/WindowServer/WSAPITypes.h @@ -101,7 +101,6 @@ struct WSAPI_ServerMessage { DidDestroyWindow, DidGetWindowTitle, DidGetWindowRect, - DidGetWindowBackingStore, Greeting, DidGetClipboardContents, DidSetClipboardContents, @@ -217,7 +216,6 @@ struct WSAPI_ClientMessage { GetWindowRect, InvalidateRect, DidFinishPainting, - GetWindowBackingStore, SetGlobalCursorTracking, SetWindowOpacity, SetWindowBackingStore, diff --git a/Servers/WindowServer/WSClientConnection.cpp b/Servers/WindowServer/WSClientConnection.cpp index fe0a28bc9e..4ea53cbfeb 100644 --- a/Servers/WindowServer/WSClientConnection.cpp +++ b/Servers/WindowServer/WSClientConnection.cpp @@ -285,9 +285,6 @@ bool WSClientConnection::handle_message(const WSAPI_ClientMessage& message, cons CEventLoop::current().post_event(*this, make(client_id(), message.window_id, rects)); break; } - case WSAPI_ClientMessage::Type::GetWindowBackingStore: - CEventLoop::current().post_event(*this, make(client_id(), message.window_id)); - break; case WSAPI_ClientMessage::Type::SetWindowBackingStore: CEventLoop::current().post_event(*this, make(client_id(), message.window_id, message.backing.shared_buffer_id, message.backing.size, message.backing.bpp, message.backing.pitch, message.backing.has_alpha_channel, message.backing.flush_immediately)); break; @@ -822,28 +819,6 @@ void WSClientConnection::handle_request(const WSAPIDidFinishPaintingNotification WSWindowSwitcher::the().refresh_if_needed(); } -void WSClientConnection::handle_request(const WSAPIGetWindowBackingStoreRequest& request) -{ - int window_id = request.window_id(); - auto it = m_windows.find(window_id); - if (it == m_windows.end()) { - post_error("WSAPIGetWindowBackingStoreRequest: Bad window ID"); - return; - } - auto& window = *(*it).value; - auto* backing_store = window.backing_store(); - - WSAPI_ServerMessage response; - response.type = WSAPI_ServerMessage::Type::DidGetWindowBackingStore; - response.window_id = window_id; - response.backing.bpp = sizeof(RGBA32); - response.backing.pitch = backing_store->pitch(); - response.backing.size = backing_store->size(); - response.backing.has_alpha_channel = backing_store->has_alpha_channel(); - response.backing.shared_buffer_id = backing_store->shared_buffer_id(); - post_message(response); -} - void WSClientConnection::handle_request(const WSAPISetWindowBackingStoreRequest& request) { int window_id = request.window_id(); @@ -1028,8 +1003,6 @@ void WSClientConnection::on_request(const WSAPIClientRequest& request) return handle_request(static_cast(request)); case WSEvent::APIDidFinishPaintingNotification: return handle_request(static_cast(request)); - case WSEvent::APIGetWindowBackingStoreRequest: - return handle_request(static_cast(request)); case WSEvent::APISetGlobalCursorTrackingRequest: return handle_request(static_cast(request)); case WSEvent::APISetWindowOpacityRequest: diff --git a/Servers/WindowServer/WSClientConnection.h b/Servers/WindowServer/WSClientConnection.h index f526b4906b..1cef9072b3 100644 --- a/Servers/WindowServer/WSClientConnection.h +++ b/Servers/WindowServer/WSClientConnection.h @@ -71,7 +71,6 @@ private: void handle_request(const WSAPIDestroyWindowRequest&); void handle_request(const WSAPIInvalidateRectRequest&); void handle_request(const WSAPIDidFinishPaintingNotification&); - void handle_request(const WSAPIGetWindowBackingStoreRequest&); void handle_request(const WSAPISetWindowBackingStoreRequest&); void handle_request(const WSAPISetGlobalCursorTrackingRequest&); void handle_request(const WSAPISetWindowOpacityRequest&); diff --git a/Servers/WindowServer/WSEvent.h b/Servers/WindowServer/WSEvent.h index 0a6f556eda..6059c784d1 100644 --- a/Servers/WindowServer/WSEvent.h +++ b/Servers/WindowServer/WSEvent.h @@ -53,7 +53,6 @@ public: APISetWindowIconBitmapRequest, APIInvalidateRectRequest, APIDidFinishPaintingNotification, - APIGetWindowBackingStoreRequest, APISetGlobalCursorTrackingRequest, APISetWindowOpacityRequest, APISetWindowBackingStoreRequest, @@ -726,20 +725,6 @@ private: Vector m_rects; }; -class WSAPIGetWindowBackingStoreRequest final : public WSAPIClientRequest { -public: - explicit WSAPIGetWindowBackingStoreRequest(int client_id, int window_id) - : WSAPIClientRequest(WSEvent::APIGetWindowBackingStoreRequest, client_id) - , m_window_id(window_id) - { - } - - int window_id() const { return m_window_id; } - -private: - int m_window_id { 0 }; -}; - class WSAPIDidFinishPaintingNotification final : public WSAPIClientRequest { public: explicit WSAPIDidFinishPaintingNotification(int client_id, int window_id, const Vector& rects)