mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 04:31:30 +11:00
Make return value mutable
Changes the return mutability for pgpu_glyph_provider_get()
This commit is contained in:
parent
532b6ee808
commit
3ff87c88a7
|
@ -118,7 +118,7 @@ PgpuGlyphProvider *pgpu_glyph_provider_new(PgpuGlyphContext *gcx, const PgpuFont
|
|||
|
||||
/// Returns an encoded outline for the specified glyph provider and glyph id.
|
||||
/// May return nullptr if the requested glyph is not available.
|
||||
const PgpuGlyph *pgpu_glyph_provider_get(PgpuGlyphProvider *provider, uint16_t gid);
|
||||
PgpuGlyph *pgpu_glyph_provider_get(PgpuGlyphProvider *provider, uint16_t gid);
|
||||
|
||||
/// Returns an encoded color outline for the specified glyph provider, color
|
||||
/// palette index and glyph id. May return nullptr if the requested glyph is
|
||||
|
|
|
@ -172,11 +172,11 @@ pub unsafe extern "C" fn pgpu_glyph_provider_new(
|
|||
pub unsafe extern "C" fn pgpu_glyph_provider_get(
|
||||
provider: *mut PgpuGlyphProvider,
|
||||
gid: u16,
|
||||
) -> *const PgpuGlyph {
|
||||
) -> *mut PgpuGlyph {
|
||||
if let Some(glyph) = (*provider).get(gid) {
|
||||
Box::into_raw(Box::new(glyph))
|
||||
} else {
|
||||
std::ptr::null()
|
||||
std::ptr::null_mut()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue