diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-11-28 18:29:13 +0100 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-11-28 18:29:13 +0100 |
| commit | 49d8bce2413cc9497214cca88584917d9e9088c1 (patch) | |
| tree | 0fc7d80bdfc94d7518cf6452e6c21db114e42eba /dev/Modules/FB | |
| parent | 3e9f5148faefb6ce73d6d0740504a4e26908cdfd (diff) | |
IMP: Improve Kernel architecture.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/Modules/FB')
| -rw-r--r-- | dev/Modules/FB/WS.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/dev/Modules/FB/WS.h b/dev/Modules/FB/WS.h deleted file mode 100644 index f16cabb4..00000000 --- a/dev/Modules/FB/WS.h +++ /dev/null @@ -1,65 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2024, ELMH Group, all rights reserved. - -------------------------------------------- */ - -#pragma once - -#include <ArchKit/ArchKit.h> -#include <NewKit/Utils.h> - -/// @file WS.h -/// @brief WindowServer's window ownership implementation. -/// It is used to draw within a window. - -#define rtl_allocate_backbuffer(width, height) new WS::WSBackBufferKind[width * height] -#define rtl_compute_fb_geometry(width, height) (width * height) - -namespace WS -{ - using namespace Kernel; - - class WSWindowTexture; - class WSWindowContainer; - - typedef UInt32* WSBackBufferKind; - - class WSWindowContainer final - { - public: - WSWindowContainer() = default; - ~WSWindowContainer() = default; - - ZKA_COPY_DEFAULT(WSWindowContainer); - - /// @note the trick is, it could be GPU processed data, that's the cool thing. - BOOL Fill(WSBackBufferKind contents_buf, SizeT contents_len) - { - if (contents_len > BackBufferLength) - return NO; - - if (!contents_buf) - return NO; - - if (!BackBuffer || - !BackBufferLength) - return NO; - - rt_copy_memory(contents_buf, BackBuffer, contents_len); - return YES; - } - - BOOL Fill(WSWindowContainer* container) - { - if (!container) - return NO; - - return this->Fill(container->BackBuffer, container->BackBufferLength); - } - - public: - WSBackBufferKind BackBuffer{nullptr}; - SizeT BackBufferLength{0UL}; - }; -} // namespace WS |
