LibGfx+LibWebView+UI: Store Gfx::Bitmap in RefPtr to const

This commit is contained in:
Andrew Kaster 2025-04-15 15:50:18 -06:00 committed by Andrew Kaster
parent be2dd91289
commit 91b549f797
Notes: github-actions[bot] 2025-04-16 16:44:09 +00:00
8 changed files with 15 additions and 15 deletions

View file

@ -164,11 +164,11 @@ void HeadlessWebView::clear_content_filters()
client().async_set_content_filters(m_client_state.page_index, {});
}
NonnullRefPtr<Core::Promise<RefPtr<Gfx::Bitmap>>> HeadlessWebView::take_screenshot()
NonnullRefPtr<Core::Promise<RefPtr<Gfx::Bitmap const>>> HeadlessWebView::take_screenshot()
{
VERIFY(!m_pending_screenshot);
m_pending_screenshot = Core::Promise<RefPtr<Gfx::Bitmap>>::construct();
m_pending_screenshot = Core::Promise<RefPtr<Gfx::Bitmap const>>::construct();
client().async_take_document_screenshot(0);
return *m_pending_screenshot;