From 938d579d160547c94ce519203aba9554b5b7a9ab Mon Sep 17 00:00:00 2001 From: Liav A Date: Fri, 10 Jun 2022 20:25:22 +0300 Subject: Kernel/Graphics: Re-organize the DisplayConnector class a bit Move methods that are overriding the virtual methods in the File class, to a private access scope in the DisplayConnector class because nobody tries to access them in any derived class of this class. --- Kernel/Graphics/DisplayConnector.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Kernel') diff --git a/Kernel/Graphics/DisplayConnector.h b/Kernel/Graphics/DisplayConnector.h index f817a69686..ceeac71114 100644 --- a/Kernel/Graphics/DisplayConnector.h +++ b/Kernel/Graphics/DisplayConnector.h @@ -105,16 +105,6 @@ public: protected: void set_edid_bytes(Array const& edid_bytes); - // ^File - virtual bool is_seekable() const override { return true; } - virtual bool can_read(OpenFileDescription const&, u64) const final override { return true; } - virtual bool can_write(OpenFileDescription const&, u64) const final override { return true; } - virtual ErrorOr read(OpenFileDescription&, u64, UserOrKernelBuffer&, size_t) override final; - virtual ErrorOr write(OpenFileDescription&, u64, UserOrKernelBuffer const&, size_t) override final; - virtual ErrorOr mmap(Process&, OpenFileDescription&, Memory::VirtualRange const&, u64, int, bool) override final; - virtual ErrorOr ioctl(OpenFileDescription&, unsigned request, Userspace arg) override final; - virtual StringView class_name() const override final { return "DisplayConnector"sv; } - DisplayConnector(PhysicalAddress framebuffer_address, size_t framebuffer_resource_size, bool enable_write_combine_optimization); DisplayConnector(size_t framebuffer_resource_size, bool enable_write_combine_optimization); virtual void enable_console() = 0; @@ -141,6 +131,16 @@ protected: u8* framebuffer_data() { return m_framebuffer_data; } private: + // ^File + virtual bool is_seekable() const override { return true; } + virtual bool can_read(OpenFileDescription const&, u64) const final override { return true; } + virtual bool can_write(OpenFileDescription const&, u64) const final override { return true; } + virtual ErrorOr read(OpenFileDescription&, u64, UserOrKernelBuffer&, size_t) override final; + virtual ErrorOr write(OpenFileDescription&, u64, UserOrKernelBuffer const&, size_t) override final; + virtual ErrorOr mmap(Process&, OpenFileDescription&, Memory::VirtualRange const&, u64, int, bool) override final; + virtual ErrorOr ioctl(OpenFileDescription&, unsigned request, Userspace arg) override final; + virtual StringView class_name() const override final { return "DisplayConnector"sv; } + DisplayConnector& operator=(DisplayConnector const&) = delete; DisplayConnector& operator=(DisplayConnector&&) = delete; DisplayConnector(DisplayConnector&&) = delete; -- cgit v1.2.3