mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-06-28 12:10:28 +00:00
Future compositor-side rendering will need WebContent to share typefaces with the compositor process over IPC. If a typeface already keeps its backing bytes in anonymous shared memory, IPC encoding can clone that buffer handle instead of allocating a new shared buffer and copying the same font data during upload.
22 lines
685 B
C++
22 lines
685 B
C++
/*
|
|
* Copyright (c) 2026-present, the Ladybird developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/ByteBuffer.h>
|
|
#include <AK/ByteString.h>
|
|
#include <AK/Function.h>
|
|
#include <AK/Optional.h>
|
|
#include <LibCore/AnonymousBuffer.h>
|
|
#include <LibGfx/Font/Typeface.h>
|
|
|
|
namespace Web::CSS {
|
|
|
|
bool requires_off_thread_vector_font_preparation(ByteBuffer const&, Optional<ByteString> const& mime_type_essence = {});
|
|
ErrorOr<NonnullRefPtr<Gfx::Typeface const>> try_load_vector_font(ByteBuffer const&, Optional<ByteString> const& mime_type_essence = {});
|
|
void prepare_vector_font_data_off_thread(ByteBuffer, Function<void(ErrorOr<Core::AnonymousBuffer>)>&&);
|
|
|
|
}
|