mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
Everywhere: Hoist the Services folder to the top-level
This commit is contained in:
parent
a7dc40eff3
commit
22e0eeada2
Notes:
github-actions[bot]
2024-11-10 11:52:06 +00:00
Author: https://github.com/trflynn89
Commit: 22e0eeada2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
68 changed files with 41 additions and 41 deletions
50
Services/WebContent/BackingStoreManager.h
Normal file
50
Services/WebContent/BackingStoreManager.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibCore/Forward.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/Painting/BackingStore.h>
|
||||
#include <WebContent/Forward.h>
|
||||
|
||||
namespace WebContent {
|
||||
|
||||
class BackingStoreManager {
|
||||
public:
|
||||
#ifdef AK_OS_MACOS
|
||||
static void set_browser_mach_port(Core::MachPort&&);
|
||||
#endif
|
||||
|
||||
enum class WindowResizingInProgress {
|
||||
No,
|
||||
Yes
|
||||
};
|
||||
void resize_backing_stores_if_needed(WindowResizingInProgress window_resize_in_progress);
|
||||
void reallocate_backing_stores(Gfx::IntSize);
|
||||
void restart_resize_timer();
|
||||
|
||||
Web::Painting::BackingStore* back_store() { return m_back_store.ptr(); }
|
||||
i32 front_id() const { return m_front_bitmap_id; }
|
||||
|
||||
void swap_back_and_front();
|
||||
|
||||
BackingStoreManager(PageClient&);
|
||||
|
||||
private:
|
||||
// FIXME: We should come up with an ownership model for this class that makes the GC-checker happy
|
||||
IGNORE_GC PageClient& m_page_client;
|
||||
|
||||
i32 m_front_bitmap_id { -1 };
|
||||
i32 m_back_bitmap_id { -1 };
|
||||
OwnPtr<Web::Painting::BackingStore> m_front_store;
|
||||
OwnPtr<Web::Painting::BackingStore> m_back_store;
|
||||
int m_next_bitmap_id { 0 };
|
||||
|
||||
RefPtr<Core::Timer> m_backing_store_shrink_timer;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue