Flutter Impeller
impeller::interop Namespace Reference

Namespaces

 testing
 

Classes

class  ContextGLES
 
class  ReactorWorkerGLES
 
class  SurfaceGLES
 
class  ContextMTL
 
class  SurfaceMTL
 
class  ContextVK
 
class  SurfaceVK
 
class  SwapchainVK
 
class  ColorFilter
 
class  ColorSource
 
class  Context
 
class  DisplayList
 
class  DisplayListBuilder
 
class  GlyphInfo
 Internal C++ peer of ImpellerGlyphInfo. For detailed documentation, refer to the headerdocs in the public API in impeller.h. More...
 
class  ImageFilter
 
class  LineMetrics
 Internal C++ peer of ImpellerLineMetrics. For detailed documentation, refer to the headerdocs in the public API in impeller.h. More...
 
class  MaskFilter
 
class  ObjectBase
 
class  Object
 
class  ScopedObject
 
class  Paint
 
class  Paragraph
 
class  ParagraphBuilder
 
class  ParagraphStyle
 
class  Path
 
class  PathBuilder
 
class  Surface
 
class  Texture
 
class  TypographyContext
 

Enumerations

enum class  AdoptTag { kAdopted }
 

Functions

static std::vector< std::shared_ptr< fml::Mapping > > CreateShaderLibraryMappings ()
 
static std::vector< std::shared_ptr< fml::Mapping > > CreateShaderLibraryMappings ()
 
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL ContextVKGetInstanceProcAddress (VkInstance instance, const char *proc_name)
 
constexpr std::optional< SkRect > ToSkiaType (const ImpellerRect *rect)
 
constexpr SkPoint ToSkiaType (const Point &point)
 
constexpr SkVector ToSkiaVector (const Size &point)
 
constexpr SkRect ToSkiaType (const Rect &rect)
 
constexpr SkPathFillType ToSkiaType (FillType type)
 
constexpr SkIRect ToSkiaType (IRect rect)
 
template<class SkiaType , class OtherType >
std::vector< SkiaType > ToSkiaType (const std::vector< OtherType > &other_vec)
 
constexpr flutter::DlColor ToDisplayListType (Color color)
 
constexpr SkMatrix ToSkMatrix (const Matrix &matrix)
 
template<class DlType , class OtherType >
std::vector< DlType > ToDisplayListType (const std::vector< OtherType > &other_vec)
 
constexpr flutter::DlImageSampling ToDisplayListType (ImpellerTextureSampling sampling)
 
constexpr flutter::DlBlurStyle ToDisplayListType (ImpellerBlurStyle style)
 
constexpr flutter::DlBlendMode ToDisplayListType (BlendMode mode)
 
SkRRect ToSkiaType (const Rect &rect, const RoundingRadii &radii)
 
constexpr Matrix ToImpellerType (const ImpellerMatrix &m)
 
constexpr void FromImpellerType (const Matrix &from, ImpellerMatrix &to)
 
constexpr Size ToImpellerType (const ImpellerSize &size)
 
constexpr Point ToImpellerType (const ImpellerPoint &point)
 
constexpr Size ToImpellerSize (const ImpellerPoint &point)
 
constexpr Rect ToImpellerType (const ImpellerRect &rect)
 
constexpr flutter::DlTileMode ToDisplayListType (ImpellerTileMode mode)
 
constexpr RoundingRadii ToImpellerType (const ImpellerRoundingRadii &radii)
 
constexpr FillType ToImpellerType (ImpellerFillType type)
 
constexpr flutter::DlClipOp ToImpellerType (ImpellerClipOperation op)
 
constexpr Color ToImpellerType (const ImpellerColor &color)
 
constexpr BlendMode ToImpellerType (ImpellerBlendMode mode)
 
constexpr flutter::DlDrawStyle ToDisplayListType (ImpellerDrawStyle style)
 
constexpr flutter::DlStrokeCap ToDisplayListType (ImpellerStrokeCap cap)
 
constexpr flutter::DlStrokeJoin ToDisplayListType (ImpellerStrokeJoin join)
 
constexpr PixelFormat ToImpellerType (ImpellerPixelFormat format)
 
constexpr ISize ToImpellerType (const ImpellerISize &size)
 
constexpr flutter::DlColorSpace ToDisplayListType (ImpellerColorSpace color_space)
 
constexpr flutter::DlColor ToDisplayListType (ImpellerColor color)
 
constexpr txt::FontWeight ToTxtType (ImpellerFontWeight weight)
 
constexpr txt::FontStyle ToTxtType (ImpellerFontStyle style)
 
constexpr txt::TextAlign ToTxtType (ImpellerTextAlignment align)
 
constexpr txt::TextDirection ToTxtType (ImpellerTextDirection direction)
 
 DEFINE_PEER_GETTER (ColorFilter, ImpellerColorFilter)
 
 DEFINE_PEER_GETTER (ColorSource, ImpellerColorSource)
 
 DEFINE_PEER_GETTER (Context, ImpellerContext)
 
 DEFINE_PEER_GETTER (DisplayList, ImpellerDisplayList)
 
 DEFINE_PEER_GETTER (DisplayListBuilder, ImpellerDisplayListBuilder)
 
 DEFINE_PEER_GETTER (GlyphInfo, ImpellerGlyphInfo)
 
 DEFINE_PEER_GETTER (ImageFilter, ImpellerImageFilter)
 
 DEFINE_PEER_GETTER (LineMetrics, ImpellerLineMetrics)
 
 DEFINE_PEER_GETTER (MaskFilter, ImpellerMaskFilter)
 
 DEFINE_PEER_GETTER (Paint, ImpellerPaint)
 
 DEFINE_PEER_GETTER (Paragraph, ImpellerParagraph)
 
 DEFINE_PEER_GETTER (ParagraphBuilder, ImpellerParagraphBuilder)
 
 DEFINE_PEER_GETTER (ParagraphStyle, ImpellerParagraphStyle)
 
 DEFINE_PEER_GETTER (Path, ImpellerPath)
 
 DEFINE_PEER_GETTER (PathBuilder, ImpellerPathBuilder)
 
 DEFINE_PEER_GETTER (Surface, ImpellerSurface)
 
 DEFINE_PEER_GETTER (SwapchainVK, ImpellerVulkanSwapchain)
 
 DEFINE_PEER_GETTER (Texture, ImpellerTexture)
 
 DEFINE_PEER_GETTER (TypographyContext, ImpellerTypographyContext)
 
static std::string GetVersionAsString (uint32_t version)
 
IMPELLER_EXTERN_C uint32_t ImpellerGetVersion ()
 
static bool CheckVersion (uint32_t version)
 
IMPELLER_EXTERN_C ImpellerContext ImpellerContextCreateOpenGLESNew (uint32_t version, ImpellerProcAddressCallback gl_proc_address_callback, void *gl_proc_address_callback_user_data)
 
IMPELLER_EXTERN_C ImpellerContext ImpellerContextCreateMetalNew (uint32_t version)
 
IMPELLER_EXTERN_C ImpellerContext ImpellerContextCreateVulkanNew (uint32_t version, const ImpellerContextVulkanSettings *settings)
 
IMPELLER_EXTERN_C void ImpellerContextRetain (ImpellerContext context)
 
IMPELLER_EXTERN_C void ImpellerContextRelease (ImpellerContext context)
 
IMPELLER_EXTERN_C bool ImpellerContextGetVulkanInfo (ImpellerContext IMPELLER_NONNULL context, ImpellerContextVulkanInfo *out_vulkan_info)
 
IMPELLER_EXTERN_C ImpellerVulkanSwapchain ImpellerVulkanSwapchainCreateNew (ImpellerContext context, void *vulkan_surface_khr)
 
IMPELLER_EXTERN_C void ImpellerVulkanSwapchainRetain (ImpellerVulkanSwapchain swapchain)
 
IMPELLER_EXTERN_C void ImpellerVulkanSwapchainRelease (ImpellerVulkanSwapchain swapchain)
 
IMPELLER_EXTERN_C ImpellerSurface ImpellerVulkanSwapchainAcquireNextSurfaceNew (ImpellerVulkanSwapchain swapchain)
 
IMPELLER_EXTERN_C ImpellerDisplayListBuilder ImpellerDisplayListBuilderNew (const ImpellerRect *cull_rect)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRetain (ImpellerDisplayListBuilder builder)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRelease (ImpellerDisplayListBuilder builder)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSave (ImpellerDisplayListBuilder builder)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSaveLayer (ImpellerDisplayListBuilder builder, const ImpellerRect *bounds, ImpellerPaint paint, ImpellerImageFilter backdrop)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRestore (ImpellerDisplayListBuilder builder)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderScale (ImpellerDisplayListBuilder builder, float x_scale, float y_scale)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRotate (ImpellerDisplayListBuilder builder, float angle_degrees)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderTranslate (ImpellerDisplayListBuilder builder, float x_translation, float y_translation)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSetTransform (ImpellerDisplayListBuilder builder, const ImpellerMatrix *transform)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderTransform (ImpellerDisplayListBuilder builder, const ImpellerMatrix *transform)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderGetTransform (ImpellerDisplayListBuilder builder, ImpellerMatrix *out_transform)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderResetTransform (ImpellerDisplayListBuilder builder)
 
IMPELLER_EXTERN_C uint32_t ImpellerDisplayListBuilderGetSaveCount (ImpellerDisplayListBuilder builder)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRestoreToCount (ImpellerDisplayListBuilder builder, uint32_t count)
 
IMPELLER_EXTERN_C void ImpellerPathRetain (ImpellerPath path)
 
IMPELLER_EXTERN_C void ImpellerPathRelease (ImpellerPath path)
 
IMPELLER_EXTERN_C ImpellerPathBuilder ImpellerPathBuilderNew ()
 
IMPELLER_EXTERN_C void ImpellerPathBuilderRetain (ImpellerPathBuilder builder)
 
IMPELLER_EXTERN_C void ImpellerPathBuilderRelease (ImpellerPathBuilder builder)
 
IMPELLER_EXTERN_C void ImpellerPathBuilderMoveTo (ImpellerPathBuilder builder, const ImpellerPoint *location)
 
IMPELLER_EXTERN_C void ImpellerPathBuilderLineTo (ImpellerPathBuilder builder, const ImpellerPoint *location)
 
IMPELLER_EXTERN_C void ImpellerPathBuilderQuadraticCurveTo (ImpellerPathBuilder builder, const ImpellerPoint *control_point, const ImpellerPoint *end_point)
 
IMPELLER_EXTERN_C void ImpellerPathBuilderCubicCurveTo (ImpellerPathBuilder builder, const ImpellerPoint *control_point_1, const ImpellerPoint *control_point_2, const ImpellerPoint *end_point)
 
IMPELLER_EXTERN_C void ImpellerPathBuilderAddRect (ImpellerPathBuilder builder, const ImpellerRect *rect)
 
IMPELLER_EXTERN_C void ImpellerPathBuilderAddArc (ImpellerPathBuilder builder, const ImpellerRect *oval_bounds, float start_angle_degrees, float end_angle_degrees)
 
IMPELLER_EXTERN_C void ImpellerPathBuilderAddOval (ImpellerPathBuilder builder, const ImpellerRect *oval_bounds)
 
IMPELLER_EXTERN_C void ImpellerPathBuilderAddRoundedRect (ImpellerPathBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *rounding_radii)
 
IMPELLER_EXTERN_C void ImpellerPathBuilderClose (ImpellerPathBuilder builder)
 
IMPELLER_EXTERN_C ImpellerPath ImpellerPathBuilderCopyPathNew (ImpellerPathBuilder builder, ImpellerFillType fill)
 
IMPELLER_EXTERN_C ImpellerPath ImpellerPathBuilderTakePathNew (ImpellerPathBuilder builder, ImpellerFillType fill)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipRect (ImpellerDisplayListBuilder builder, const ImpellerRect *rect, ImpellerClipOperation op)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipOval (ImpellerDisplayListBuilder builder, const ImpellerRect *oval_bounds, ImpellerClipOperation op)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipRoundedRect (ImpellerDisplayListBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *radii, ImpellerClipOperation op)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipPath (ImpellerDisplayListBuilder builder, ImpellerPath path, ImpellerClipOperation op)
 
IMPELLER_EXTERN_C ImpellerPaint ImpellerPaintNew ()
 
IMPELLER_EXTERN_C void ImpellerPaintRetain (ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerPaintRelease (ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerPaintSetColor (ImpellerPaint paint, const ImpellerColor *color)
 
IMPELLER_EXTERN_C void ImpellerPaintSetBlendMode (ImpellerPaint paint, ImpellerBlendMode mode)
 
IMPELLER_EXTERN_C void ImpellerPaintSetDrawStyle (ImpellerPaint paint, ImpellerDrawStyle style)
 
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeCap (ImpellerPaint paint, ImpellerStrokeCap cap)
 
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeJoin (ImpellerPaint paint, ImpellerStrokeJoin join)
 
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeWidth (ImpellerPaint paint, float width)
 
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeMiter (ImpellerPaint paint, float miter)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawPaint (ImpellerDisplayListBuilder builder, ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawLine (ImpellerDisplayListBuilder builder, const ImpellerPoint *from, const ImpellerPoint *to, ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawDashedLine (ImpellerDisplayListBuilder builder, const ImpellerPoint *from, const ImpellerPoint *to, float on_length, float off_length, ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRect (ImpellerDisplayListBuilder builder, const ImpellerRect *rect, ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawOval (ImpellerDisplayListBuilder builder, const ImpellerRect *oval_bounds, ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRoundedRect (ImpellerDisplayListBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *radii, ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRoundedRectDifference (ImpellerDisplayListBuilder builder, const ImpellerRect *outer_rect, const ImpellerRoundingRadii *outer_radii, const ImpellerRect *inner_rect, const ImpellerRoundingRadii *inner_radii, ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawPath (ImpellerDisplayListBuilder builder, ImpellerPath path, ImpellerPaint paint)
 
IMPELLER_EXTERN_C ImpellerTexture ImpellerTextureCreateWithContentsNew (ImpellerContext context, const ImpellerTextureDescriptor *descriptor, const ImpellerMapping *contents, void *contents_on_release_user_data)
 
IMPELLER_EXTERN_C ImpellerTexture ImpellerTextureCreateWithOpenGLTextureHandleNew (ImpellerContext context, const ImpellerTextureDescriptor *descriptor, uint64_t external_gl_handle)
 
IMPELLER_EXTERN_C void ImpellerTextureRetain (ImpellerTexture texture)
 
IMPELLER_EXTERN_C void ImpellerTextureRelease (ImpellerTexture texture)
 
IMPELLER_EXTERN_C uint64_t ImpellerTextureGetOpenGLHandle (ImpellerTexture texture)
 
IMPELLER_EXTERN_C void ImpellerDisplayListRetain (ImpellerDisplayList display_list)
 
IMPELLER_EXTERN_C void ImpellerDisplayListRelease (ImpellerDisplayList display_list)
 
IMPELLER_EXTERN_C ImpellerDisplayList ImpellerDisplayListBuilderCreateDisplayListNew (ImpellerDisplayListBuilder builder)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawDisplayList (ImpellerDisplayListBuilder builder, ImpellerDisplayList display_list, float opacity)
 
IMPELLER_EXTERN_C ImpellerSurface ImpellerSurfaceCreateWrappedFBONew (ImpellerContext context, uint64_t fbo, ImpellerPixelFormat format, const ImpellerISize *size)
 
IMPELLER_EXTERN_C ImpellerSurface ImpellerSurfaceCreateWrappedMetalDrawableNew (ImpellerContext context, void *metal_drawable)
 
IMPELLER_EXTERN_C void ImpellerSurfaceRetain (ImpellerSurface surface)
 
IMPELLER_EXTERN_C void ImpellerSurfaceRelease (ImpellerSurface surface)
 
IMPELLER_EXTERN_C bool ImpellerSurfaceDrawDisplayList (ImpellerSurface surface, ImpellerDisplayList display_list)
 
IMPELLER_EXTERN_C bool ImpellerSurfacePresent (ImpellerSurface surface)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawTexture (ImpellerDisplayListBuilder builder, ImpellerTexture texture, const ImpellerPoint *point, ImpellerTextureSampling sampling, ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawTextureRect (ImpellerDisplayListBuilder builder, ImpellerTexture texture, const ImpellerRect *src_rect, const ImpellerRect *dst_rect, ImpellerTextureSampling sampling, ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerColorSourceRetain (ImpellerColorSource color_source)
 
IMPELLER_EXTERN_C void ImpellerColorSourceRelease (ImpellerColorSource color_source)
 
static std::pair< std::vector< flutter::DlColor >, std::vector< Scalar > > ParseColorsAndStops (uint32_t stop_count, const ImpellerColor *colors, const float *stops)
 
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateLinearGradientNew (const ImpellerPoint *start_point, const ImpellerPoint *end_point, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation)
 
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateRadialGradientNew (const ImpellerPoint *center, float radius, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation)
 
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateConicalGradientNew (const ImpellerPoint *start_center, float start_radius, const ImpellerPoint *end_center, float end_radius, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation)
 
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateSweepGradientNew (const ImpellerPoint *center, float start, float end, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation)
 
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateImageNew (ImpellerTexture image, ImpellerTileMode horizontal_tile_mode, ImpellerTileMode vertical_tile_mode, ImpellerTextureSampling sampling, const ImpellerMatrix *transformation)
 
IMPELLER_EXTERN_C void ImpellerColorFilterRetain (ImpellerColorFilter color_filter)
 
IMPELLER_EXTERN_C void ImpellerColorFilterRelease (ImpellerColorFilter color_filter)
 
IMPELLER_EXTERN_C ImpellerColorFilter ImpellerColorFilterCreateBlendNew (const ImpellerColor *color, ImpellerBlendMode blend_mode)
 
IMPELLER_EXTERN_C ImpellerColorFilter ImpellerColorFilterCreateColorMatrixNew (const ImpellerColorMatrix *color_matrix)
 
IMPELLER_EXTERN_C void ImpellerMaskFilterRetain (ImpellerMaskFilter mask_filter)
 
IMPELLER_EXTERN_C void ImpellerMaskFilterRelease (ImpellerMaskFilter mask_filter)
 
IMPELLER_EXTERN_C ImpellerMaskFilter ImpellerMaskFilterCreateBlurNew (ImpellerBlurStyle style, float sigma)
 
IMPELLER_EXTERN_C void ImpellerImageFilterRetain (ImpellerImageFilter image_filter)
 
IMPELLER_EXTERN_C void ImpellerImageFilterRelease (ImpellerImageFilter image_filter)
 
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateBlurNew (float x_sigma, float y_sigma, ImpellerTileMode tile_mode)
 
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateDilateNew (float x_radius, float y_radius)
 
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateErodeNew (float x_radius, float y_radius)
 
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateMatrixNew (const ImpellerMatrix *matrix, ImpellerTextureSampling sampling)
 
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateComposeNew (ImpellerImageFilter outer, ImpellerImageFilter inner)
 
IMPELLER_EXTERN_C void ImpellerPaintSetColorFilter (ImpellerPaint paint, ImpellerColorFilter color_filter)
 
IMPELLER_EXTERN_C void ImpellerPaintSetColorSource (ImpellerPaint paint, ImpellerColorSource color_source)
 
IMPELLER_EXTERN_C void ImpellerPaintSetImageFilter (ImpellerPaint paint, ImpellerImageFilter image_filter)
 
IMPELLER_EXTERN_C void ImpellerPaintSetMaskFilter (ImpellerPaint paint, ImpellerMaskFilter mask_filter)
 
IMPELLER_EXTERN_C ImpellerParagraphStyle ImpellerParagraphStyleNew ()
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleRetain (ImpellerParagraphStyle paragraph_style)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleRelease (ImpellerParagraphStyle paragraph_style)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetForeground (ImpellerParagraphStyle paragraph_style, ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetBackground (ImpellerParagraphStyle paragraph_style, ImpellerPaint paint)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontWeight (ImpellerParagraphStyle paragraph_style, ImpellerFontWeight weight)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontStyle (ImpellerParagraphStyle paragraph_style, ImpellerFontStyle style)
 
static std::string ReadString (const char *string)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontFamily (ImpellerParagraphStyle paragraph_style, const char *family_name)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontSize (ImpellerParagraphStyle paragraph_style, float size)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetHeight (ImpellerParagraphStyle paragraph_style, float height)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetTextAlignment (ImpellerParagraphStyle paragraph_style, ImpellerTextAlignment align)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetTextDirection (ImpellerParagraphStyle paragraph_style, ImpellerTextDirection direction)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetMaxLines (ImpellerParagraphStyle paragraph_style, uint32_t max_lines)
 
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetLocale (ImpellerParagraphStyle paragraph_style, const char *locale)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawParagraph (ImpellerDisplayListBuilder builder, ImpellerParagraph paragraph, const ImpellerPoint *point)
 
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawShadow (ImpellerDisplayListBuilder builder, ImpellerPath path, const ImpellerColor *color, float elevation, bool occluder_is_transparent, float device_pixel_ratio)
 
IMPELLER_EXTERN_C ImpellerParagraphBuilder ImpellerParagraphBuilderNew (ImpellerTypographyContext context)
 
IMPELLER_EXTERN_C void ImpellerParagraphBuilderRetain (ImpellerParagraphBuilder paragraph_builder)
 
IMPELLER_EXTERN_C void ImpellerParagraphBuilderRelease (ImpellerParagraphBuilder paragraph_builder)
 
IMPELLER_EXTERN_C void ImpellerParagraphBuilderPushStyle (ImpellerParagraphBuilder paragraph_builder, ImpellerParagraphStyle style)
 
IMPELLER_EXTERN_C void ImpellerParagraphBuilderPopStyle (ImpellerParagraphBuilder paragraph_builder)
 
IMPELLER_EXTERN_C void ImpellerParagraphBuilderAddText (ImpellerParagraphBuilder paragraph_builder, const uint8_t *data, uint32_t length)
 
IMPELLER_EXTERN_C ImpellerParagraph ImpellerParagraphBuilderBuildParagraphNew (ImpellerParagraphBuilder paragraph_builder, float width)
 
IMPELLER_EXTERN_C void ImpellerParagraphRetain (ImpellerParagraph paragraph)
 
IMPELLER_EXTERN_C void ImpellerParagraphRelease (ImpellerParagraph paragraph)
 
IMPELLER_EXTERN_C float ImpellerParagraphGetMaxWidth (ImpellerParagraph paragraph)
 
IMPELLER_EXTERN_C float ImpellerParagraphGetHeight (ImpellerParagraph paragraph)
 
IMPELLER_EXTERN_C float ImpellerParagraphGetLongestLineWidth (ImpellerParagraph paragraph)
 
IMPELLER_EXTERN_C float ImpellerParagraphGetMinIntrinsicWidth (ImpellerParagraph paragraph)
 
IMPELLER_EXTERN_C float ImpellerParagraphGetMaxIntrinsicWidth (ImpellerParagraph paragraph)
 
IMPELLER_EXTERN_C float ImpellerParagraphGetIdeographicBaseline (ImpellerParagraph paragraph)
 
IMPELLER_EXTERN_C float ImpellerParagraphGetAlphabeticBaseline (ImpellerParagraph paragraph)
 
IMPELLER_EXTERN_C uint32_t ImpellerParagraphGetLineCount (ImpellerParagraph paragraph)
 
IMPELLER_EXTERN_C ImpellerRange ImpellerParagraphGetWordBoundary (ImpellerParagraph paragraph, size_t code_unit_index)
 
IMPELLER_EXTERN_C ImpellerTypographyContext ImpellerTypographyContextNew ()
 
IMPELLER_EXTERN_C void ImpellerTypographyContextRetain (ImpellerTypographyContext context)
 
IMPELLER_EXTERN_C void ImpellerTypographyContextRelease (ImpellerTypographyContext context)
 
IMPELLER_EXTERN_C bool ImpellerTypographyContextRegisterFont (ImpellerTypographyContext context, const ImpellerMapping *contents, void *contents_on_release_user_data, const char *family_name_alias)
 
IMPELLER_EXTERN_C ImpellerLineMetrics ImpellerParagraphGetLineMetrics (ImpellerParagraph paragraph)
 
IMPELLER_EXTERN_C ImpellerGlyphInfo ImpellerParagraphCreateGlyphInfoAtCodeUnitIndexNew (ImpellerParagraph paragraph, size_t code_unit_index)
 
IMPELLER_EXTERN_C ImpellerGlyphInfo ImpellerParagraphCreateGlyphInfoAtParagraphCoordinatesNew (ImpellerParagraph paragraph, double x, double y)
 
IMPELLER_EXTERN_C void ImpellerLineMetricsRetain (ImpellerLineMetrics line_metrics)
 
IMPELLER_EXTERN_C void ImpellerLineMetricsRelease (ImpellerLineMetrics line_metrics)
 
IMPELLER_EXTERN_C double ImpellerLineMetricsGetUnscaledAscent (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C double ImpellerLineMetricsGetAscent (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C double ImpellerLineMetricsGetDescent (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C double ImpellerLineMetricsGetBaseline (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C bool ImpellerLineMetricsIsHardbreak (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C double ImpellerLineMetricsGetWidth (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C double ImpellerLineMetricsGetHeight (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C double ImpellerLineMetricsGetLeft (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C size_t ImpellerLineMetricsGetCodeUnitStartIndex (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C size_t ImpellerLineMetricsGetCodeUnitEndIndex (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C size_t ImpellerLineMetricsGetCodeUnitEndIndexExcludingWhitespace (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C size_t ImpellerLineMetricsGetCodeUnitEndIndexIncludingNewline (ImpellerLineMetrics metrics, size_t line)
 
IMPELLER_EXTERN_C void ImpellerGlyphInfoRetain (ImpellerGlyphInfo glyph_info)
 
IMPELLER_EXTERN_C void ImpellerGlyphInfoRelease (ImpellerGlyphInfo glyph_info)
 
IMPELLER_EXTERN_C size_t ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeBegin (ImpellerGlyphInfo glyph_info)
 
IMPELLER_EXTERN_C size_t ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeEnd (ImpellerGlyphInfo glyph_info)
 
IMPELLER_EXTERN_C ImpellerRect ImpellerGlyphInfoGetGraphemeClusterBounds (ImpellerGlyphInfo glyph_info)
 
IMPELLER_EXTERN_C bool ImpellerGlyphInfoIsEllipsis (ImpellerGlyphInfo glyph_info)
 
IMPELLER_EXTERN_C ImpellerTextDirection ImpellerGlyphInfoGetTextDirection (ImpellerGlyphInfo glyph_info)
 
template<typename Object >
ScopedObject< ObjectRef (Object *object)
 
template<typename Object >
ScopedObject< ObjectAdopt (Object *object)
 
template<typename Object >
ScopedObject< ObjectAdopt (typename Object::InteropCSibling *object)
 
template<typename Object , typename... CtorArgs>
ScopedObject< ObjectCreate (CtorArgs &&... args)
 
static sk_sp< SkTypeface > CreateTypefaceFromFontData (std::unique_ptr< fml::Mapping > font_data)
 

Variables

thread_local std::function< PFN_vkVoidFunction(VkInstance instance, const char *proc_name)> sContextVKProcAddressCallback
 

Enumeration Type Documentation

◆ AdoptTag

Enumerator
kAdopted 

Definition at line 62 of file object.h.

62  {
63  kAdopted,
64 };

Function Documentation

◆ Adopt() [1/2]

template<typename Object >
ScopedObject<Object> impeller::interop::Adopt ( Object object)

Definition at line 151 of file object.h.

151  {
152  return ScopedObject<Object>{object, AdoptTag::kAdopted};
153 }

References kAdopted.

Referenced by Adopt(), and impeller::interop::testing::TEST().

◆ Adopt() [2/2]

template<typename Object >
ScopedObject<Object> impeller::interop::Adopt ( typename Object::InteropCSibling object)

Definition at line 156 of file object.h.

156  {
157  return Adopt(reinterpret_cast<Object*>(object));
158 }
ScopedObject< Object > Adopt(typename Object::InteropCSibling *object)
Definition: object.h:156

References Adopt().

◆ CheckVersion()

static bool impeller::interop::CheckVersion ( uint32_t  version)
static

Definition at line 92 of file impeller.cc.

92  {
93  if (version != IMPELLER_VERSION) {
94  VALIDATION_LOG << "This version of Impeller ("
96  << "doesn't match the version the user expects ("
97  << GetVersionAsString(version) << ").";
98  return false;
99  }
100  return true;
101 }
IMPELLER_EXPORT uint32_t ImpellerGetVersion()
Get the version of Impeller standalone API. This is the API that will be accepted for validity checks...
#define IMPELLER_VERSION
Definition: impeller.h:103
static std::string GetVersionAsString(uint32_t version)
Definition: impeller.cc:78
#define VALIDATION_LOG
Definition: validation.h:91

References GetVersionAsString(), IMPELLER_VERSION, ImpellerGetVersion(), and VALIDATION_LOG.

Referenced by ImpellerContextCreateMetalNew(), ImpellerContextCreateOpenGLESNew(), and ImpellerContextCreateVulkanNew().

◆ ContextVKGetInstanceProcAddress()

VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL impeller::interop::ContextVKGetInstanceProcAddress ( VkInstance  instance,
const char *  proc_name 
)

Definition at line 36 of file context_vk.cc.

38  {
40  return sContextVKProcAddressCallback(instance, proc_name);
41  }
42  return nullptr;
43 }
thread_local std::function< PFN_vkVoidFunction(VkInstance instance, const char *proc_name)> sContextVKProcAddressCallback
Definition: context_vk.cc:34

References sContextVKProcAddressCallback.

Referenced by impeller::interop::ContextVK::Create().

◆ Create()

template<typename Object , typename... CtorArgs>
ScopedObject<Object> impeller::interop::Create ( CtorArgs &&...  args)

Definition at line 161 of file object.h.

161  {
162  return ScopedObject<Object>{new Object(std::forward<CtorArgs>(args)...),
163  AdoptTag::kAdopted};
164 }

References kAdopted.

Referenced by impeller::android::testing::CreateContext(), impeller::Pool< T >::Grab(), impeller::android::ProcTable::ProcTable(), and impeller::testing::TEST_P().

◆ CreateShaderLibraryMappings() [1/2]

static std::vector<std::shared_ptr<fml::Mapping> > impeller::interop::CreateShaderLibraryMappings ( )
static

Definition at line 17 of file context_mtl.mm.

17  {
18  return {std::make_shared<fml::NonOwnedMapping>(
19  impeller_entity_shaders_data, impeller_entity_shaders_length),
20  std::make_shared<fml::NonOwnedMapping>(
21  impeller_modern_shaders_data, impeller_modern_shaders_length),
22  std::make_shared<fml::NonOwnedMapping>(
23  impeller_framebuffer_blend_shaders_data,
24  impeller_framebuffer_blend_shaders_length),
25  std::make_shared<fml::NonOwnedMapping>(
26  impeller_compute_shaders_data, impeller_compute_shaders_length)};
27 }

Referenced by impeller::interop::ContextMTL::Create(), and impeller::interop::ContextVK::Create().

◆ CreateShaderLibraryMappings() [2/2]

static std::vector<std::shared_ptr<fml::Mapping> > impeller::interop::CreateShaderLibraryMappings ( )
static

Definition at line 17 of file context_vk.cc.

17  {
18  return {
19  std::make_shared<fml::NonOwnedMapping>(impeller_entity_shaders_vk_data,
20  impeller_entity_shaders_vk_length),
21  std::make_shared<fml::NonOwnedMapping>(impeller_modern_shaders_vk_data,
22  impeller_modern_shaders_vk_length),
23  std::make_shared<fml::NonOwnedMapping>(
24  impeller_framebuffer_blend_shaders_vk_data,
25  impeller_framebuffer_blend_shaders_vk_length),
26  std::make_shared<fml::NonOwnedMapping>(
27  impeller_compute_shaders_vk_data, impeller_compute_shaders_vk_length),
28  };
29 }

◆ CreateTypefaceFromFontData()

static sk_sp<SkTypeface> impeller::interop::CreateTypefaceFromFontData ( std::unique_ptr< fml::Mapping >  font_data)
static

Definition at line 43 of file typography_context.cc.

44  {
45  if (!font_data) {
46  VALIDATION_LOG << "Invalid font data.";
47  return nullptr;
48  }
49  auto sk_data_context = font_data.release();
50  auto sk_data = SkData::MakeWithProc(
51  sk_data_context->GetMapping(), // data ptr
52  sk_data_context->GetSize(), // data size
53  [](const void*, void* context) {
54  delete reinterpret_cast<decltype(sk_data_context)>(context);
55  }, // release callback
56  sk_data_context // release callback context
57  );
58  auto sk_data_stream = SkMemoryStream::Make(sk_data);
59  auto sk_typeface =
60  txt::GetDefaultFontManager()->makeFromStream(std::move(sk_data_stream));
61  if (!sk_typeface) {
62  VALIDATION_LOG << "Could not create typeface with data.";
63  return nullptr;
64  }
65  return sk_typeface;
66 }

References VALIDATION_LOG.

Referenced by impeller::interop::TypographyContext::RegisterFont().

◆ DEFINE_PEER_GETTER() [1/19]

impeller::interop::DEFINE_PEER_GETTER ( ColorFilter  ,
ImpellerColorFilter   
)

◆ DEFINE_PEER_GETTER() [2/19]

impeller::interop::DEFINE_PEER_GETTER ( ColorSource  ,
ImpellerColorSource   
)

◆ DEFINE_PEER_GETTER() [3/19]

impeller::interop::DEFINE_PEER_GETTER ( Context  ,
ImpellerContext   
)

◆ DEFINE_PEER_GETTER() [4/19]

impeller::interop::DEFINE_PEER_GETTER ( DisplayList  ,
ImpellerDisplayList   
)

◆ DEFINE_PEER_GETTER() [5/19]

impeller::interop::DEFINE_PEER_GETTER ( DisplayListBuilder  ,
ImpellerDisplayListBuilder   
)

◆ DEFINE_PEER_GETTER() [6/19]

impeller::interop::DEFINE_PEER_GETTER ( GlyphInfo  ,
ImpellerGlyphInfo   
)

◆ DEFINE_PEER_GETTER() [7/19]

impeller::interop::DEFINE_PEER_GETTER ( ImageFilter  ,
ImpellerImageFilter   
)

◆ DEFINE_PEER_GETTER() [8/19]

impeller::interop::DEFINE_PEER_GETTER ( LineMetrics  ,
ImpellerLineMetrics   
)

◆ DEFINE_PEER_GETTER() [9/19]

impeller::interop::DEFINE_PEER_GETTER ( MaskFilter  ,
ImpellerMaskFilter   
)

◆ DEFINE_PEER_GETTER() [10/19]

impeller::interop::DEFINE_PEER_GETTER ( Paint  ,
ImpellerPaint   
)

◆ DEFINE_PEER_GETTER() [11/19]

impeller::interop::DEFINE_PEER_GETTER ( Paragraph  ,
ImpellerParagraph   
)

◆ DEFINE_PEER_GETTER() [12/19]

impeller::interop::DEFINE_PEER_GETTER ( ParagraphBuilder  ,
ImpellerParagraphBuilder   
)

◆ DEFINE_PEER_GETTER() [13/19]

impeller::interop::DEFINE_PEER_GETTER ( ParagraphStyle  ,
ImpellerParagraphStyle   
)

◆ DEFINE_PEER_GETTER() [14/19]

impeller::interop::DEFINE_PEER_GETTER ( Path  ,
ImpellerPath   
)

◆ DEFINE_PEER_GETTER() [15/19]

impeller::interop::DEFINE_PEER_GETTER ( PathBuilder  ,
ImpellerPathBuilder   
)

◆ DEFINE_PEER_GETTER() [16/19]

impeller::interop::DEFINE_PEER_GETTER ( Surface  ,
ImpellerSurface   
)

◆ DEFINE_PEER_GETTER() [17/19]

impeller::interop::DEFINE_PEER_GETTER ( SwapchainVK  ,
ImpellerVulkanSwapchain   
)

◆ DEFINE_PEER_GETTER() [18/19]

impeller::interop::DEFINE_PEER_GETTER ( Texture  ,
ImpellerTexture   
)

◆ DEFINE_PEER_GETTER() [19/19]

impeller::interop::DEFINE_PEER_GETTER ( TypographyContext  ,
ImpellerTypographyContext   
)

◆ FromImpellerType()

constexpr void impeller::interop::FromImpellerType ( const Matrix from,
ImpellerMatrix to 
)
constexpr

Definition at line 209 of file formats.h.

209  {
210  to.m[0] = from.m[0];
211  to.m[1] = from.m[1];
212  to.m[2] = from.m[2];
213  to.m[3] = from.m[3];
214  to.m[4] = from.m[4];
215  to.m[5] = from.m[5];
216  to.m[6] = from.m[6];
217  to.m[7] = from.m[7];
218  to.m[8] = from.m[8];
219  to.m[9] = from.m[9];
220  to.m[10] = from.m[10];
221  to.m[11] = from.m[11];
222  to.m[12] = from.m[12];
223  to.m[13] = from.m[13];
224  to.m[14] = from.m[14];
225  to.m[15] = from.m[15];
226 }
float m[16]
Definition: impeller.h:516

References impeller::Matrix::m, and ImpellerMatrix::m.

Referenced by ImpellerDisplayListBuilderGetTransform().

◆ GetVersionAsString()

static std::string impeller::interop::GetVersionAsString ( uint32_t  version)
static

Definition at line 78 of file impeller.cc.

78  {
79  std::stringstream stream;
80  stream << IMPELLER_VERSION_GET_VARIANT(version) << "."
81  << IMPELLER_VERSION_GET_MAJOR(version) << "."
82  << IMPELLER_VERSION_GET_MINOR(version) << "."
83  << IMPELLER_VERSION_GET_PATCH(version);
84  return stream.str();
85 }
#define IMPELLER_VERSION_GET_PATCH(version)
Definition: impeller.h:135
#define IMPELLER_VERSION_GET_MAJOR(version)
Definition: impeller.h:119
#define IMPELLER_VERSION_GET_VARIANT(version)
Definition: impeller.h:112
#define IMPELLER_VERSION_GET_MINOR(version)
Definition: impeller.h:127

References IMPELLER_VERSION_GET_MAJOR, IMPELLER_VERSION_GET_MINOR, IMPELLER_VERSION_GET_PATCH, and IMPELLER_VERSION_GET_VARIANT.

Referenced by CheckVersion().

◆ ImpellerColorFilterCreateBlendNew()

IMPELLER_EXTERN_C ImpellerColorFilter impeller::interop::ImpellerColorFilterCreateBlendNew ( const ImpellerColor color,
ImpellerBlendMode  blend_mode 
)

Definition at line 959 of file impeller.cc.

961  {
962  return ColorFilter::MakeBlend(ToImpellerType(*color),
963  ToImpellerType(blend_mode))
964  .Leak();
965 }
constexpr Matrix ToImpellerType(const ImpellerMatrix &m)
Definition: formats.h:201

References impeller::interop::ColorFilter::MakeBlend(), and ToImpellerType().

◆ ImpellerColorFilterCreateColorMatrixNew()

IMPELLER_EXTERN_C ImpellerColorFilter impeller::interop::ImpellerColorFilterCreateColorMatrixNew ( const ImpellerColorMatrix color_matrix)

Definition at line 968 of file impeller.cc.

969  {
970  return ColorFilter::MakeMatrix(color_matrix->m).Leak();
971 }

References ImpellerColorMatrix::m, and impeller::interop::ColorFilter::MakeMatrix().

◆ ImpellerColorFilterRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerColorFilterRelease ( ImpellerColorFilter  color_filter)

Definition at line 954 of file impeller.cc.

954  {
955  ObjectBase::SafeRelease(color_filter);
956 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerColorFilterRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerColorFilterRetain ( ImpellerColorFilter  color_filter)

Definition at line 949 of file impeller.cc.

949  {
950  ObjectBase::SafeRetain(color_filter);
951 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerColorSourceCreateConicalGradientNew()

IMPELLER_EXTERN_C ImpellerColorSource impeller::interop::ImpellerColorSourceCreateConicalGradientNew ( const ImpellerPoint start_center,
float  start_radius,
const ImpellerPoint end_center,
float  end_radius,
uint32_t  stop_count,
const ImpellerColor colors,
const float *  stops,
ImpellerTileMode  tile_mode,
const ImpellerMatrix transformation 
)

Definition at line 881 of file impeller.cc.

890  {
891  const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
892  return ColorSource::MakeConicalGradient(
893  ToImpellerType(*start_center), //
894  start_radius, //
895  ToImpellerType(*end_center), //
896  end_radius, //
897  colors_and_stops.first, //
898  colors_and_stops.second, //
899  ToDisplayListType(tile_mode), //
900  transformation == nullptr ? Matrix{}
901  : ToImpellerType(*transformation) //
902  )
903  .Leak();
904 }
static std::pair< std::vector< flutter::DlColor >, std::vector< Scalar > > ParseColorsAndStops(uint32_t stop_count, const ImpellerColor *colors, const float *stops)
Definition: impeller.cc:820
constexpr flutter::DlColor ToDisplayListType(Color color)
Definition: formats.h:77

References impeller::interop::ColorSource::MakeConicalGradient(), ParseColorsAndStops(), ToDisplayListType(), and ToImpellerType().

◆ ImpellerColorSourceCreateImageNew()

IMPELLER_EXTERN_C ImpellerColorSource impeller::interop::ImpellerColorSourceCreateImageNew ( ImpellerTexture  image,
ImpellerTileMode  horizontal_tile_mode,
ImpellerTileMode  vertical_tile_mode,
ImpellerTextureSampling  sampling,
const ImpellerMatrix transformation 
)

Definition at line 931 of file impeller.cc.

936  {
937  return ColorSource::MakeImage(
938  *GetPeer(image), //
939  ToDisplayListType(horizontal_tile_mode), //
940  ToDisplayListType(vertical_tile_mode), //
941  ToDisplayListType(sampling), //
942  transformation == nullptr ? Matrix{}
943  : ToImpellerType(*transformation) //
944  )
945  .Leak();
946 }

References impeller::interop::ColorSource::MakeImage(), ToDisplayListType(), and ToImpellerType().

◆ ImpellerColorSourceCreateLinearGradientNew()

IMPELLER_EXTERN_C ImpellerColorSource impeller::interop::ImpellerColorSourceCreateLinearGradientNew ( const ImpellerPoint start_point,
const ImpellerPoint end_point,
uint32_t  stop_count,
const ImpellerColor colors,
const float *  stops,
ImpellerTileMode  tile_mode,
const ImpellerMatrix transformation 
)

Definition at line 837 of file impeller.cc.

844  {
845  const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
846  return ColorSource::MakeLinearGradient(
847  ToImpellerType(*start_point), //
848  ToImpellerType(*end_point), //
849  colors_and_stops.first, //
850  colors_and_stops.second, //
851  ToDisplayListType(tile_mode), //
852  transformation == nullptr ? Matrix{}
853  : ToImpellerType(*transformation) //
854  )
855  .Leak();
856 }

References impeller::interop::ColorSource::MakeLinearGradient(), ParseColorsAndStops(), ToDisplayListType(), and ToImpellerType().

◆ ImpellerColorSourceCreateRadialGradientNew()

IMPELLER_EXTERN_C ImpellerColorSource impeller::interop::ImpellerColorSourceCreateRadialGradientNew ( const ImpellerPoint center,
float  radius,
uint32_t  stop_count,
const ImpellerColor colors,
const float *  stops,
ImpellerTileMode  tile_mode,
const ImpellerMatrix transformation 
)

Definition at line 859 of file impeller.cc.

866  {
867  const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
868  return ColorSource::MakeRadialGradient(
869  ToImpellerType(*center), //
870  radius, //
871  colors_and_stops.first, //
872  colors_and_stops.second, //
873  ToDisplayListType(tile_mode), //
874  transformation == nullptr ? Matrix{}
875  : ToImpellerType(*transformation) //
876  )
877  .Leak();
878 }

References impeller::interop::ColorSource::MakeRadialGradient(), ParseColorsAndStops(), ToDisplayListType(), and ToImpellerType().

◆ ImpellerColorSourceCreateSweepGradientNew()

IMPELLER_EXTERN_C ImpellerColorSource impeller::interop::ImpellerColorSourceCreateSweepGradientNew ( const ImpellerPoint center,
float  start,
float  end,
uint32_t  stop_count,
const ImpellerColor colors,
const float *  stops,
ImpellerTileMode  tile_mode,
const ImpellerMatrix transformation 
)

Definition at line 907 of file impeller.cc.

915  {
916  const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
917  return ColorSource::MakeSweepGradient(
918  ToImpellerType(*center), //
919  start, //
920  end, //
921  colors_and_stops.first, //
922  colors_and_stops.second, //
923  ToDisplayListType(tile_mode), //
924  transformation == nullptr ? Matrix{}
925  : ToImpellerType(*transformation) //
926  )
927  .Leak();
928 }

References impeller::interop::ColorSource::MakeSweepGradient(), ParseColorsAndStops(), ToDisplayListType(), and ToImpellerType().

◆ ImpellerColorSourceRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerColorSourceRelease ( ImpellerColorSource  color_source)

Definition at line 815 of file impeller.cc.

815  {
816  ObjectBase::SafeRelease(color_source);
817 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerColorSourceRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerColorSourceRetain ( ImpellerColorSource  color_source)

Definition at line 810 of file impeller.cc.

810  {
811  ObjectBase::SafeRetain(color_source);
812 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerContextCreateMetalNew()

IMPELLER_EXTERN_C ImpellerContext impeller::interop::ImpellerContextCreateMetalNew ( uint32_t  version)

Definition at line 129 of file impeller.cc.

130  {
131  if (!CheckVersion(version)) {
132  return nullptr;
133  }
134 #if IMPELLER_ENABLE_METAL
135  auto context = ContextMTL::Create();
136  if (!context || !context->IsValid()) {
137  VALIDATION_LOG << "Could not create valid context.";
138  return nullptr;
139  }
140  return context.Leak();
141 #else // IMPELLER_ENABLE_METAL
142  VALIDATION_LOG << "Metal not available.";
143  return nullptr;
144 #endif // IMPELLER_ENABLE_METAL
145 }
static bool CheckVersion(uint32_t version)
Definition: impeller.cc:92
ScopedObject< Object > Create(CtorArgs &&... args)
Definition: object.h:161

References CheckVersion(), impeller::interop::ContextMTL::Create(), and VALIDATION_LOG.

Referenced by impeller::interop::testing::PlaygroundTest::CreateContext().

◆ ImpellerContextCreateOpenGLESNew()

IMPELLER_EXTERN_C ImpellerContext impeller::interop::ImpellerContextCreateOpenGLESNew ( uint32_t  version,
ImpellerProcAddressCallback  gl_proc_address_callback,
void *  gl_proc_address_callback_user_data 
)

Definition at line 104 of file impeller.cc.

107  {
108  if (!CheckVersion(version)) {
109  return nullptr;
110  }
111 #if IMPELLER_ENABLE_OPENGLES
112  auto context = ContextGLES::Create(
113  [gl_proc_address_callback,
114  gl_proc_address_callback_user_data](const char* proc_name) -> void* {
115  return gl_proc_address_callback(proc_name,
116  gl_proc_address_callback_user_data);
117  });
118  if (!context || !context->IsValid()) {
119  VALIDATION_LOG << "Could not create valid context.";
120  return nullptr;
121  }
122  return context.Leak();
123 #else // IMPELLER_ENABLE_OPENGLES
124  VALIDATION_LOG << "OpenGLES not available.";
125  return nullptr;
126 #endif // IMPELLER_ENABLE_OPENGLES
127 }

References CheckVersion(), impeller::interop::ContextGLES::Create(), and VALIDATION_LOG.

Referenced by impeller::interop::testing::PlaygroundTest::CreateContext().

◆ ImpellerContextCreateVulkanNew()

IMPELLER_EXTERN_C ImpellerContext impeller::interop::ImpellerContextCreateVulkanNew ( uint32_t  version,
const ImpellerContextVulkanSettings settings 
)

Definition at line 147 of file impeller.cc.

149  {
150  if (!CheckVersion(version)) {
151  return nullptr;
152  }
153 #if IMPELLER_ENABLE_VULKAN
154  auto context = ContextVK::Create(ContextVK::Settings(*settings));
155  if (!context || !context->IsValid()) {
156  VALIDATION_LOG << "Could not create valid context.";
157  return nullptr;
158  }
159  return context.Leak();
160 #else // IMPELLER_ENABLE_VULKAN
161  VALIDATION_LOG << "Vulkan not available.";
162  return nullptr;
163 #endif // IMPELLER_ENABLE_VULKAN
164 }

References CheckVersion(), impeller::interop::ContextVK::Create(), and VALIDATION_LOG.

Referenced by impeller::interop::testing::PlaygroundTest::CreateContext().

◆ ImpellerContextGetVulkanInfo()

IMPELLER_EXTERN_C bool impeller::interop::ImpellerContextGetVulkanInfo ( ImpellerContext IMPELLER_NONNULL  context,
ImpellerContextVulkanInfo out_vulkan_info 
)

Definition at line 177 of file impeller.cc.

178  {
179 #if IMPELLER_ENABLE_VULKAN
180  if (!GetPeer(context)->IsVulkan()) {
181  VALIDATION_LOG << "Not a Vulkan context.";
182  return false;
183  }
184  return reinterpret_cast<ContextVK*>(GetPeer(context))
185  ->GetInfo(*out_vulkan_info);
186 #else // IMPELLER_ENABLE_VULKAN
187  VALIDATION_LOG << "Vulkan not available.";
188  return nullptr;
189 #endif // IMPELLER_ENABLE_VULKAN
190 }

References VALIDATION_LOG.

◆ ImpellerContextRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerContextRelease ( ImpellerContext  context)

Definition at line 172 of file impeller.cc.

172  {
173  ObjectBase::SafeRelease(context);
174 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerContextRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerContextRetain ( ImpellerContext  context)

Definition at line 167 of file impeller.cc.

167  {
168  ObjectBase::SafeRetain(context);
169 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerDisplayListBuilderClipOval()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderClipOval ( ImpellerDisplayListBuilder  builder,
const ImpellerRect oval_bounds,
ImpellerClipOperation  op 
)

Definition at line 430 of file impeller.cc.

432  {
433  GetPeer(builder)->ClipOval(ToImpellerType(*oval_bounds), ToImpellerType(op));
434 }

References ToImpellerType().

◆ ImpellerDisplayListBuilderClipPath()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderClipPath ( ImpellerDisplayListBuilder  builder,
ImpellerPath  path,
ImpellerClipOperation  op 
)

Definition at line 449 of file impeller.cc.

451  {
452  GetPeer(builder)->ClipPath(*GetPeer(path), ToImpellerType(op));
453 }

References ToImpellerType().

◆ ImpellerDisplayListBuilderClipRect()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderClipRect ( ImpellerDisplayListBuilder  builder,
const ImpellerRect rect,
ImpellerClipOperation  op 
)

Definition at line 423 of file impeller.cc.

425  {
426  GetPeer(builder)->ClipRect(ToImpellerType(*rect), ToImpellerType(op));
427 }

References ToImpellerType().

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerDisplayListBuilderClipRoundedRect()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderClipRoundedRect ( ImpellerDisplayListBuilder  builder,
const ImpellerRect rect,
const ImpellerRoundingRadii radii,
ImpellerClipOperation  op 
)

Definition at line 437 of file impeller.cc.

441  {
442  GetPeer(builder)->ClipRoundedRect(ToImpellerType(*rect), //
443  ToImpellerType(*radii), //
444  ToImpellerType(op) //
445  );
446 }

References ToImpellerType().

◆ ImpellerDisplayListBuilderCreateDisplayListNew()

IMPELLER_EXTERN_C ImpellerDisplayList impeller::interop::ImpellerDisplayListBuilderCreateDisplayListNew ( ImpellerDisplayListBuilder  builder)

Definition at line 706 of file impeller.cc.

707  {
708  auto dl = GetPeer(builder)->Build();
709  if (!dl->IsValid()) {
710  return nullptr;
711  }
712  return dl.Leak();
713 }

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerDisplayListBuilderDrawDashedLine()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawDashedLine ( ImpellerDisplayListBuilder  builder,
const ImpellerPoint from,
const ImpellerPoint to,
float  on_length,
float  off_length,
ImpellerPaint  paint 
)

Definition at line 523 of file impeller.cc.

529  {
530  GetPeer(builder)->DrawDashedLine(ToImpellerType(*from), //
531  ToImpellerType(*to), //
532  on_length, //
533  off_length, //
534  *GetPeer(paint) //
535  );
536 }

References ToImpellerType().

◆ ImpellerDisplayListBuilderDrawDisplayList()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawDisplayList ( ImpellerDisplayListBuilder  builder,
ImpellerDisplayList  display_list,
float  opacity 
)

Definition at line 716 of file impeller.cc.

719  {
720  GetPeer(builder)->DrawDisplayList(*GetPeer(display_list), opacity);
721 }

◆ ImpellerDisplayListBuilderDrawLine()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawLine ( ImpellerDisplayListBuilder  builder,
const ImpellerPoint from,
const ImpellerPoint to,
ImpellerPaint  paint 
)

Definition at line 512 of file impeller.cc.

515  {
516  GetPeer(builder)->DrawLine(ToImpellerType(*from), //
517  ToImpellerType(*to), //
518  *GetPeer(paint) //
519  );
520 }

References ToImpellerType().

◆ ImpellerDisplayListBuilderDrawOval()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawOval ( ImpellerDisplayListBuilder  builder,
const ImpellerRect oval_bounds,
ImpellerPaint  paint 
)

Definition at line 546 of file impeller.cc.

548  {
549  GetPeer(builder)->DrawOval(ToImpellerType(*oval_bounds), *GetPeer(paint));
550 }

References ToImpellerType().

◆ ImpellerDisplayListBuilderDrawPaint()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawPaint ( ImpellerDisplayListBuilder  builder,
ImpellerPaint  paint 
)

Definition at line 506 of file impeller.cc.

507  {
508  GetPeer(builder)->DrawPaint(*GetPeer(paint));
509 }

◆ ImpellerDisplayListBuilderDrawParagraph()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawParagraph ( ImpellerDisplayListBuilder  builder,
ImpellerParagraph  paragraph,
const ImpellerPoint point 
)

Definition at line 1151 of file impeller.cc.

1153  {
1154  GetPeer(builder)->DrawParagraph(*GetPeer(paragraph), ToImpellerType(*point));
1155 }

References ToImpellerType().

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerDisplayListBuilderDrawPath()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawPath ( ImpellerDisplayListBuilder  builder,
ImpellerPath  path,
ImpellerPaint  paint 
)

Definition at line 581 of file impeller.cc.

583  {
584  GetPeer(builder)->DrawPath(*GetPeer(path), *GetPeer(paint));
585 }

◆ ImpellerDisplayListBuilderDrawRect()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawRect ( ImpellerDisplayListBuilder  builder,
const ImpellerRect rect,
ImpellerPaint  paint 
)

Definition at line 539 of file impeller.cc.

541  {
542  GetPeer(builder)->DrawRect(ToImpellerType(*rect), *GetPeer(paint));
543 }

References ToImpellerType().

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerDisplayListBuilderDrawRoundedRect()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawRoundedRect ( ImpellerDisplayListBuilder  builder,
const ImpellerRect rect,
const ImpellerRoundingRadii radii,
ImpellerPaint  paint 
)

Definition at line 553 of file impeller.cc.

557  {
558  GetPeer(builder)->DrawRoundedRect(ToImpellerType(*rect), //
559  ToImpellerType(*radii), //
560  *GetPeer(paint) //
561  );
562 }

References ToImpellerType().

◆ ImpellerDisplayListBuilderDrawRoundedRectDifference()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawRoundedRectDifference ( ImpellerDisplayListBuilder  builder,
const ImpellerRect outer_rect,
const ImpellerRoundingRadii outer_radii,
const ImpellerRect inner_rect,
const ImpellerRoundingRadii inner_radii,
ImpellerPaint  paint 
)

Definition at line 565 of file impeller.cc.

571  {
572  GetPeer(builder)->DrawRoundedRectDifference(ToImpellerType(*outer_rect), //
573  ToImpellerType(*outer_radii), //
574  ToImpellerType(*inner_rect), //
575  ToImpellerType(*inner_radii), //
576  *GetPeer(paint) //
577  );
578 }

References ToImpellerType().

◆ ImpellerDisplayListBuilderDrawShadow()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawShadow ( ImpellerDisplayListBuilder  builder,
ImpellerPath  path,
const ImpellerColor color,
float  elevation,
bool  occluder_is_transparent,
float  device_pixel_ratio 
)

Definition at line 1158 of file impeller.cc.

1163  {
1164  GetPeer(builder)->DrawShadow(*GetPeer(path), //
1165  ToDisplayListType(*color), //
1166  elevation, //
1167  occluder_is_transparent, //
1168  device_pixel_ratio //
1169  );
1170 }

References ToDisplayListType().

◆ ImpellerDisplayListBuilderDrawTexture()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawTexture ( ImpellerDisplayListBuilder  builder,
ImpellerTexture  texture,
const ImpellerPoint point,
ImpellerTextureSampling  sampling,
ImpellerPaint  paint 
)

Definition at line 781 of file impeller.cc.

785  {
786  GetPeer(builder)->DrawTexture(*GetPeer(texture), //
787  ToImpellerType(*point), //
788  ToDisplayListType(sampling), //
789  GetPeer(paint) //
790  );
791 }

References ToDisplayListType(), and ToImpellerType().

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerDisplayListBuilderDrawTextureRect()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderDrawTextureRect ( ImpellerDisplayListBuilder  builder,
ImpellerTexture  texture,
const ImpellerRect src_rect,
const ImpellerRect dst_rect,
ImpellerTextureSampling  sampling,
ImpellerPaint  paint 
)

Definition at line 794 of file impeller.cc.

800  {
801  GetPeer(builder)->DrawTextureRect(*GetPeer(texture), //
802  ToImpellerType(*src_rect), //
803  ToImpellerType(*dst_rect), //
804  ToDisplayListType(sampling), //
805  GetPeer(paint) //
806  );
807 }

References ToDisplayListType(), and ToImpellerType().

◆ ImpellerDisplayListBuilderGetSaveCount()

IMPELLER_EXTERN_C uint32_t impeller::interop::ImpellerDisplayListBuilderGetSaveCount ( ImpellerDisplayListBuilder  builder)

Definition at line 305 of file impeller.cc.

306  {
307  return GetPeer(builder)->GetSaveCount();
308 }

◆ ImpellerDisplayListBuilderGetTransform()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderGetTransform ( ImpellerDisplayListBuilder  builder,
ImpellerMatrix out_transform 
)

Definition at line 293 of file impeller.cc.

294  {
295  FromImpellerType(GetPeer(builder)->GetTransform(), *out_transform);
296 }
constexpr void FromImpellerType(const Matrix &from, ImpellerMatrix &to)
Definition: formats.h:209

References FromImpellerType().

◆ ImpellerDisplayListBuilderNew()

IMPELLER_EXTERN_C ImpellerDisplayListBuilder impeller::interop::ImpellerDisplayListBuilderNew ( const ImpellerRect cull_rect)

Definition at line 224 of file impeller.cc.

225  {
226  return Create<DisplayListBuilder>(cull_rect).Leak();
227 }

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerDisplayListBuilderRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderRelease ( ImpellerDisplayListBuilder  builder)

Definition at line 235 of file impeller.cc.

235  {
236  ObjectBase::SafeRelease(builder);
237 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerDisplayListBuilderResetTransform()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderResetTransform ( ImpellerDisplayListBuilder  builder)

Definition at line 299 of file impeller.cc.

300  {
301  GetPeer(builder)->ResetTransform();
302 }

◆ ImpellerDisplayListBuilderRestore()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderRestore ( ImpellerDisplayListBuilder  builder)

Definition at line 256 of file impeller.cc.

256  {
257  GetPeer(builder)->Restore();
258 }

◆ ImpellerDisplayListBuilderRestoreToCount()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderRestoreToCount ( ImpellerDisplayListBuilder  builder,
uint32_t  count 
)

Definition at line 311 of file impeller.cc.

313  {
314  GetPeer(builder)->RestoreToCount(count);
315 }

◆ ImpellerDisplayListBuilderRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderRetain ( ImpellerDisplayListBuilder  builder)

Definition at line 230 of file impeller.cc.

230  {
231  ObjectBase::SafeRetain(builder);
232 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerDisplayListBuilderRotate()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderRotate ( ImpellerDisplayListBuilder  builder,
float  angle_degrees 
)

Definition at line 268 of file impeller.cc.

269  {
270  GetPeer(builder)->Rotate(Degrees{angle_degrees});
271 }

◆ ImpellerDisplayListBuilderSave()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderSave ( ImpellerDisplayListBuilder  builder)

Definition at line 240 of file impeller.cc.

240  {
241  GetPeer(builder)->Save();
242 }

◆ ImpellerDisplayListBuilderSaveLayer()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderSaveLayer ( ImpellerDisplayListBuilder  builder,
const ImpellerRect bounds,
ImpellerPaint  paint,
ImpellerImageFilter  backdrop 
)

Definition at line 245 of file impeller.cc.

248  {
249  GetPeer(builder)->SaveLayer(ToImpellerType(*bounds), //
250  GetPeer(paint), //
251  GetPeer(backdrop) //
252  );
253 }

References ToImpellerType().

◆ ImpellerDisplayListBuilderScale()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderScale ( ImpellerDisplayListBuilder  builder,
float  x_scale,
float  y_scale 
)

Definition at line 261 of file impeller.cc.

263  {
264  GetPeer(builder)->Scale(Size{x_scale, y_scale});
265 }
TSize< Scalar > Size
Definition: size.h:159

◆ ImpellerDisplayListBuilderSetTransform()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderSetTransform ( ImpellerDisplayListBuilder  builder,
const ImpellerMatrix transform 
)

Definition at line 281 of file impeller.cc.

282  {
283  GetPeer(builder)->SetTransform(ToImpellerType(*transform));
284 }

References ToImpellerType(), and transform.

◆ ImpellerDisplayListBuilderTransform()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderTransform ( ImpellerDisplayListBuilder  builder,
const ImpellerMatrix transform 
)

Definition at line 287 of file impeller.cc.

288  {
289  GetPeer(builder)->Transform(ToImpellerType(*transform));
290 }

References ToImpellerType(), and transform.

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerDisplayListBuilderTranslate()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListBuilderTranslate ( ImpellerDisplayListBuilder  builder,
float  x_translation,
float  y_translation 
)

Definition at line 274 of file impeller.cc.

276  {
277  GetPeer(builder)->Translate(Point{x_translation, y_translation});
278 }
TPoint< Scalar > Point
Definition: point.h:327

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerDisplayListRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListRelease ( ImpellerDisplayList  display_list)

Definition at line 701 of file impeller.cc.

701  {
702  ObjectBase::SafeRelease(display_list);
703 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerDisplayListRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerDisplayListRetain ( ImpellerDisplayList  display_list)

Definition at line 696 of file impeller.cc.

696  {
697  ObjectBase::SafeRetain(display_list);
698 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerGetVersion()

IMPELLER_EXTERN_C uint32_t impeller::interop::ImpellerGetVersion ( )

Definition at line 88 of file impeller.cc.

88  {
89  return IMPELLER_VERSION;
90 }

References IMPELLER_VERSION.

Referenced by CheckVersion(), and impeller::interop::testing::PlaygroundTest::CreateContext().

◆ ImpellerGlyphInfoGetGraphemeClusterBounds()

IMPELLER_EXTERN_C ImpellerRect impeller::interop::ImpellerGlyphInfoGetGraphemeClusterBounds ( ImpellerGlyphInfo  glyph_info)

Definition at line 1456 of file impeller.cc.

1457  {
1458  return GetPeer(glyph_info)->GetGraphemeClusterBounds();
1459 }

◆ ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeBegin()

IMPELLER_EXTERN_C size_t impeller::interop::ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeBegin ( ImpellerGlyphInfo  glyph_info)

Definition at line 1444 of file impeller.cc.

1445  {
1446  return GetPeer(glyph_info)->GetGraphemeClusterCodeUnitRangeBegin();
1447 }

◆ ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeEnd()

IMPELLER_EXTERN_C size_t impeller::interop::ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeEnd ( ImpellerGlyphInfo  glyph_info)

Definition at line 1450 of file impeller.cc.

1451  {
1452  return GetPeer(glyph_info)->GetGraphemeClusterCodeUnitRangeEnd();
1453 }

◆ ImpellerGlyphInfoGetTextDirection()

IMPELLER_EXTERN_C ImpellerTextDirection impeller::interop::ImpellerGlyphInfoGetTextDirection ( ImpellerGlyphInfo  glyph_info)

Definition at line 1467 of file impeller.cc.

1468  {
1469  return GetPeer(glyph_info)->GetTextDirection();
1470 }

◆ ImpellerGlyphInfoIsEllipsis()

IMPELLER_EXTERN_C bool impeller::interop::ImpellerGlyphInfoIsEllipsis ( ImpellerGlyphInfo  glyph_info)

Definition at line 1462 of file impeller.cc.

1462  {
1463  return GetPeer(glyph_info)->IsEllipsis();
1464 }

◆ ImpellerGlyphInfoRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerGlyphInfoRelease ( ImpellerGlyphInfo  glyph_info)

Definition at line 1439 of file impeller.cc.

1439  {
1440  ObjectBase::SafeRelease(glyph_info);
1441 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerGlyphInfoRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerGlyphInfoRetain ( ImpellerGlyphInfo  glyph_info)

Definition at line 1434 of file impeller.cc.

1434  {
1435  ObjectBase::SafeRetain(glyph_info);
1436 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerImageFilterCreateBlurNew()

IMPELLER_EXTERN_C ImpellerImageFilter impeller::interop::ImpellerImageFilterCreateBlurNew ( float  x_sigma,
float  y_sigma,
ImpellerTileMode  tile_mode 
)

Definition at line 1000 of file impeller.cc.

1003  {
1004  return ImageFilter::MakeBlur(x_sigma, y_sigma, ToDisplayListType(tile_mode))
1005  .Leak();
1006 }

References impeller::interop::ImageFilter::MakeBlur(), and ToDisplayListType().

◆ ImpellerImageFilterCreateComposeNew()

IMPELLER_EXTERN_C ImpellerImageFilter impeller::interop::ImpellerImageFilterCreateComposeNew ( ImpellerImageFilter  outer,
ImpellerImageFilter  inner 
)

Definition at line 1030 of file impeller.cc.

1032  {
1033  return ImageFilter::MakeCompose(*GetPeer(outer), *GetPeer(inner)).Leak();
1034 }

References impeller::interop::ImageFilter::MakeCompose().

◆ ImpellerImageFilterCreateDilateNew()

IMPELLER_EXTERN_C ImpellerImageFilter impeller::interop::ImpellerImageFilterCreateDilateNew ( float  x_radius,
float  y_radius 
)

Definition at line 1009 of file impeller.cc.

1010  {
1011  return ImageFilter::MakeDilate(x_radius, y_radius).Leak();
1012 }

References impeller::interop::ImageFilter::MakeDilate().

◆ ImpellerImageFilterCreateErodeNew()

IMPELLER_EXTERN_C ImpellerImageFilter impeller::interop::ImpellerImageFilterCreateErodeNew ( float  x_radius,
float  y_radius 
)

Definition at line 1015 of file impeller.cc.

1016  {
1017  return ImageFilter::MakeErode(x_radius, y_radius).Leak();
1018 }

References impeller::interop::ImageFilter::MakeErode().

◆ ImpellerImageFilterCreateMatrixNew()

IMPELLER_EXTERN_C ImpellerImageFilter impeller::interop::ImpellerImageFilterCreateMatrixNew ( const ImpellerMatrix matrix,
ImpellerTextureSampling  sampling 
)

Definition at line 1021 of file impeller.cc.

1023  {
1024  return ImageFilter::MakeMatrix(ToImpellerType(*matrix),
1025  ToDisplayListType(sampling))
1026  .Leak();
1027 }

References impeller::interop::ImageFilter::MakeMatrix(), ToDisplayListType(), and ToImpellerType().

◆ ImpellerImageFilterRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerImageFilterRelease ( ImpellerImageFilter  image_filter)

Definition at line 995 of file impeller.cc.

995  {
996  ObjectBase::SafeRelease(image_filter);
997 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerImageFilterRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerImageFilterRetain ( ImpellerImageFilter  image_filter)

Definition at line 990 of file impeller.cc.

990  {
991  ObjectBase::SafeRetain(image_filter);
992 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerLineMetricsGetAscent()

IMPELLER_EXTERN_C double impeller::interop::ImpellerLineMetricsGetAscent ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1368 of file impeller.cc.

1368  {
1369  return GetPeer(metrics)->GetAscent(line);
1370 }

◆ ImpellerLineMetricsGetBaseline()

IMPELLER_EXTERN_C double impeller::interop::ImpellerLineMetricsGetBaseline ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1378 of file impeller.cc.

1379  {
1380  return GetPeer(metrics)->GetBaseline(line);
1381 }

◆ ImpellerLineMetricsGetCodeUnitEndIndex()

IMPELLER_EXTERN_C size_t impeller::interop::ImpellerLineMetricsGetCodeUnitEndIndex ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1410 of file impeller.cc.

1411  {
1412  return GetPeer(metrics)->GetCodeUnitEndIndex(line);
1413 }

◆ ImpellerLineMetricsGetCodeUnitEndIndexExcludingWhitespace()

IMPELLER_EXTERN_C size_t impeller::interop::ImpellerLineMetricsGetCodeUnitEndIndexExcludingWhitespace ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1416 of file impeller.cc.

1418  {
1419  return GetPeer(metrics)->GetCodeUnitEndIndexExcludingWhitespace(line);
1420 }

◆ ImpellerLineMetricsGetCodeUnitEndIndexIncludingNewline()

IMPELLER_EXTERN_C size_t impeller::interop::ImpellerLineMetricsGetCodeUnitEndIndexIncludingNewline ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1423 of file impeller.cc.

1425  {
1426  return GetPeer(metrics)->GetCodeUnitEndIndexIncludingNewline(line);
1427 }

◆ ImpellerLineMetricsGetCodeUnitStartIndex()

IMPELLER_EXTERN_C size_t impeller::interop::ImpellerLineMetricsGetCodeUnitStartIndex ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1404 of file impeller.cc.

1405  {
1406  return GetPeer(metrics)->GetCodeUnitStartIndex(line);
1407 }

◆ ImpellerLineMetricsGetDescent()

IMPELLER_EXTERN_C double impeller::interop::ImpellerLineMetricsGetDescent ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1373 of file impeller.cc.

1373  {
1374  return GetPeer(metrics)->GetDescent(line);
1375 }

◆ ImpellerLineMetricsGetHeight()

IMPELLER_EXTERN_C double impeller::interop::ImpellerLineMetricsGetHeight ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1394 of file impeller.cc.

1394  {
1395  return GetPeer(metrics)->GetHeight(line);
1396 }

◆ ImpellerLineMetricsGetLeft()

IMPELLER_EXTERN_C double impeller::interop::ImpellerLineMetricsGetLeft ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1399 of file impeller.cc.

1399  {
1400  return GetPeer(metrics)->GetLeft(line);
1401 }

◆ ImpellerLineMetricsGetUnscaledAscent()

IMPELLER_EXTERN_C double impeller::interop::ImpellerLineMetricsGetUnscaledAscent ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1362 of file impeller.cc.

1363  {
1364  return GetPeer(metrics)->GetUnscaledAscent(line);
1365 }

◆ ImpellerLineMetricsGetWidth()

IMPELLER_EXTERN_C double impeller::interop::ImpellerLineMetricsGetWidth ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1389 of file impeller.cc.

1389  {
1390  return GetPeer(metrics)->GetWidth(line);
1391 }

◆ ImpellerLineMetricsIsHardbreak()

IMPELLER_EXTERN_C bool impeller::interop::ImpellerLineMetricsIsHardbreak ( ImpellerLineMetrics  metrics,
size_t  line 
)

Definition at line 1384 of file impeller.cc.

1384  {
1385  return GetPeer(metrics)->IsHardbreak(line);
1386 }

◆ ImpellerLineMetricsRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerLineMetricsRelease ( ImpellerLineMetrics  line_metrics)

Definition at line 1357 of file impeller.cc.

1357  {
1358  ObjectBase::SafeRelease(line_metrics);
1359 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerLineMetricsRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerLineMetricsRetain ( ImpellerLineMetrics  line_metrics)

Definition at line 1352 of file impeller.cc.

1352  {
1353  ObjectBase::SafeRetain(line_metrics);
1354 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerMaskFilterCreateBlurNew()

IMPELLER_EXTERN_C ImpellerMaskFilter impeller::interop::ImpellerMaskFilterCreateBlurNew ( ImpellerBlurStyle  style,
float  sigma 
)

Definition at line 984 of file impeller.cc.

985  {
986  return MaskFilter::MakeBlur(ToDisplayListType(style), sigma).Leak();
987 }

References impeller::interop::MaskFilter::MakeBlur(), and ToDisplayListType().

◆ ImpellerMaskFilterRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerMaskFilterRelease ( ImpellerMaskFilter  mask_filter)

Definition at line 979 of file impeller.cc.

979  {
980  ObjectBase::SafeRelease(mask_filter);
981 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerMaskFilterRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerMaskFilterRetain ( ImpellerMaskFilter  mask_filter)

Definition at line 974 of file impeller.cc.

974  {
975  ObjectBase::SafeRetain(mask_filter);
976 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerPaintNew()

IMPELLER_EXTERN_C ImpellerPaint impeller::interop::ImpellerPaintNew ( )

Definition at line 456 of file impeller.cc.

456  {
457  return Create<Paint>().Leak();
458 }

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerPaintRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintRelease ( ImpellerPaint  paint)

Definition at line 466 of file impeller.cc.

466  {
467  ObjectBase::SafeRelease(paint);
468 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerPaintRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintRetain ( ImpellerPaint  paint)

Definition at line 461 of file impeller.cc.

461  {
462  ObjectBase::SafeRetain(paint);
463 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerPaintSetBlendMode()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintSetBlendMode ( ImpellerPaint  paint,
ImpellerBlendMode  mode 
)

Definition at line 476 of file impeller.cc.

476  {
477  GetPeer(paint)->SetBlendMode(ToImpellerType(mode));
478 }

References ToImpellerType().

◆ ImpellerPaintSetColor()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintSetColor ( ImpellerPaint  paint,
const ImpellerColor color 
)

Definition at line 471 of file impeller.cc.

471  {
472  GetPeer(paint)->SetColor(ToDisplayListType(*color));
473 }

References ToDisplayListType().

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerPaintSetColorFilter()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintSetColorFilter ( ImpellerPaint  paint,
ImpellerColorFilter  color_filter 
)

Definition at line 1037 of file impeller.cc.

1038  {
1039  GetPeer(paint)->SetColorFilter(*GetPeer(color_filter));
1040 }

◆ ImpellerPaintSetColorSource()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintSetColorSource ( ImpellerPaint  paint,
ImpellerColorSource  color_source 
)

Definition at line 1043 of file impeller.cc.

1044  {
1045  GetPeer(paint)->SetColorSource(*GetPeer(color_source));
1046 }

◆ ImpellerPaintSetDrawStyle()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintSetDrawStyle ( ImpellerPaint  paint,
ImpellerDrawStyle  style 
)

Definition at line 481 of file impeller.cc.

481  {
482  GetPeer(paint)->SetDrawStyle(ToDisplayListType(style));
483 }

References ToDisplayListType().

◆ ImpellerPaintSetImageFilter()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintSetImageFilter ( ImpellerPaint  paint,
ImpellerImageFilter  image_filter 
)

Definition at line 1049 of file impeller.cc.

1050  {
1051  GetPeer(paint)->SetImageFilter(*GetPeer(image_filter));
1052 }

◆ ImpellerPaintSetMaskFilter()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintSetMaskFilter ( ImpellerPaint  paint,
ImpellerMaskFilter  mask_filter 
)

Definition at line 1055 of file impeller.cc.

1056  {
1057  GetPeer(paint)->SetMaskFilter(*GetPeer(mask_filter));
1058 }

◆ ImpellerPaintSetStrokeCap()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintSetStrokeCap ( ImpellerPaint  paint,
ImpellerStrokeCap  cap 
)

Definition at line 486 of file impeller.cc.

486  {
487  GetPeer(paint)->SetStrokeCap(ToDisplayListType(cap));
488 }

References ToDisplayListType().

◆ ImpellerPaintSetStrokeJoin()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintSetStrokeJoin ( ImpellerPaint  paint,
ImpellerStrokeJoin  join 
)

Definition at line 491 of file impeller.cc.

491  {
492  GetPeer(paint)->SetStrokeJoin(ToDisplayListType(join));
493 }

References ToDisplayListType().

◆ ImpellerPaintSetStrokeMiter()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintSetStrokeMiter ( ImpellerPaint  paint,
float  miter 
)

Definition at line 501 of file impeller.cc.

501  {
502  GetPeer(paint)->SetStrokeMiter(miter);
503 }

◆ ImpellerPaintSetStrokeWidth()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPaintSetStrokeWidth ( ImpellerPaint  paint,
float  width 
)

Definition at line 496 of file impeller.cc.

496  {
497  GetPeer(paint)->SetStrokeWidth(width);
498 }

◆ ImpellerParagraphBuilderAddText()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphBuilderAddText ( ImpellerParagraphBuilder  paragraph_builder,
const uint8_t *  data,
uint32_t  length 
)

Definition at line 1210 of file impeller.cc.

1212  {
1213  if (data == nullptr) {
1214  length = 0;
1215  }
1216  if (length == 0) {
1217  return;
1218  }
1219  GetPeer(paragraph_builder)->AddText(data, length);
1220 }
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:67

References data.

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerParagraphBuilderBuildParagraphNew()

IMPELLER_EXTERN_C ImpellerParagraph impeller::interop::ImpellerParagraphBuilderBuildParagraphNew ( ImpellerParagraphBuilder  paragraph_builder,
float  width 
)

Definition at line 1223 of file impeller.cc.

1225  {
1226  return GetPeer(paragraph_builder)->Build(width).Leak();
1227 }

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerParagraphBuilderNew()

IMPELLER_EXTERN_C ImpellerParagraphBuilder impeller::interop::ImpellerParagraphBuilderNew ( ImpellerTypographyContext  context)

Definition at line 1173 of file impeller.cc.

1174  {
1175  auto builder =
1176  Create<ParagraphBuilder>(Ref<TypographyContext>(GetPeer(context)));
1177  if (!builder->IsValid()) {
1178  VALIDATION_LOG << "Could not create valid paragraph builder.";
1179  return nullptr;
1180  }
1181  return builder.Leak();
1182 }

References VALIDATION_LOG.

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerParagraphBuilderPopStyle()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphBuilderPopStyle ( ImpellerParagraphBuilder  paragraph_builder)

Definition at line 1204 of file impeller.cc.

1205  {
1206  GetPeer(paragraph_builder)->PopStyle();
1207 }

◆ ImpellerParagraphBuilderPushStyle()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphBuilderPushStyle ( ImpellerParagraphBuilder  paragraph_builder,
ImpellerParagraphStyle  style 
)

Definition at line 1197 of file impeller.cc.

1199  {
1200  GetPeer(paragraph_builder)->PushStyle(*GetPeer(style));
1201 }

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerParagraphBuilderRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphBuilderRelease ( ImpellerParagraphBuilder  paragraph_builder)

Definition at line 1191 of file impeller.cc.

1192  {
1193  ObjectBase::SafeRelease(paragraph_builder);
1194 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerParagraphBuilderRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphBuilderRetain ( ImpellerParagraphBuilder  paragraph_builder)

Definition at line 1185 of file impeller.cc.

1186  {
1187  ObjectBase::SafeRetain(paragraph_builder);
1188 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerParagraphCreateGlyphInfoAtCodeUnitIndexNew()

IMPELLER_EXTERN_C ImpellerGlyphInfo impeller::interop::ImpellerParagraphCreateGlyphInfoAtCodeUnitIndexNew ( ImpellerParagraph  paragraph,
size_t  code_unit_index 
)

Definition at line 1329 of file impeller.cc.

1331  {
1332  return GetPeer(paragraph)
1333  ->GetGlyphInfoAtCodeUnitIndex(code_unit_index)
1334  .Leak();
1335 }

◆ ImpellerParagraphCreateGlyphInfoAtParagraphCoordinatesNew()

IMPELLER_EXTERN_C ImpellerGlyphInfo impeller::interop::ImpellerParagraphCreateGlyphInfoAtParagraphCoordinatesNew ( ImpellerParagraph  paragraph,
double  x,
double  y 
)

Definition at line 1338 of file impeller.cc.

1341  {
1342  return GetPeer(paragraph)
1343  ->GetClosestGlyphInfoAtParagraphCoordinates(x, y)
1344  .Leak();
1345 }
int32_t x

References x.

◆ ImpellerParagraphGetAlphabeticBaseline()

IMPELLER_EXTERN_C float impeller::interop::ImpellerParagraphGetAlphabeticBaseline ( ImpellerParagraph  paragraph)

Definition at line 1270 of file impeller.cc.

1270  {
1271  return GetPeer(paragraph)->GetAlphabeticBaseline();
1272 }

◆ ImpellerParagraphGetHeight()

IMPELLER_EXTERN_C float impeller::interop::ImpellerParagraphGetHeight ( ImpellerParagraph  paragraph)

Definition at line 1245 of file impeller.cc.

1245  {
1246  return GetPeer(paragraph)->GetHeight();
1247 }

◆ ImpellerParagraphGetIdeographicBaseline()

IMPELLER_EXTERN_C float impeller::interop::ImpellerParagraphGetIdeographicBaseline ( ImpellerParagraph  paragraph)

Definition at line 1265 of file impeller.cc.

1265  {
1266  return GetPeer(paragraph)->GetIdeographicBaseline();
1267 }

◆ ImpellerParagraphGetLineCount()

IMPELLER_EXTERN_C uint32_t impeller::interop::ImpellerParagraphGetLineCount ( ImpellerParagraph  paragraph)

Definition at line 1275 of file impeller.cc.

1275  {
1276  return GetPeer(paragraph)->GetLineCount();
1277 }

◆ ImpellerParagraphGetLineMetrics()

IMPELLER_EXTERN_C ImpellerLineMetrics impeller::interop::ImpellerParagraphGetLineMetrics ( ImpellerParagraph  paragraph)

Definition at line 1323 of file impeller.cc.

1324  {
1325  return GetPeer(paragraph)->GetLineMetrics().GetC();
1326 }

◆ ImpellerParagraphGetLongestLineWidth()

IMPELLER_EXTERN_C float impeller::interop::ImpellerParagraphGetLongestLineWidth ( ImpellerParagraph  paragraph)

Definition at line 1250 of file impeller.cc.

1250  {
1251  return GetPeer(paragraph)->GetLongestLineWidth();
1252 }

◆ ImpellerParagraphGetMaxIntrinsicWidth()

IMPELLER_EXTERN_C float impeller::interop::ImpellerParagraphGetMaxIntrinsicWidth ( ImpellerParagraph  paragraph)

Definition at line 1260 of file impeller.cc.

1260  {
1261  return GetPeer(paragraph)->GetMaxIntrinsicWidth();
1262 }

◆ ImpellerParagraphGetMaxWidth()

IMPELLER_EXTERN_C float impeller::interop::ImpellerParagraphGetMaxWidth ( ImpellerParagraph  paragraph)

Definition at line 1240 of file impeller.cc.

1240  {
1241  return GetPeer(paragraph)->GetMaxWidth();
1242 }

◆ ImpellerParagraphGetMinIntrinsicWidth()

IMPELLER_EXTERN_C float impeller::interop::ImpellerParagraphGetMinIntrinsicWidth ( ImpellerParagraph  paragraph)

Definition at line 1255 of file impeller.cc.

1255  {
1256  return GetPeer(paragraph)->GetMinIntrinsicWidth();
1257 }

◆ ImpellerParagraphGetWordBoundary()

IMPELLER_EXTERN_C ImpellerRange impeller::interop::ImpellerParagraphGetWordBoundary ( ImpellerParagraph  paragraph,
size_t  code_unit_index 
)

Definition at line 1280 of file impeller.cc.

1281  {
1282  return GetPeer(paragraph)->GetWordBoundary(code_unit_index);
1283 }

◆ ImpellerParagraphRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphRelease ( ImpellerParagraph  paragraph)

Definition at line 1235 of file impeller.cc.

1235  {
1236  ObjectBase::SafeRelease(paragraph);
1237 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerParagraphRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphRetain ( ImpellerParagraph  paragraph)

Definition at line 1230 of file impeller.cc.

1230  {
1231  ObjectBase::SafeRetain(paragraph);
1232 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerParagraphStyleNew()

IMPELLER_EXTERN_C ImpellerParagraphStyle impeller::interop::ImpellerParagraphStyleNew ( )

Definition at line 1061 of file impeller.cc.

1061  {
1062  return Create<ParagraphStyle>().Leak();
1063 }

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerParagraphStyleRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleRelease ( ImpellerParagraphStyle  paragraph_style)

Definition at line 1071 of file impeller.cc.

1071  {
1072  ObjectBase::SafeRelease(paragraph_style);
1073 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerParagraphStyleRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleRetain ( ImpellerParagraphStyle  paragraph_style)

Definition at line 1066 of file impeller.cc.

1066  {
1067  ObjectBase::SafeRetain(paragraph_style);
1068 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerParagraphStyleSetBackground()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetBackground ( ImpellerParagraphStyle  paragraph_style,
ImpellerPaint  paint 
)

Definition at line 1082 of file impeller.cc.

1083  {
1084  GetPeer(paragraph_style)->SetBackground(Ref(GetPeer(paint)));
1085 }
ScopedObject< Object > Ref(Object *object)
Definition: object.h:146

References Ref().

◆ ImpellerParagraphStyleSetFontFamily()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetFontFamily ( ImpellerParagraphStyle  paragraph_style,
const char *  family_name 
)

Definition at line 1107 of file impeller.cc.

1108  {
1109  GetPeer(paragraph_style)->SetFontFamily(ReadString(family_name));
1110 }
static std::string ReadString(const char *string)
Definition: impeller.cc:1099

References ReadString().

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerParagraphStyleSetFontSize()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetFontSize ( ImpellerParagraphStyle  paragraph_style,
float  size 
)

Definition at line 1113 of file impeller.cc.

1114  {
1115  GetPeer(paragraph_style)->SetFontSize(size);
1116 }

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerParagraphStyleSetFontStyle()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetFontStyle ( ImpellerParagraphStyle  paragraph_style,
ImpellerFontStyle  style 
)

Definition at line 1094 of file impeller.cc.

1095  {
1096  GetPeer(paragraph_style)->SetFontStyle(ToTxtType(style));
1097 }
constexpr txt::FontWeight ToTxtType(ImpellerFontWeight weight)
Definition: formats.h:430

References ToTxtType().

◆ ImpellerParagraphStyleSetFontWeight()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetFontWeight ( ImpellerParagraphStyle  paragraph_style,
ImpellerFontWeight  weight 
)

Definition at line 1088 of file impeller.cc.

1089  {
1090  GetPeer(paragraph_style)->SetFontWeight(ToTxtType(weight));
1091 }

References ToTxtType().

◆ ImpellerParagraphStyleSetForeground()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetForeground ( ImpellerParagraphStyle  paragraph_style,
ImpellerPaint  paint 
)

Definition at line 1076 of file impeller.cc.

1077  {
1078  GetPeer(paragraph_style)->SetForeground(Ref(GetPeer(paint)));
1079 }

References Ref().

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerParagraphStyleSetHeight()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetHeight ( ImpellerParagraphStyle  paragraph_style,
float  height 
)

Definition at line 1119 of file impeller.cc.

1120  {
1121  GetPeer(paragraph_style)->SetHeight(height);
1122 }

◆ ImpellerParagraphStyleSetLocale()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetLocale ( ImpellerParagraphStyle  paragraph_style,
const char *  locale 
)

Definition at line 1145 of file impeller.cc.

1146  {
1147  GetPeer(paragraph_style)->SetLocale(ReadString(locale));
1148 }

References ReadString().

◆ ImpellerParagraphStyleSetMaxLines()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetMaxLines ( ImpellerParagraphStyle  paragraph_style,
uint32_t  max_lines 
)

Definition at line 1139 of file impeller.cc.

1140  {
1141  GetPeer(paragraph_style)->SetMaxLines(max_lines);
1142 }

◆ ImpellerParagraphStyleSetTextAlignment()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetTextAlignment ( ImpellerParagraphStyle  paragraph_style,
ImpellerTextAlignment  align 
)

Definition at line 1125 of file impeller.cc.

1127  {
1128  GetPeer(paragraph_style)->SetTextAlignment(ToTxtType(align));
1129 }

References ToTxtType().

◆ ImpellerParagraphStyleSetTextDirection()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetTextDirection ( ImpellerParagraphStyle  paragraph_style,
ImpellerTextDirection  direction 
)

Definition at line 1132 of file impeller.cc.

1134  {
1135  GetPeer(paragraph_style)->SetTextDirection(ToTxtType(direction));
1136 }

References ToTxtType().

◆ ImpellerPathBuilderAddArc()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathBuilderAddArc ( ImpellerPathBuilder  builder,
const ImpellerRect oval_bounds,
float  start_angle_degrees,
float  end_angle_degrees 
)

Definition at line 380 of file impeller.cc.

383  {
384  GetPeer(builder)->AddArc(ToImpellerType(*oval_bounds), //
385  Degrees{start_angle_degrees}, //
386  Degrees{end_angle_degrees} //
387  );
388 }

References ToImpellerType().

◆ ImpellerPathBuilderAddOval()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathBuilderAddOval ( ImpellerPathBuilder  builder,
const ImpellerRect oval_bounds 
)

Definition at line 391 of file impeller.cc.

392  {
393  GetPeer(builder)->AddOval(ToImpellerType(*oval_bounds));
394 }

References ToImpellerType().

◆ ImpellerPathBuilderAddRect()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathBuilderAddRect ( ImpellerPathBuilder  builder,
const ImpellerRect rect 
)

Definition at line 374 of file impeller.cc.

375  {
376  GetPeer(builder)->AddRect(ToImpellerType(*rect));
377 }

References ToImpellerType().

◆ ImpellerPathBuilderAddRoundedRect()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathBuilderAddRoundedRect ( ImpellerPathBuilder  builder,
const ImpellerRect rect,
const ImpellerRoundingRadii rounding_radii 
)

Definition at line 397 of file impeller.cc.

400  {
401  GetPeer(builder)->AddRoundedRect(ToImpellerType(*rect),
402  ToImpellerType(*rounding_radii));
403 }

References ToImpellerType().

◆ ImpellerPathBuilderClose()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathBuilderClose ( ImpellerPathBuilder  builder)

Definition at line 406 of file impeller.cc.

406  {
407  GetPeer(builder)->Close();
408 }

◆ ImpellerPathBuilderCopyPathNew()

IMPELLER_EXTERN_C ImpellerPath impeller::interop::ImpellerPathBuilderCopyPathNew ( ImpellerPathBuilder  builder,
ImpellerFillType  fill 
)

Definition at line 411 of file impeller.cc.

412  {
413  return GetPeer(builder)->CopyPath(ToImpellerType(fill)).Leak();
414 }

References ToImpellerType().

◆ ImpellerPathBuilderCubicCurveTo()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathBuilderCubicCurveTo ( ImpellerPathBuilder  builder,
const ImpellerPoint control_point_1,
const ImpellerPoint control_point_2,
const ImpellerPoint end_point 
)

Definition at line 363 of file impeller.cc.

366  {
367  GetPeer(builder)->CubicCurveTo(ToImpellerType(*control_point_1), //
368  ToImpellerType(*control_point_2), //
369  ToImpellerType(*end_point) //
370  );
371 }

References ToImpellerType().

◆ ImpellerPathBuilderLineTo()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathBuilderLineTo ( ImpellerPathBuilder  builder,
const ImpellerPoint location 
)

Definition at line 349 of file impeller.cc.

350  {
351  GetPeer(builder)->LineTo(ToImpellerType(*location));
352 }

References ToImpellerType().

◆ ImpellerPathBuilderMoveTo()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathBuilderMoveTo ( ImpellerPathBuilder  builder,
const ImpellerPoint location 
)

Definition at line 343 of file impeller.cc.

344  {
345  GetPeer(builder)->MoveTo(ToImpellerType(*location));
346 }

References ToImpellerType().

◆ ImpellerPathBuilderNew()

IMPELLER_EXTERN_C ImpellerPathBuilder impeller::interop::ImpellerPathBuilderNew ( )

Definition at line 328 of file impeller.cc.

328  {
329  return Create<PathBuilder>().Leak();
330 }

◆ ImpellerPathBuilderQuadraticCurveTo()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathBuilderQuadraticCurveTo ( ImpellerPathBuilder  builder,
const ImpellerPoint control_point,
const ImpellerPoint end_point 
)

Definition at line 355 of file impeller.cc.

357  {
358  GetPeer(builder)->QuadraticCurveTo(ToImpellerType(*control_point),
359  ToImpellerType(*end_point));
360 }

References ToImpellerType().

◆ ImpellerPathBuilderRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathBuilderRelease ( ImpellerPathBuilder  builder)

Definition at line 338 of file impeller.cc.

338  {
339  ObjectBase::SafeRelease(builder);
340 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerPathBuilderRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathBuilderRetain ( ImpellerPathBuilder  builder)

Definition at line 333 of file impeller.cc.

333  {
334  ObjectBase::SafeRetain(builder);
335 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerPathBuilderTakePathNew()

IMPELLER_EXTERN_C ImpellerPath impeller::interop::ImpellerPathBuilderTakePathNew ( ImpellerPathBuilder  builder,
ImpellerFillType  fill 
)

Definition at line 417 of file impeller.cc.

418  {
419  return GetPeer(builder)->TakePath(ToImpellerType(fill)).Leak();
420 }

References ToImpellerType().

◆ ImpellerPathRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathRelease ( ImpellerPath  path)

Definition at line 323 of file impeller.cc.

323  {
324  ObjectBase::SafeRelease(path);
325 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerPathRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathRetain ( ImpellerPath  path)

Definition at line 318 of file impeller.cc.

318  {
319  ObjectBase::SafeRetain(path);
320 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerSurfaceCreateWrappedFBONew()

IMPELLER_EXTERN_C ImpellerSurface impeller::interop::ImpellerSurfaceCreateWrappedFBONew ( ImpellerContext  context,
uint64_t  fbo,
ImpellerPixelFormat  format,
const ImpellerISize size 
)

Definition at line 724 of file impeller.cc.

727  {
728 #if IMPELLER_ENABLE_OPENGLES
729  if (!GetPeer(context)->IsGL()) {
730  VALIDATION_LOG << "Context is not OpenGL.";
731  return nullptr;
732  }
733  return Create<SurfaceGLES>(*GetPeer(context), //
734  fbo, //
735  ToImpellerType(format), //
736  ToImpellerType(*size)) //
737  .Leak();
738 #else // IMPELLER_ENABLE_OPENGLES
739  VALIDATION_LOG << "OpenGL unavailable.";
740  return nullptr;
741 #endif // IMPELLER_ENABLE_OPENGLES
742 }

References ToImpellerType(), and VALIDATION_LOG.

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerSurfaceCreateWrappedMetalDrawableNew()

IMPELLER_EXTERN_C ImpellerSurface impeller::interop::ImpellerSurfaceCreateWrappedMetalDrawableNew ( ImpellerContext  context,
void *  metal_drawable 
)

Definition at line 745 of file impeller.cc.

747  {
748 #if IMPELLER_ENABLE_METAL
749  if (!GetPeer(context)->IsMetal()) {
750  VALIDATION_LOG << "Context is not Metal.";
751  return nullptr;
752  }
753  return Create<SurfaceMTL>(*GetPeer(context), metal_drawable).Leak();
754 #else // IMPELLER_ENABLE_METAL
755  VALIDATION_LOG << "Metal unavailable.";
756  return nullptr;
757 #endif // IMPELLER_ENABLE_METAL
758 }

References VALIDATION_LOG.

◆ ImpellerSurfaceDrawDisplayList()

IMPELLER_EXTERN_C bool impeller::interop::ImpellerSurfaceDrawDisplayList ( ImpellerSurface  surface,
ImpellerDisplayList  display_list 
)

Definition at line 770 of file impeller.cc.

771  {
772  return GetPeer(surface)->DrawDisplayList(*GetPeer(display_list));
773 }

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerSurfacePresent()

IMPELLER_EXTERN_C bool impeller::interop::ImpellerSurfacePresent ( ImpellerSurface  surface)

Definition at line 776 of file impeller.cc.

776  {
777  return GetPeer(surface)->Present();
778 }

◆ ImpellerSurfaceRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerSurfaceRelease ( ImpellerSurface  surface)

Definition at line 765 of file impeller.cc.

765  {
766  ObjectBase::SafeRelease(surface);
767 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerSurfaceRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerSurfaceRetain ( ImpellerSurface  surface)

Definition at line 760 of file impeller.cc.

760  {
761  ObjectBase::SafeRetain(surface);
762 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerTextureCreateWithContentsNew()

IMPELLER_EXTERN_C ImpellerTexture impeller::interop::ImpellerTextureCreateWithContentsNew ( ImpellerContext  context,
const ImpellerTextureDescriptor descriptor,
const ImpellerMapping contents,
void *  contents_on_release_user_data 
)

Definition at line 588 of file impeller.cc.

592  {
593  TextureDescriptor desc;
594  desc.storage_mode = StorageMode::kHostVisible;
595  desc.type = TextureType::kTexture2D;
596  desc.format = ToImpellerType(descriptor->pixel_format);
597  desc.size = ToImpellerType(descriptor->size);
598  desc.mip_count = std::min(descriptor->mip_count, 1u);
599  desc.usage = TextureUsage::kShaderRead;
600  desc.compression_type = CompressionType::kLossless;
601  auto texture = Create<Texture>(*GetPeer(context), desc);
602  if (!texture->IsValid()) {
603  VALIDATION_LOG << "Could not create texture.";
604  return nullptr;
605  }
606  // Depending on whether the de-allocation can be delayed, it may be possible
607  // to avoid a data copy.
608  if (contents->on_release) {
609  // Avoids data copy.
610  auto wrapped_contents = std::make_shared<fml::NonOwnedMapping>(
611  contents->data, // data ptr
612  contents->length, // data length
613  [on_release = contents->on_release, contents_on_release_user_data](
614  auto, auto) {
615  on_release(contents_on_release_user_data);
616  } // release callback
617  );
618  if (!texture->SetContents(std::move(wrapped_contents))) {
619  VALIDATION_LOG << "Could not set texture contents.";
620  return nullptr;
621  }
622  } else {
623  // May copy.
624  if (!texture->SetContents(contents->data, contents->length)) {
625  VALIDATION_LOG << "Could not set texture contents.";
626  return nullptr;
627  }
628  }
629  return texture.Leak();
630 }
ImpellerCallback IMPELLER_NULLABLE on_release
Definition: impeller.h:605
uint64_t length
Definition: impeller.h:604
const uint8_t *IMPELLER_NONNULL data
Definition: impeller.h:603
ImpellerPixelFormat pixel_format
Definition: impeller.h:597
ImpellerISize size
Definition: impeller.h:598

References impeller::TextureDescriptor::compression_type, ImpellerMapping::data, impeller::TextureDescriptor::format, impeller::kHostVisible, impeller::kLossless, impeller::kShaderRead, impeller::kTexture2D, ImpellerMapping::length, impeller::TextureDescriptor::mip_count, ImpellerTextureDescriptor::mip_count, ImpellerMapping::on_release, ImpellerTextureDescriptor::pixel_format, impeller::TextureDescriptor::size, ImpellerTextureDescriptor::size, impeller::TextureDescriptor::storage_mode, ToImpellerType(), impeller::TextureDescriptor::type, impeller::TextureDescriptor::usage, and VALIDATION_LOG.

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerTextureCreateWithOpenGLTextureHandleNew()

IMPELLER_EXTERN_C ImpellerTexture impeller::interop::ImpellerTextureCreateWithOpenGLTextureHandleNew ( ImpellerContext  context,
const ImpellerTextureDescriptor descriptor,
uint64_t  external_gl_handle 
)

Definition at line 633 of file impeller.cc.

636  {
637  auto impeller_context = GetPeer(context)->GetContext();
638  if (impeller_context->GetBackendType() !=
640  VALIDATION_LOG << "Context is not OpenGL.";
641  return nullptr;
642  }
643 
644  const auto& impeller_context_gl =
645  impeller::ContextGLES::Cast(*impeller_context);
646  const auto& reactor = impeller_context_gl.GetReactor();
647 
648  TextureDescriptor desc;
649  desc.storage_mode = StorageMode::kDevicePrivate;
650  desc.type = TextureType::kTexture2D;
651  desc.format = ToImpellerType(descriptor->pixel_format);
652  desc.size = ToImpellerType(descriptor->size);
653  desc.mip_count = std::min(descriptor->mip_count, 1u);
654  desc.usage = TextureUsage::kShaderRead;
655  desc.compression_type = CompressionType::kLossless;
656 
657  auto texture = TextureGLES::WrapTexture(
658  reactor, //
659  desc, //
660  reactor->CreateHandle(HandleType::kTexture, external_gl_handle) //
661  );
662  if (!texture || !texture->IsValid()) {
663  VALIDATION_LOG << "Could not wrap external texture.";
664  return nullptr;
665  }
666  texture->SetCoordinateSystem(TextureCoordinateSystem::kUploadFromHost);
667  return Create<Texture>(impeller::Context::BackendType::kOpenGLES,
668  std::move(texture))
669  .Leak();
670 }
static ContextGLES & Cast(Context &base)
Definition: backend_cast.h:13

References impeller::BackendCast< ContextGLES, Context >::Cast(), impeller::TextureDescriptor::compression_type, impeller::TextureDescriptor::format, impeller::kDevicePrivate, impeller::kLossless, impeller::Context::kOpenGLES, impeller::kShaderRead, impeller::kTexture, impeller::kTexture2D, impeller::kUploadFromHost, impeller::TextureDescriptor::mip_count, ImpellerTextureDescriptor::mip_count, ImpellerTextureDescriptor::pixel_format, impeller::TextureDescriptor::size, ImpellerTextureDescriptor::size, impeller::TextureDescriptor::storage_mode, ToImpellerType(), impeller::TextureDescriptor::type, impeller::TextureDescriptor::usage, VALIDATION_LOG, and impeller::TextureGLES::WrapTexture().

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerTextureGetOpenGLHandle()

IMPELLER_EXTERN_C uint64_t impeller::interop::ImpellerTextureGetOpenGLHandle ( ImpellerTexture  texture)

Definition at line 683 of file impeller.cc.

683  {
684  auto interop_texture = GetPeer(texture);
685  if (interop_texture->GetBackendType() !=
687  VALIDATION_LOG << "Can only fetch the texture handle of an OpenGL texture.";
688  return 0u;
689  }
690  return TextureGLES::Cast(*interop_texture->GetTexture())
691  .GetGLHandle()
692  .value_or(0u);
693 }

References impeller::BackendCast< TextureGLES, Texture >::Cast(), impeller::TextureGLES::GetGLHandle(), impeller::Context::kOpenGLES, and VALIDATION_LOG.

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerTextureRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerTextureRelease ( ImpellerTexture  texture)

Definition at line 678 of file impeller.cc.

678  {
679  ObjectBase::SafeRelease(texture);
680 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerTextureRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerTextureRetain ( ImpellerTexture  texture)

Definition at line 673 of file impeller.cc.

673  {
674  ObjectBase::SafeRetain(texture);
675 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerTypographyContextNew()

IMPELLER_EXTERN_C ImpellerTypographyContext impeller::interop::ImpellerTypographyContextNew ( )

Definition at line 1286 of file impeller.cc.

1286  {
1287  auto context = Create<TypographyContext>();
1288  if (!context->IsValid()) {
1289  VALIDATION_LOG << "Could not create typography context.";
1290  return nullptr;
1291  }
1292  return context.Leak();
1293 }

References VALIDATION_LOG.

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerTypographyContextRegisterFont()

IMPELLER_EXTERN_C bool impeller::interop::ImpellerTypographyContextRegisterFont ( ImpellerTypographyContext  context,
const ImpellerMapping contents,
void *  contents_on_release_user_data,
const char *  family_name_alias 
)

Definition at line 1306 of file impeller.cc.

1309  {
1310  auto wrapped_contents = std::make_unique<fml::NonOwnedMapping>(
1311  contents->data, // data ptr
1312  contents->length, // data length
1313  [on_release = contents->on_release, contents_on_release_user_data](auto,
1314  auto) {
1315  on_release(contents_on_release_user_data);
1316  } // release callback
1317  );
1318  return GetPeer(context)->RegisterFont(std::move(wrapped_contents),
1319  family_name_alias);
1320 }

References ImpellerMapping::data, ImpellerMapping::length, and ImpellerMapping::on_release.

Referenced by impeller::interop::testing::TEST_P().

◆ ImpellerTypographyContextRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerTypographyContextRelease ( ImpellerTypographyContext  context)

Definition at line 1301 of file impeller.cc.

1301  {
1302  ObjectBase::SafeRelease(context);
1303 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerTypographyContextRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerTypographyContextRetain ( ImpellerTypographyContext  context)

Definition at line 1296 of file impeller.cc.

1296  {
1297  ObjectBase::SafeRetain(context);
1298 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerVulkanSwapchainAcquireNextSurfaceNew()

IMPELLER_EXTERN_C ImpellerSurface impeller::interop::ImpellerVulkanSwapchainAcquireNextSurfaceNew ( ImpellerVulkanSwapchain  swapchain)

Definition at line 219 of file impeller.cc.

220  {
221  return GetPeer(swapchain)->AcquireNextSurface().Leak();
222 }

◆ ImpellerVulkanSwapchainCreateNew()

IMPELLER_EXTERN_C ImpellerVulkanSwapchain impeller::interop::ImpellerVulkanSwapchainCreateNew ( ImpellerContext  context,
void *  vulkan_surface_khr 
)

Definition at line 193 of file impeller.cc.

195  {
196 #if IMPELLER_ENABLE_VULKAN
197  return Create<SwapchainVK>(
198  *GetPeer(context), //
199  reinterpret_cast<VkSurfaceKHR>(vulkan_surface_khr) //
200  )
201  .Leak();
202 #else // IMPELLER_ENABLE_VULKAN
203  VALIDATION_LOG << "Vulkan not available.";
204  return nullptr;
205 #endif // IMPELLER_ENABLE_VULKAN
206 }

References VALIDATION_LOG.

◆ ImpellerVulkanSwapchainRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerVulkanSwapchainRelease ( ImpellerVulkanSwapchain  swapchain)

Definition at line 214 of file impeller.cc.

214  {
215  ObjectBase::SafeRelease(swapchain);
216 }

References impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerVulkanSwapchainRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerVulkanSwapchainRetain ( ImpellerVulkanSwapchain  swapchain)

Definition at line 209 of file impeller.cc.

209  {
210  ObjectBase::SafeRetain(swapchain);
211 }

References impeller::interop::ObjectBase::SafeRetain().

◆ ParseColorsAndStops()

static std::pair<std::vector<flutter::DlColor>, std::vector<Scalar> > impeller::interop::ParseColorsAndStops ( uint32_t  stop_count,
const ImpellerColor colors,
const float *  stops 
)
static

Definition at line 820 of file impeller.cc.

822  {
823  if (stop_count == 0) {
824  return {};
825  }
826  std::pair<std::vector<flutter::DlColor>, std::vector<Scalar>> result;
827  result.first.reserve(stop_count);
828  result.second.reserve(stop_count);
829  for (size_t i = 0; i < stop_count; i++) {
830  result.first.emplace_back(ToDisplayListType(colors[i]));
831  result.second.emplace_back(stops[i]);
832  }
833  return result;
834 }

References ToDisplayListType().

Referenced by ImpellerColorSourceCreateConicalGradientNew(), ImpellerColorSourceCreateLinearGradientNew(), ImpellerColorSourceCreateRadialGradientNew(), and ImpellerColorSourceCreateSweepGradientNew().

◆ ReadString()

static std::string impeller::interop::ReadString ( const char *  string)
static

Definition at line 1099 of file impeller.cc.

1099  {
1100  if (string == nullptr) {
1101  return "";
1102  }
1103  return std::string{string};
1104 }

Referenced by ImpellerParagraphStyleSetFontFamily(), and ImpellerParagraphStyleSetLocale().

◆ Ref()

template<typename Object >
ScopedObject<Object> impeller::interop::Ref ( Object object)

Definition at line 146 of file object.h.

146  {
147  return ScopedObject<Object>{object};
148 }

Referenced by ImpellerParagraphStyleSetBackground(), ImpellerParagraphStyleSetForeground(), and impeller::interop::testing::TEST().

◆ ToDisplayListType() [1/11]

constexpr flutter::DlBlendMode impeller::interop::ToDisplayListType ( BlendMode  mode)
constexpr

Definition at line 124 of file formats.h.

124  {
125  using Mode = flutter::DlBlendMode;
126  switch (mode) {
127  case BlendMode::kClear:
128  return Mode::kClear;
129  case BlendMode::kSrc:
130  return Mode::kSrc;
131  case BlendMode::kDst:
132  return Mode::kDst;
133  case BlendMode::kSrcOver:
134  return Mode::kSrcOver;
135  case BlendMode::kDstOver:
136  return Mode::kDstOver;
137  case BlendMode::kSrcIn:
138  return Mode::kSrcIn;
139  case BlendMode::kDstIn:
140  return Mode::kDstIn;
141  case BlendMode::kSrcOut:
142  return Mode::kSrcOut;
143  case BlendMode::kDstOut:
144  return Mode::kDstOut;
145  case BlendMode::kSrcATop:
146  return Mode::kSrcATop;
147  case BlendMode::kDstATop:
148  return Mode::kDstATop;
149  case BlendMode::kXor:
150  return Mode::kXor;
151  case BlendMode::kPlus:
152  return Mode::kPlus;
153  case BlendMode::kModulate:
154  return Mode::kModulate;
155  case BlendMode::kScreen:
156  return Mode::kScreen;
157  case BlendMode::kOverlay:
158  return Mode::kOverlay;
159  case BlendMode::kDarken:
160  return Mode::kDarken;
161  case BlendMode::kLighten:
162  return Mode::kLighten;
163  case BlendMode::kColorDodge:
164  return Mode::kColorDodge;
165  case BlendMode::kColorBurn:
166  return Mode::kColorBurn;
167  case BlendMode::kHardLight:
168  return Mode::kHardLight;
169  case BlendMode::kSoftLight:
170  return Mode::kSoftLight;
171  case BlendMode::kDifference:
172  return Mode::kDifference;
173  case BlendMode::kExclusion:
174  return Mode::kExclusion;
175  case BlendMode::kMultiply:
176  return Mode::kMultiply;
177  case BlendMode::kHue:
178  return Mode::kHue;
179  case BlendMode::kSaturation:
180  return Mode::kSaturation;
181  case BlendMode::kColor:
182  return Mode::kColor;
183  case BlendMode::kLuminosity:
184  return Mode::kLuminosity;
185  }
186  return Mode::kSrcOver;
187 }

References impeller::kClear, impeller::kColor, impeller::kColorBurn, impeller::kColorDodge, impeller::kDarken, impeller::kDifference, impeller::kDst, impeller::kDstATop, impeller::kDstIn, impeller::kDstOut, impeller::kDstOver, impeller::kExclusion, impeller::kHardLight, impeller::kHue, impeller::kLighten, impeller::kLuminosity, impeller::kModulate, impeller::kMultiply, impeller::kOverlay, impeller::kPlus, impeller::kSaturation, impeller::kScreen, impeller::kSoftLight, impeller::kSrc, impeller::kSrcATop, impeller::kSrcIn, impeller::kSrcOut, impeller::kSrcOver, and impeller::kXor.

◆ ToDisplayListType() [2/11]

◆ ToDisplayListType() [3/11]

template<class DlType , class OtherType >
std::vector<DlType> impeller::interop::ToDisplayListType ( const std::vector< OtherType > &  other_vec)

Definition at line 90 of file formats.h.

90  {
91  std::vector<DlType> dl_vec;
92  dl_vec.reserve(other_vec.size());
93  for (const auto& other : other_vec) {
94  dl_vec.emplace_back(ToDisplayListType(other));
95  }
96  return dl_vec;
97 }
constexpr flutter::DlColor ToDisplayListType(ImpellerColor color)
Definition: formats.h:421

References ToDisplayListType().

◆ ToDisplayListType() [4/11]

constexpr flutter::DlBlurStyle impeller::interop::ToDisplayListType ( ImpellerBlurStyle  style)
constexpr

Definition at line 110 of file formats.h.

110  {
111  switch (style) {
113  return flutter::DlBlurStyle::kNormal;
115  return flutter::DlBlurStyle::kSolid;
117  return flutter::DlBlurStyle::kOuter;
119  return flutter::DlBlurStyle::kInner;
120  }
121  return flutter::DlBlurStyle::kNormal;
122 }
@ kImpellerBlurStyleNormal
Definition: impeller.h:432
@ kImpellerBlurStyleOuter
Definition: impeller.h:434
@ kImpellerBlurStyleInner
Definition: impeller.h:435
@ kImpellerBlurStyleSolid
Definition: impeller.h:433

References kImpellerBlurStyleInner, kImpellerBlurStyleNormal, kImpellerBlurStyleOuter, and kImpellerBlurStyleSolid.

◆ ToDisplayListType() [5/11]

constexpr flutter::DlColor impeller::interop::ToDisplayListType ( ImpellerColor  color)
constexpr

Definition at line 421 of file formats.h.

421  {
422  return flutter::DlColor(color.alpha, //
423  color.red, //
424  color.green, //
425  color.blue, //
427  );
428 }
float blue
Definition: impeller.h:591
float alpha
Definition: impeller.h:592
float green
Definition: impeller.h:590
ImpellerColorSpace color_space
Definition: impeller.h:593

References ImpellerColor::alpha, ImpellerColor::blue, ImpellerColor::color_space, ImpellerColor::green, ImpellerColor::red, and ToDisplayListType().

◆ ToDisplayListType() [6/11]

constexpr flutter::DlColorSpace impeller::interop::ToDisplayListType ( ImpellerColorSpace  color_space)
constexpr

Definition at line 408 of file formats.h.

409  {
410  switch (color_space) {
412  return flutter::DlColorSpace::kSRGB;
414  return flutter::DlColorSpace::kExtendedSRGB;
416  return flutter::DlColorSpace::kDisplayP3;
417  }
418  return flutter::DlColorSpace::kSRGB;
419 }
@ kImpellerColorSpaceExtendedSRGB
Definition: impeller.h:440
@ kImpellerColorSpaceSRGB
Definition: impeller.h:439
@ kImpellerColorSpaceDisplayP3
Definition: impeller.h:441

References kImpellerColorSpaceDisplayP3, kImpellerColorSpaceExtendedSRGB, and kImpellerColorSpaceSRGB.

◆ ToDisplayListType() [7/11]

constexpr flutter::DlDrawStyle impeller::interop::ToDisplayListType ( ImpellerDrawStyle  style)
constexpr

Definition at line 360 of file formats.h.

360  {
361  switch (style) {
363  return flutter::DlDrawStyle::kFill;
365  return flutter::DlDrawStyle::kStroke;
367  return flutter::DlDrawStyle::kStrokeAndFill;
368  }
369  return flutter::DlDrawStyle::kFill;
370 }
@ kImpellerDrawStyleStroke
Definition: impeller.h:399
@ kImpellerDrawStyleFill
Definition: impeller.h:398
@ kImpellerDrawStyleStrokeAndFill
Definition: impeller.h:400

References kImpellerDrawStyleFill, kImpellerDrawStyleStroke, and kImpellerDrawStyleStrokeAndFill.

◆ ToDisplayListType() [8/11]

constexpr flutter::DlStrokeCap impeller::interop::ToDisplayListType ( ImpellerStrokeCap  cap)
constexpr

Definition at line 372 of file formats.h.

372  {
373  switch (cap) {
375  return flutter::DlStrokeCap::kButt;
377  return flutter::DlStrokeCap::kRound;
379  return flutter::DlStrokeCap::kSquare;
380  }
381  return flutter::DlStrokeCap::kButt;
382 }
@ kImpellerStrokeCapButt
Definition: impeller.h:404
@ kImpellerStrokeCapRound
Definition: impeller.h:405
@ kImpellerStrokeCapSquare
Definition: impeller.h:406

References kImpellerStrokeCapButt, kImpellerStrokeCapRound, and kImpellerStrokeCapSquare.

◆ ToDisplayListType() [9/11]

constexpr flutter::DlStrokeJoin impeller::interop::ToDisplayListType ( ImpellerStrokeJoin  join)
constexpr

Definition at line 384 of file formats.h.

384  {
385  switch (join) {
387  return flutter::DlStrokeJoin::kMiter;
389  return flutter::DlStrokeJoin::kRound;
391  return flutter::DlStrokeJoin::kBevel;
392  }
393  return flutter::DlStrokeJoin::kMiter;
394 }
@ kImpellerStrokeJoinRound
Definition: impeller.h:411
@ kImpellerStrokeJoinBevel
Definition: impeller.h:412
@ kImpellerStrokeJoinMiter
Definition: impeller.h:410

References kImpellerStrokeJoinBevel, kImpellerStrokeJoinMiter, and kImpellerStrokeJoinRound.

◆ ToDisplayListType() [10/11]

constexpr flutter::DlImageSampling impeller::interop::ToDisplayListType ( ImpellerTextureSampling  sampling)
constexpr

Definition at line 99 of file formats.h.

100  {
101  switch (sampling) {
103  return flutter::DlImageSampling::kNearestNeighbor;
105  return flutter::DlImageSampling::kLinear;
106  }
107  return flutter::DlImageSampling::kLinear;
108 }
@ kImpellerTextureSamplingNearestNeighbor
Definition: impeller.h:420
@ kImpellerTextureSamplingLinear
Definition: impeller.h:421

References kImpellerTextureSamplingLinear, and kImpellerTextureSamplingNearestNeighbor.

◆ ToDisplayListType() [11/11]

constexpr flutter::DlTileMode impeller::interop::ToDisplayListType ( ImpellerTileMode  mode)
constexpr

Definition at line 244 of file formats.h.

244  {
245  switch (mode) {
247  return flutter::DlTileMode::kClamp;
249  return flutter::DlTileMode::kRepeat;
251  return flutter::DlTileMode::kMirror;
253  return flutter::DlTileMode::kDecal;
254  }
255  return flutter::DlTileMode::kClamp;
256 }
@ kImpellerTileModeMirror
Definition: impeller.h:427
@ kImpellerTileModeClamp
Definition: impeller.h:425
@ kImpellerTileModeRepeat
Definition: impeller.h:426
@ kImpellerTileModeDecal
Definition: impeller.h:428

References kImpellerTileModeClamp, kImpellerTileModeDecal, kImpellerTileModeMirror, and kImpellerTileModeRepeat.

◆ ToImpellerSize()

constexpr Size impeller::interop::ToImpellerSize ( const ImpellerPoint point)
constexpr

Definition at line 236 of file formats.h.

236  {
237  return Size{point.x, point.y};
238 }

References ImpellerPoint::x, and ImpellerPoint::y.

Referenced by ToImpellerType().

◆ ToImpellerType() [1/11]

constexpr Color impeller::interop::ToImpellerType ( const ImpellerColor color)
constexpr

Definition at line 287 of file formats.h.

287  {
288  Color result;
289  result.red = color.red;
290  result.green = color.green;
291  result.blue = color.blue;
292  result.alpha = color.alpha;
293  return result;
294 }

References impeller::Color::alpha, ImpellerColor::alpha, impeller::Color::blue, ImpellerColor::blue, impeller::Color::green, ImpellerColor::green, impeller::Color::red, and ImpellerColor::red.

◆ ToImpellerType() [2/11]

constexpr ISize impeller::interop::ToImpellerType ( const ImpellerISize size)
constexpr

Definition at line 404 of file formats.h.

404  {
405  return ISize::MakeWH(size.width, size.height);
406 }
int64_t height
Definition: impeller.h:497
int64_t width
Definition: impeller.h:496

References ImpellerISize::height, impeller::TSize< T >::MakeWH(), and ImpellerISize::width.

◆ ToImpellerType() [3/11]

constexpr Matrix impeller::interop::ToImpellerType ( const ImpellerMatrix m)
constexpr

Definition at line 201 of file formats.h.

201  {
202  return Matrix(m.m[0], m.m[1], m.m[2], m.m[3], //
203  m.m[4], m.m[5], m.m[6], m.m[7], //
204  m.m[8], m.m[9], m.m[10], m.m[11], //
205  m.m[12], m.m[13], m.m[14], m.m[15] //
206  );
207 }

References ImpellerMatrix::m.

Referenced by ImpellerColorFilterCreateBlendNew(), ImpellerColorSourceCreateConicalGradientNew(), ImpellerColorSourceCreateImageNew(), ImpellerColorSourceCreateLinearGradientNew(), ImpellerColorSourceCreateRadialGradientNew(), ImpellerColorSourceCreateSweepGradientNew(), ImpellerDisplayListBuilderClipOval(), ImpellerDisplayListBuilderClipPath(), ImpellerDisplayListBuilderClipRect(), ImpellerDisplayListBuilderClipRoundedRect(), ImpellerDisplayListBuilderDrawDashedLine(), ImpellerDisplayListBuilderDrawLine(), ImpellerDisplayListBuilderDrawOval(), ImpellerDisplayListBuilderDrawParagraph(), ImpellerDisplayListBuilderDrawRect(), ImpellerDisplayListBuilderDrawRoundedRect(), ImpellerDisplayListBuilderDrawRoundedRectDifference(), ImpellerDisplayListBuilderDrawTexture(), ImpellerDisplayListBuilderDrawTextureRect(), ImpellerDisplayListBuilderSaveLayer(), ImpellerDisplayListBuilderSetTransform(), ImpellerDisplayListBuilderTransform(), ImpellerImageFilterCreateMatrixNew(), ImpellerPaintSetBlendMode(), ImpellerPathBuilderAddArc(), ImpellerPathBuilderAddOval(), ImpellerPathBuilderAddRect(), ImpellerPathBuilderAddRoundedRect(), ImpellerPathBuilderCopyPathNew(), ImpellerPathBuilderCubicCurveTo(), ImpellerPathBuilderLineTo(), ImpellerPathBuilderMoveTo(), ImpellerPathBuilderQuadraticCurveTo(), ImpellerPathBuilderTakePathNew(), ImpellerSurfaceCreateWrappedFBONew(), ImpellerTextureCreateWithContentsNew(), ImpellerTextureCreateWithOpenGLTextureHandleNew(), and impeller::interop::testing::TEST_P().

◆ ToImpellerType() [4/11]

constexpr Point impeller::interop::ToImpellerType ( const ImpellerPoint point)
constexpr

Definition at line 232 of file formats.h.

232  {
233  return Point{point.x, point.y};
234 }

References ImpellerPoint::x, and ImpellerPoint::y.

◆ ToImpellerType() [5/11]

constexpr Rect impeller::interop::ToImpellerType ( const ImpellerRect rect)
constexpr

Definition at line 240 of file formats.h.

240  {
241  return Rect::MakeXYWH(rect.x, rect.y, rect.width, rect.height);
242 }
float width
Definition: impeller.h:481
float height
Definition: impeller.h:482

References ImpellerRect::height, impeller::TRect< Scalar >::MakeXYWH(), ImpellerRect::width, ImpellerRect::x, and ImpellerRect::y.

◆ ToImpellerType() [6/11]

constexpr RoundingRadii impeller::interop::ToImpellerType ( const ImpellerRoundingRadii radii)
constexpr

Definition at line 258 of file formats.h.

258  {
259  auto result = RoundingRadii{};
260  result.top_left = ToImpellerSize(radii.top_left);
261  result.bottom_left = ToImpellerSize(radii.bottom_left);
262  result.top_right = ToImpellerSize(radii.top_right);
263  result.bottom_right = ToImpellerSize(radii.bottom_right);
264  return result;
265 }
constexpr Size ToImpellerSize(const ImpellerPoint &point)
Definition: formats.h:236
ImpellerPoint top_left
Definition: impeller.h:582
ImpellerPoint top_right
Definition: impeller.h:584
ImpellerPoint bottom_left
Definition: impeller.h:583
ImpellerPoint bottom_right
Definition: impeller.h:585

References ImpellerRoundingRadii::bottom_left, ImpellerRoundingRadii::bottom_right, ToImpellerSize(), impeller::RoundingRadii::top_left, ImpellerRoundingRadii::top_left, and ImpellerRoundingRadii::top_right.

◆ ToImpellerType() [7/11]

constexpr Size impeller::interop::ToImpellerType ( const ImpellerSize size)
constexpr

Definition at line 228 of file formats.h.

228  {
229  return Size{size.width, size.height};
230 }
float height
Definition: impeller.h:492
float width
Definition: impeller.h:491

References ImpellerSize::height, and ImpellerSize::width.

◆ ToImpellerType() [8/11]

constexpr BlendMode impeller::interop::ToImpellerType ( ImpellerBlendMode  mode)
constexpr

Definition at line 296 of file formats.h.

296  {
297  switch (mode) {
299  return BlendMode::kClear;
301  return BlendMode::kSrc;
303  return BlendMode::kDst;
305  return BlendMode::kSrcOver;
307  return BlendMode::kDstOver;
309  return BlendMode::kSrcIn;
311  return BlendMode::kDstIn;
313  return BlendMode::kSrcOut;
315  return BlendMode::kDstOut;
317  return BlendMode::kSrcATop;
319  return BlendMode::kDstATop;
321  return BlendMode::kXor;
323  return BlendMode::kPlus;
325  return BlendMode::kModulate;
327  return BlendMode::kScreen;
329  return BlendMode::kOverlay;
331  return BlendMode::kDarken;
333  return BlendMode::kLighten;
335  return BlendMode::kColorDodge;
337  return BlendMode::kColorBurn;
339  return BlendMode::kHardLight;
341  return BlendMode::kSoftLight;
343  return BlendMode::kDifference;
345  return BlendMode::kExclusion;
347  return BlendMode::kMultiply;
349  return BlendMode::kHue;
351  return BlendMode::kSaturation;
353  return BlendMode::kColor;
355  return BlendMode::kLuminosity;
356  }
357  return BlendMode::kSrcOver;
358 }
@ kImpellerBlendModeSaturation
Definition: impeller.h:392
@ kImpellerBlendModeSoftLight
Definition: impeller.h:387
@ kImpellerBlendModeHardLight
Definition: impeller.h:386
@ kImpellerBlendModeLuminosity
Definition: impeller.h:394
@ kImpellerBlendModeLighten
Definition: impeller.h:383
@ kImpellerBlendModeModulate
Definition: impeller.h:379
@ kImpellerBlendModeSourceIn
Definition: impeller.h:371
@ kImpellerBlendModeDifference
Definition: impeller.h:388
@ kImpellerBlendModeClear
Definition: impeller.h:366
@ kImpellerBlendModeColor
Definition: impeller.h:393
@ kImpellerBlendModeMultiply
Definition: impeller.h:390
@ kImpellerBlendModeSourceATop
Definition: impeller.h:375
@ kImpellerBlendModeDestinationOut
Definition: impeller.h:374
@ kImpellerBlendModeScreen
Definition: impeller.h:380
@ kImpellerBlendModeExclusion
Definition: impeller.h:389
@ kImpellerBlendModeColorBurn
Definition: impeller.h:385
@ kImpellerBlendModeDarken
Definition: impeller.h:382
@ kImpellerBlendModePlus
Definition: impeller.h:378
@ kImpellerBlendModeOverlay
Definition: impeller.h:381
@ kImpellerBlendModeDestinationIn
Definition: impeller.h:372
@ kImpellerBlendModeDestinationATop
Definition: impeller.h:376
@ kImpellerBlendModeDestination
Definition: impeller.h:368
@ kImpellerBlendModeSourceOver
Definition: impeller.h:369
@ kImpellerBlendModeXor
Definition: impeller.h:377
@ kImpellerBlendModeColorDodge
Definition: impeller.h:384
@ kImpellerBlendModeDestinationOver
Definition: impeller.h:370
@ kImpellerBlendModeSource
Definition: impeller.h:367
@ kImpellerBlendModeSourceOut
Definition: impeller.h:373
@ kImpellerBlendModeHue
Definition: impeller.h:391

References impeller::kClear, impeller::kColor, impeller::kColorBurn, impeller::kColorDodge, impeller::kDarken, impeller::kDifference, impeller::kDst, impeller::kDstATop, impeller::kDstIn, impeller::kDstOut, impeller::kDstOver, impeller::kExclusion, impeller::kHardLight, impeller::kHue, kImpellerBlendModeClear, kImpellerBlendModeColor, kImpellerBlendModeColorBurn, kImpellerBlendModeColorDodge, kImpellerBlendModeDarken, kImpellerBlendModeDestination, kImpellerBlendModeDestinationATop, kImpellerBlendModeDestinationIn, kImpellerBlendModeDestinationOut, kImpellerBlendModeDestinationOver, kImpellerBlendModeDifference, kImpellerBlendModeExclusion, kImpellerBlendModeHardLight, kImpellerBlendModeHue, kImpellerBlendModeLighten, kImpellerBlendModeLuminosity, kImpellerBlendModeModulate, kImpellerBlendModeMultiply, kImpellerBlendModeOverlay, kImpellerBlendModePlus, kImpellerBlendModeSaturation, kImpellerBlendModeScreen, kImpellerBlendModeSoftLight, kImpellerBlendModeSource, kImpellerBlendModeSourceATop, kImpellerBlendModeSourceIn, kImpellerBlendModeSourceOut, kImpellerBlendModeSourceOver, kImpellerBlendModeXor, impeller::kLighten, impeller::kLuminosity, impeller::kModulate, impeller::kMultiply, impeller::kOverlay, impeller::kPlus, impeller::kSaturation, impeller::kScreen, impeller::kSoftLight, impeller::kSrc, impeller::kSrcATop, impeller::kSrcIn, impeller::kSrcOut, impeller::kSrcOver, and impeller::kXor.

◆ ToImpellerType() [9/11]

constexpr flutter::DlClipOp impeller::interop::ToImpellerType ( ImpellerClipOperation  op)
constexpr

Definition at line 277 of file formats.h.

277  {
278  switch (op) {
280  return flutter::DlClipOp::kDifference;
282  return flutter::DlClipOp::kIntersect;
283  }
284  return flutter::DlClipOp::kDifference;
285 }
@ kImpellerClipOperationIntersect
Definition: impeller.h:362
@ kImpellerClipOperationDifference
Definition: impeller.h:361

References kImpellerClipOperationDifference, and kImpellerClipOperationIntersect.

◆ ToImpellerType() [10/11]

constexpr FillType impeller::interop::ToImpellerType ( ImpellerFillType  type)
constexpr

Definition at line 267 of file formats.h.

267  {
268  switch (type) {
270  return FillType::kNonZero;
272  return FillType::kOdd;
273  }
274  return FillType::kNonZero;
275 }
GLenum type
@ kImpellerFillTypeOdd
Definition: impeller.h:357
@ kImpellerFillTypeNonZero
Definition: impeller.h:356

References kImpellerFillTypeNonZero, kImpellerFillTypeOdd, impeller::kNonZero, impeller::kOdd, and type.

◆ ToImpellerType() [11/11]

constexpr PixelFormat impeller::interop::ToImpellerType ( ImpellerPixelFormat  format)
constexpr

Definition at line 396 of file formats.h.

396  {
397  switch (format) {
399  return PixelFormat::kR8G8B8A8UNormInt;
400  }
401  return PixelFormat::kR8G8B8A8UNormInt;
402 }
@ kImpellerPixelFormatRGBA8888
Definition: impeller.h:416

References kImpellerPixelFormatRGBA8888, and impeller::kR8G8B8A8UNormInt.

◆ ToSkiaType() [1/7]

◆ ToSkiaType() [2/7]

constexpr SkPoint impeller::interop::ToSkiaType ( const Point point)
constexpr

Definition at line 33 of file formats.h.

33  {
34  return SkPoint::Make(point.x, point.y);
35 }

References impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

◆ ToSkiaType() [3/7]

constexpr SkRect impeller::interop::ToSkiaType ( const Rect rect)
constexpr

Definition at line 41 of file formats.h.

41  {
42  return SkRect::MakeXYWH(rect.GetX(), //
43  rect.GetY(), //
44  rect.GetWidth(), //
45  rect.GetHeight() //
46  );
47 }

References impeller::TRect< T >::GetHeight(), impeller::TRect< T >::GetWidth(), impeller::TRect< T >::GetX(), and impeller::TRect< T >::GetY().

◆ ToSkiaType() [4/7]

SkRRect impeller::interop::ToSkiaType ( const Rect rect,
const RoundingRadii radii 
)
inline

Definition at line 189 of file formats.h.

189  {
190  using Corner = SkRRect::Corner;
191  SkVector sk_radii[4];
192  sk_radii[Corner::kUpperLeft_Corner] = ToSkiaVector(radii.top_left);
193  sk_radii[Corner::kUpperRight_Corner] = ToSkiaVector(radii.top_right);
194  sk_radii[Corner::kLowerRight_Corner] = ToSkiaVector(radii.bottom_right);
195  sk_radii[Corner::kLowerLeft_Corner] = ToSkiaVector(radii.bottom_left);
196  SkRRect result;
197  result.setRectRadii(ToSkiaType(rect), sk_radii);
198  return result;
199 }
SkRRect ToSkiaType(const Rect &rect, const RoundingRadii &radii)
Definition: formats.h:189
constexpr SkVector ToSkiaVector(const Size &point)
Definition: formats.h:37

References impeller::RoundingRadii::bottom_left, impeller::RoundingRadii::bottom_right, impeller::RoundingRadii::top_left, impeller::RoundingRadii::top_right, ToSkiaType(), and ToSkiaVector().

◆ ToSkiaType() [5/7]

template<class SkiaType , class OtherType >
std::vector<SkiaType> impeller::interop::ToSkiaType ( const std::vector< OtherType > &  other_vec)

Definition at line 68 of file formats.h.

68  {
69  std::vector<SkiaType> skia_vec;
70  skia_vec.reserve(other_vec.size());
71  for (const auto& other : other_vec) {
72  skia_vec.emplace_back(ToSkiaType(other));
73  }
74  return skia_vec;
75 }

References ToSkiaType().

◆ ToSkiaType() [6/7]

constexpr SkPathFillType impeller::interop::ToSkiaType ( FillType  type)
constexpr

Definition at line 49 of file formats.h.

49  {
50  switch (type) {
51  case FillType::kNonZero:
52  return SkPathFillType::kWinding;
53  case FillType::kOdd:
54  return SkPathFillType::kEvenOdd;
55  }
56  return SkPathFillType::kWinding;
57 }

References impeller::kNonZero, impeller::kOdd, and type.

◆ ToSkiaType() [7/7]

constexpr SkIRect impeller::interop::ToSkiaType ( IRect  rect)
constexpr

Definition at line 59 of file formats.h.

59  {
60  return SkIRect::MakeXYWH(rect.GetX(), //
61  rect.GetY(), //
62  rect.GetWidth(), //
63  rect.GetHeight() //
64  );
65 }

References impeller::TRect< T >::GetHeight(), impeller::TRect< T >::GetWidth(), impeller::TRect< T >::GetX(), and impeller::TRect< T >::GetY().

◆ ToSkiaVector()

constexpr SkVector impeller::interop::ToSkiaVector ( const Size point)
constexpr

Definition at line 37 of file formats.h.

37  {
38  return SkVector::Make(point.width, point.height);
39 }

References impeller::TSize< T >::height, and impeller::TSize< T >::width.

Referenced by ToSkiaType().

◆ ToSkMatrix()

constexpr SkMatrix impeller::interop::ToSkMatrix ( const Matrix matrix)
constexpr

Definition at line 85 of file formats.h.

85  {
86  return SkM44::ColMajor(matrix.m).asM33();
87 }

References impeller::Matrix::m.

◆ ToTxtType() [1/4]

constexpr txt::FontStyle impeller::interop::ToTxtType ( ImpellerFontStyle  style)
constexpr

Definition at line 454 of file formats.h.

454  {
455  switch (style) {
457  return txt::FontStyle::normal;
459  return txt::FontStyle::italic;
460  }
461  return txt::FontStyle::normal;
462 }
@ kImpellerFontStyleItalic
Definition: impeller.h:458
@ kImpellerFontStyleNormal
Definition: impeller.h:457

References kImpellerFontStyleItalic, and kImpellerFontStyleNormal.

◆ ToTxtType() [2/4]

constexpr txt::FontWeight impeller::interop::ToTxtType ( ImpellerFontWeight  weight)
constexpr

Definition at line 430 of file formats.h.

430  {
431  switch (weight) {
433  return txt::FontWeight::w100;
435  return txt::FontWeight::w200;
437  return txt::FontWeight::w300;
439  return txt::FontWeight::w400;
441  return txt::FontWeight::w500;
443  return txt::FontWeight::w600;
445  return txt::FontWeight::w700;
447  return txt::FontWeight::w800;
449  return txt::FontWeight::w900;
450  }
451  return txt::FontWeight::w400;
452 }
@ kImpellerFontWeight400
Definition: impeller.h:448
@ kImpellerFontWeight500
Definition: impeller.h:449
@ kImpellerFontWeight700
Definition: impeller.h:451
@ kImpellerFontWeight200
Definition: impeller.h:446
@ kImpellerFontWeight300
Definition: impeller.h:447
@ kImpellerFontWeight900
Definition: impeller.h:453
@ kImpellerFontWeight800
Definition: impeller.h:452
@ kImpellerFontWeight600
Definition: impeller.h:450
@ kImpellerFontWeight100
Definition: impeller.h:445

References kImpellerFontWeight100, kImpellerFontWeight200, kImpellerFontWeight300, kImpellerFontWeight400, kImpellerFontWeight500, kImpellerFontWeight600, kImpellerFontWeight700, kImpellerFontWeight800, and kImpellerFontWeight900.

Referenced by ImpellerParagraphStyleSetFontStyle(), ImpellerParagraphStyleSetFontWeight(), ImpellerParagraphStyleSetTextAlignment(), and ImpellerParagraphStyleSetTextDirection().

◆ ToTxtType() [3/4]

constexpr txt::TextAlign impeller::interop::ToTxtType ( ImpellerTextAlignment  align)
constexpr

Definition at line 464 of file formats.h.

464  {
465  switch (align) {
467  return txt::TextAlign::left;
469  return txt::TextAlign::right;
471  return txt::TextAlign::center;
473  return txt::TextAlign::justify;
475  return txt::TextAlign::start;
477  return txt::TextAlign::end;
478  }
479  return txt::TextAlign::left;
480 }
@ kImpellerTextAlignmentJustify
Definition: impeller.h:465
@ kImpellerTextAlignmentLeft
Definition: impeller.h:462
@ kImpellerTextAlignmentCenter
Definition: impeller.h:464
@ kImpellerTextAlignmentRight
Definition: impeller.h:463
@ kImpellerTextAlignmentStart
Definition: impeller.h:466
@ kImpellerTextAlignmentEnd
Definition: impeller.h:467

References kImpellerTextAlignmentCenter, kImpellerTextAlignmentEnd, kImpellerTextAlignmentJustify, kImpellerTextAlignmentLeft, kImpellerTextAlignmentRight, and kImpellerTextAlignmentStart.

◆ ToTxtType() [4/4]

constexpr txt::TextDirection impeller::interop::ToTxtType ( ImpellerTextDirection  direction)
constexpr

Definition at line 482 of file formats.h.

482  {
483  switch (direction) {
485  return txt::TextDirection::rtl;
487  return txt::TextDirection::ltr;
488  }
489  return txt::TextDirection::ltr;
490 }
@ kImpellerTextDirectionLTR
Definition: impeller.h:472
@ kImpellerTextDirectionRTL
Definition: impeller.h:471

References kImpellerTextDirectionLTR, and kImpellerTextDirectionRTL.

Variable Documentation

◆ sContextVKProcAddressCallback

thread_local std::function<PFN_vkVoidFunction(VkInstance instance, const char* proc_name)> impeller::interop::sContextVKProcAddressCallback