Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
impeller::interop Namespace Reference

Namespaces

namespace  testing
 

Classes

class  ColorFilter
 
class  ColorSource
 
class  Context
 
class  ContextGLES
 
class  ContextMTL
 
class  ContextVK
 
class  DisplayList
 
class  DisplayListBuilder
 
class  FragmentProgram
 
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  Object
 
class  ObjectBase
 
class  Paint
 
class  Paragraph
 
class  ParagraphBuilder
 
class  ParagraphStyle
 
class  Path
 
class  PathBuilder
 
class  ReactorWorkerGLES
 
struct  SamplersAndUniforms
 
class  ScopedObject
 
class  Surface
 
class  SurfaceGLES
 
class  SurfaceMTL
 
class  SurfaceVK
 
class  SwapchainVK
 
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 SkColor ToSkiaType (const ImpellerColor &color)
 
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)
 
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::TextDecorationStyle ToTxtType (ImpellerTextDecorationStyle style)
 
constexpr int ToTxtType (ImpellerFontWeight weight)
 
constexpr txt::FontStyle ToTxtType (ImpellerFontStyle style)
 
constexpr txt::TextAlign ToTxtType (ImpellerTextAlignment align)
 
constexpr txt::TextDirection ToTxtType (ImpellerTextDirection direction)
 
static std::string AvailableStagesAsString (const std::set< RuntimeStageBackend > &stages)
 
const char * RuntimeStageBackendToString (RuntimeStageBackend backend)
 
 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 (FragmentProgram, ImpellerFragmentProgram)
 
 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 void ImpellerPathGetBounds (ImpellerPath path, ImpellerRect *out_bounds)
 
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)
 
static SamplersAndUniforms ReadSamplersAndUniforms (ImpellerTexture *samplers, size_t samplers_count, const uint8_t *data, size_t data_bytes_length)
 
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateFragmentProgramNew (ImpellerContext context, ImpellerFragmentProgram fragment_program, ImpellerTexture *samplers, size_t samplers_count, const uint8_t *data, size_t data_bytes_length)
 
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 ImpellerImageFilterCreateFragmentProgramNew (ImpellerContext context, ImpellerFragmentProgram fragment_program, ImpellerTexture *samplers, size_t samplers_count, const uint8_t *data, size_t data_bytes_length)
 
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 ImpellerParagraphStyleSetTextDecoration (ImpellerParagraphStyle paragraph_style, const ImpellerTextDecoration *decoration)
 
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 ImpellerParagraphStyleSetEllipsis (ImpellerParagraphStyle paragraph_style, const char *ellipsis)
 
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 void ImpellerParagraphGetWordBoundary (ImpellerParagraph paragraph, size_t code_unit_index, ImpellerRange *out_range)
 
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 void ImpellerGlyphInfoGetGraphemeClusterBounds (ImpellerGlyphInfo glyph_info, ImpellerRect *out_bounds)
 
IMPELLER_EXTERN_C bool ImpellerGlyphInfoIsEllipsis (ImpellerGlyphInfo glyph_info)
 
IMPELLER_EXTERN_C ImpellerTextDirection ImpellerGlyphInfoGetTextDirection (ImpellerGlyphInfo glyph_info)
 
static std::shared_ptr< fml::MappingMakeCopyableMapping (const ImpellerMapping *data, void *user_data)
 
IMPELLER_EXTERN_C ImpellerFragmentProgram ImpellerFragmentProgramNew (const ImpellerMapping *data, void *data_release_user_data)
 
IMPELLER_EXTERN_C void ImpellerFragmentProgramRetain (ImpellerFragmentProgram fragment_program)
 
IMPELLER_EXTERN_C void ImpellerFragmentProgramRelease (ImpellerFragmentProgram fragment_program)
 
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

enum class impeller::interop::AdoptTag
strong
Enumerator
kAdopted 

Definition at line 62 of file object.h.

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(Object *object)
Definition object.h:151

References Adopt().

◆ AvailableStagesAsString()

static std::string impeller::interop::AvailableStagesAsString ( const std::set< RuntimeStageBackend > &  stages)
static

Definition at line 43 of file fragment_program.cc.

44 {
45 std::stringstream stream;
46 size_t count = 0;
47 for (const auto& stage : stages) {
48 stream << RuntimeStageBackendToString(stage);
49 count++;
50 if (count != stages.size()) {
51 stream << ", ";
52 }
53 }
54 return stream.str();
55}
const char * RuntimeStageBackendToString(RuntimeStageBackend backend)

References RuntimeStageBackendToString().

Referenced by impeller::interop::FragmentProgram::FindRuntimeStage().

◆ CheckVersion()

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

Definition at line 96 of file impeller.cc.

96 {
97 if (version != IMPELLER_VERSION) {
98 VALIDATION_LOG << "This version of Impeller ("
100 << "doesn't match the version the user expects ("
101 << GetVersionAsString(version) << ").";
102 return false;
103 }
104 return true;
105}
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:82
#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 37 of file context_vk.cc.

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

References instance, and 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}
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args

References args, and kAdopted.

◆ 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}
sk_sp< SkFontMgr > GetDefaultFontManager(uint32_t font_initialization_data)
Definition platform.cc:17
std::shared_ptr< ContextGLES > context

References context, txt::GetDefaultFontManager(), and VALIDATION_LOG.

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

◆ DEFINE_PEER_GETTER() [1/20]

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

◆ DEFINE_PEER_GETTER() [2/20]

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

◆ DEFINE_PEER_GETTER() [3/20]

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

◆ DEFINE_PEER_GETTER() [4/20]

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

◆ DEFINE_PEER_GETTER() [5/20]

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

◆ DEFINE_PEER_GETTER() [6/20]

impeller::interop::DEFINE_PEER_GETTER ( FragmentProgram  ,
ImpellerFragmentProgram   
)

◆ DEFINE_PEER_GETTER() [7/20]

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

◆ DEFINE_PEER_GETTER() [8/20]

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

◆ DEFINE_PEER_GETTER() [9/20]

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

◆ DEFINE_PEER_GETTER() [10/20]

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

◆ DEFINE_PEER_GETTER() [11/20]

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

◆ DEFINE_PEER_GETTER() [12/20]

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

◆ DEFINE_PEER_GETTER() [13/20]

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

◆ DEFINE_PEER_GETTER() [14/20]

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

◆ DEFINE_PEER_GETTER() [15/20]

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

◆ DEFINE_PEER_GETTER() [16/20]

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

◆ DEFINE_PEER_GETTER() [17/20]

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

◆ DEFINE_PEER_GETTER() [18/20]

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

◆ DEFINE_PEER_GETTER() [19/20]

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

◆ DEFINE_PEER_GETTER() [20/20]

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

◆ FromImpellerType()

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

Definition at line 221 of file formats.h.

221 {
222 to.m[0] = from.m[0];
223 to.m[1] = from.m[1];
224 to.m[2] = from.m[2];
225 to.m[3] = from.m[3];
226 to.m[4] = from.m[4];
227 to.m[5] = from.m[5];
228 to.m[6] = from.m[6];
229 to.m[7] = from.m[7];
230 to.m[8] = from.m[8];
231 to.m[9] = from.m[9];
232 to.m[10] = from.m[10];
233 to.m[11] = from.m[11];
234 to.m[12] = from.m[12];
235 to.m[13] = from.m[13];
236 to.m[14] = from.m[14];
237 to.m[15] = from.m[15];
238}
float m[16]
Definition impeller.h:540
Scalar m[16]
Definition matrix.h:39

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

Referenced by ImpellerDisplayListBuilderGetTransform().

◆ GetVersionAsString()

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

Definition at line 82 of file impeller.cc.

82 {
83 std::stringstream stream;
84 stream << IMPELLER_VERSION_GET_VARIANT(version) << "."
85 << IMPELLER_VERSION_GET_MAJOR(version) << "."
86 << IMPELLER_VERSION_GET_MINOR(version) << "."
88 return stream.str();
89}
#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 1013 of file impeller.cc.

1015 {
1016 return ColorFilter::MakeBlend(ToImpellerType(*color),
1017 ToImpellerType(blend_mode))
1018 .Leak();
1019}
constexpr Matrix ToImpellerType(const ImpellerMatrix &m)
Definition formats.h:213

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

◆ ImpellerColorFilterCreateColorMatrixNew()

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

Definition at line 1022 of file impeller.cc.

1023 {
1024 return ColorFilter::MakeMatrix(color_matrix->m).Leak();
1025}

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

◆ ImpellerColorFilterRelease()

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

Definition at line 1008 of file impeller.cc.

1008 {
1009 ObjectBase::SafeRelease(color_filter);
1010}

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

◆ ImpellerColorFilterRetain()

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

Definition at line 1003 of file impeller.cc.

1003 {
1004 ObjectBase::SafeRetain(color_filter);
1005}

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 889 of file impeller.cc.

898 {
899 const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
900 return ColorSource::MakeConicalGradient(
901 ToImpellerType(*start_center), //
902 start_radius, //
903 ToImpellerType(*end_center), //
904 end_radius, //
905 colors_and_stops.first, //
906 colors_and_stops.second, //
907 ToDisplayListType(tile_mode), //
908 transformation == nullptr ? Matrix{}
909 : ToImpellerType(*transformation) //
910 )
911 .Leak();
912}
static std::pair< std::vector< flutter::DlColor >, std::vector< Scalar > > ParseColorsAndStops(uint32_t stop_count, const ImpellerColor *colors, const float *stops)
Definition impeller.cc:828
constexpr flutter::DlColor ToDisplayListType(Color color)
Definition formats.h:89
A 4x4 matrix using column-major storage.
Definition matrix.h:37

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

◆ ImpellerColorSourceCreateFragmentProgramNew()

IMPELLER_EXTERN_C ImpellerColorSource impeller::interop::ImpellerColorSourceCreateFragmentProgramNew ( ImpellerContext  context,
ImpellerFragmentProgram  fragment_program,
ImpellerTexture *  samplers,
size_t  samplers_count,
const uint8_t *  data,
size_t  data_bytes_length 
)

Definition at line 985 of file impeller.cc.

991 {
992 auto bindings = ReadSamplersAndUniforms(samplers, samplers_count, data,
993 data_bytes_length);
994 return ColorSource::MakeFragmentProgram(*GetPeer(context), //
995 *GetPeer(fragment_program), //
996 std::move(bindings.samplers), //
997 std::move(bindings.uniforms) //
998 )
999 .Leak();
1000}
static SamplersAndUniforms ReadSamplersAndUniforms(ImpellerTexture *samplers, size_t samplers_count, const uint8_t *data, size_t data_bytes_length)
Definition impeller.cc:961

References context, impeller::interop::ColorSource::MakeFragmentProgram(), and ReadSamplersAndUniforms().

◆ 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 939 of file impeller.cc.

944 {
945 return ColorSource::MakeImage(
946 *GetPeer(image), //
947 ToDisplayListType(horizontal_tile_mode), //
948 ToDisplayListType(vertical_tile_mode), //
949 ToDisplayListType(sampling), //
950 transformation == nullptr ? Matrix{}
951 : ToImpellerType(*transformation) //
952 )
953 .Leak();
954}
FlutterVulkanImage * image

References image, 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 845 of file impeller.cc.

852 {
853 const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
854 return ColorSource::MakeLinearGradient(
855 ToImpellerType(*start_point), //
856 ToImpellerType(*end_point), //
857 colors_and_stops.first, //
858 colors_and_stops.second, //
859 ToDisplayListType(tile_mode), //
860 transformation == nullptr ? Matrix{}
861 : ToImpellerType(*transformation) //
862 )
863 .Leak();
864}

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 867 of file impeller.cc.

874 {
875 const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
876 return ColorSource::MakeRadialGradient(
877 ToImpellerType(*center), //
878 radius, //
879 colors_and_stops.first, //
880 colors_and_stops.second, //
881 ToDisplayListType(tile_mode), //
882 transformation == nullptr ? Matrix{}
883 : ToImpellerType(*transformation) //
884 )
885 .Leak();
886}

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 915 of file impeller.cc.

923 {
924 const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
925 return ColorSource::MakeSweepGradient(
926 ToImpellerType(*center), //
927 start, //
928 end, //
929 colors_and_stops.first, //
930 colors_and_stops.second, //
931 ToDisplayListType(tile_mode), //
932 transformation == nullptr ? Matrix{}
933 : ToImpellerType(*transformation) //
934 )
935 .Leak();
936}
const size_t end

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

◆ ImpellerColorSourceRelease()

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

Definition at line 823 of file impeller.cc.

823 {
824 ObjectBase::SafeRelease(color_source);
825}

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

◆ ImpellerColorSourceRetain()

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

Definition at line 818 of file impeller.cc.

818 {
819 ObjectBase::SafeRetain(color_source);
820}

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

◆ ImpellerContextCreateMetalNew()

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

Definition at line 134 of file impeller.cc.

134 {
135 if (!CheckVersion(version)) {
136 return nullptr;
137 }
138#if IMPELLER_ENABLE_METAL
139 auto context = ContextMTL::Create();
140 if (!context || !context->IsValid()) {
141 VALIDATION_LOG << "Could not create valid context.";
142 return nullptr;
143 }
144 return context.Leak();
145#else // IMPELLER_ENABLE_METAL
146 VALIDATION_LOG << "Metal not available.";
147 return nullptr;
148#endif // IMPELLER_ENABLE_METAL
149}
static bool CheckVersion(uint32_t version)
Definition impeller.cc:96

References CheckVersion(), context, 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 108 of file impeller.cc.

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

References CheckVersion(), context, 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 152 of file impeller.cc.

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

References CheckVersion(), context, 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 181 of file impeller.cc.

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

References context, and VALIDATION_LOG.

◆ ImpellerContextRelease()

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

Definition at line 176 of file impeller.cc.

176 {
177 ObjectBase::SafeRelease(context);
178}

References context, and impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerContextRetain()

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

Definition at line 171 of file impeller.cc.

171 {
172 ObjectBase::SafeRetain(context);
173}

References context, and impeller::interop::ObjectBase::SafeRetain().

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

◆ ImpellerDisplayListBuilderClipOval()

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

Definition at line 439 of file impeller.cc.

441 {
442 GetPeer(builder)->ClipOval(ToImpellerType(*oval_bounds), ToImpellerType(op));
443}

References ToImpellerType().

◆ ImpellerDisplayListBuilderClipPath()

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

Definition at line 458 of file impeller.cc.

460 {
461 GetPeer(builder)->ClipPath(*GetPeer(path), ToImpellerType(op));
462}

References ToImpellerType().

◆ ImpellerDisplayListBuilderClipRect()

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

Definition at line 432 of file impeller.cc.

434 {
435 GetPeer(builder)->ClipRect(ToImpellerType(*rect), ToImpellerType(op));
436}

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 446 of file impeller.cc.

450 {
451 GetPeer(builder)->ClipRoundedRect(ToImpellerType(*rect), //
452 ToImpellerType(*radii), //
453 ToImpellerType(op) //
454 );
455}

References ToImpellerType().

◆ ImpellerDisplayListBuilderCreateDisplayListNew()

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

Definition at line 714 of file impeller.cc.

715 {
716 auto dl = GetPeer(builder)->Build();
717 if (!dl->IsValid()) {
718 return nullptr;
719 }
720 return dl.Leak();
721}

Referenced by impeller::interop::testing::TEST_P(), impeller::interop::testing::TEST_P(), impeller::interop::testing::TEST_P(), and 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 532 of file impeller.cc.

538 {
539 GetPeer(builder)->DrawDashedLine(ToImpellerType(*from), //
540 ToImpellerType(*to), //
541 on_length, //
542 off_length, //
543 *GetPeer(paint) //
544 );
545}

References ToImpellerType().

◆ ImpellerDisplayListBuilderDrawDisplayList()

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

Definition at line 724 of file impeller.cc.

727 {
728 GetPeer(builder)->DrawDisplayList(*GetPeer(display_list), opacity);
729}

◆ ImpellerDisplayListBuilderDrawLine()

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

Definition at line 521 of file impeller.cc.

524 {
525 GetPeer(builder)->DrawLine(ToImpellerType(*from), //
526 ToImpellerType(*to), //
527 *GetPeer(paint) //
528 );
529}

References ToImpellerType().

◆ ImpellerDisplayListBuilderDrawOval()

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

Definition at line 555 of file impeller.cc.

557 {
558 GetPeer(builder)->DrawOval(ToImpellerType(*oval_bounds), *GetPeer(paint));
559}

References ToImpellerType().

◆ ImpellerDisplayListBuilderDrawPaint()

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

Definition at line 515 of file impeller.cc.

516 {
517 GetPeer(builder)->DrawPaint(*GetPeer(paint));
518}

◆ ImpellerDisplayListBuilderDrawParagraph()

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

Definition at line 1235 of file impeller.cc.

1237 {
1238 GetPeer(builder)->DrawParagraph(*GetPeer(paragraph), ToImpellerType(*point));
1239}

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 590 of file impeller.cc.

592 {
593 GetPeer(builder)->DrawPath(*GetPeer(path), *GetPeer(paint));
594}

◆ ImpellerDisplayListBuilderDrawRect()

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

Definition at line 548 of file impeller.cc.

550 {
551 GetPeer(builder)->DrawRect(ToImpellerType(*rect), *GetPeer(paint));
552}

References ToImpellerType().

Referenced by impeller::interop::testing::TEST_P(), and 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 562 of file impeller.cc.

566 {
567 GetPeer(builder)->DrawRoundedRect(ToImpellerType(*rect), //
568 ToImpellerType(*radii), //
569 *GetPeer(paint) //
570 );
571}

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 574 of file impeller.cc.

580 {
581 GetPeer(builder)->DrawRoundedRectDifference(ToImpellerType(*outer_rect), //
582 ToImpellerType(*outer_radii), //
583 ToImpellerType(*inner_rect), //
584 ToImpellerType(*inner_radii), //
585 *GetPeer(paint) //
586 );
587}

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 1242 of file impeller.cc.

1247 {
1248 GetPeer(builder)->DrawShadow(*GetPeer(path), //
1249 ToDisplayListType(*color), //
1250 elevation, //
1251 occluder_is_transparent, //
1252 device_pixel_ratio //
1253 );
1254}

References ToDisplayListType().

◆ ImpellerDisplayListBuilderDrawTexture()

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

Definition at line 789 of file impeller.cc.

793 {
794 GetPeer(builder)->DrawTexture(*GetPeer(texture), //
795 ToImpellerType(*point), //
796 ToDisplayListType(sampling), //
797 GetPeer(paint) //
798 );
799}
FlTexture * texture

References texture, 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 802 of file impeller.cc.

808 {
809 GetPeer(builder)->DrawTextureRect(*GetPeer(texture), //
810 ToImpellerType(*src_rect), //
811 ToImpellerType(*dst_rect), //
812 ToDisplayListType(sampling), //
813 GetPeer(paint) //
814 );
815}

References texture, ToDisplayListType(), and ToImpellerType().

◆ ImpellerDisplayListBuilderGetSaveCount()

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

Definition at line 309 of file impeller.cc.

310 {
311 return GetPeer(builder)->GetSaveCount();
312}

◆ ImpellerDisplayListBuilderGetTransform()

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

Definition at line 297 of file impeller.cc.

298 {
299 FromImpellerType(GetPeer(builder)->GetTransform(), *out_transform);
300}
constexpr void FromImpellerType(const Matrix &from, ImpellerMatrix &to)
Definition formats.h:221

References FromImpellerType().

◆ ImpellerDisplayListBuilderNew()

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

Definition at line 229 of file impeller.cc.

229 {
230 return Create<DisplayListBuilder>(cull_rect).Leak();
231}

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

◆ ImpellerDisplayListBuilderRelease()

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

Definition at line 239 of file impeller.cc.

239 {
240 ObjectBase::SafeRelease(builder);
241}

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

◆ ImpellerDisplayListBuilderResetTransform()

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

Definition at line 303 of file impeller.cc.

304 {
305 GetPeer(builder)->ResetTransform();
306}

◆ ImpellerDisplayListBuilderRestore()

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

Definition at line 260 of file impeller.cc.

260 {
261 GetPeer(builder)->Restore();
262}

◆ ImpellerDisplayListBuilderRestoreToCount()

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

Definition at line 315 of file impeller.cc.

317 {
318 GetPeer(builder)->RestoreToCount(count);
319}

◆ ImpellerDisplayListBuilderRetain()

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

Definition at line 234 of file impeller.cc.

234 {
235 ObjectBase::SafeRetain(builder);
236}

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

◆ ImpellerDisplayListBuilderRotate()

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

Definition at line 272 of file impeller.cc.

273 {
274 GetPeer(builder)->Rotate(Degrees{angle_degrees});
275}

◆ ImpellerDisplayListBuilderSave()

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

Definition at line 244 of file impeller.cc.

244 {
245 GetPeer(builder)->Save();
246}

◆ ImpellerDisplayListBuilderSaveLayer()

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

Definition at line 249 of file impeller.cc.

252 {
253 GetPeer(builder)->SaveLayer(ToImpellerType(*bounds), //
254 GetPeer(paint), //
255 GetPeer(backdrop) //
256 );
257}

References ToImpellerType().

◆ ImpellerDisplayListBuilderScale()

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

Definition at line 265 of file impeller.cc.

267 {
268 GetPeer(builder)->Scale(Size{x_scale, y_scale});
269}

◆ ImpellerDisplayListBuilderSetTransform()

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

Definition at line 285 of file impeller.cc.

286 {
287 GetPeer(builder)->SetTransform(ToImpellerType(*transform));
288}

References ToImpellerType(), and transform.

◆ ImpellerDisplayListBuilderTransform()

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

Definition at line 291 of file impeller.cc.

292 {
293 GetPeer(builder)->Transform(ToImpellerType(*transform));
294}

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 278 of file impeller.cc.

280 {
281 GetPeer(builder)->Translate(Point{x_translation, y_translation});
282}

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

◆ ImpellerDisplayListRelease()

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

Definition at line 709 of file impeller.cc.

709 {
710 ObjectBase::SafeRelease(display_list);
711}

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

◆ ImpellerDisplayListRetain()

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

Definition at line 704 of file impeller.cc.

704 {
705 ObjectBase::SafeRetain(display_list);
706}

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

◆ ImpellerFragmentProgramNew()

IMPELLER_EXTERN_C ImpellerFragmentProgram impeller::interop::ImpellerFragmentProgramNew ( const ImpellerMapping data,
void *  data_release_user_data 
)

Definition at line 1583 of file impeller.cc.

1585 {
1586 auto data_mapping = MakeCopyableMapping(data, data_release_user_data);
1587 auto program = Create<FragmentProgram>(std::move(data_mapping));
1588 if (!program->IsValid()) {
1589 VALIDATION_LOG << "Could not create valid fragment program.";
1590 return nullptr;
1591 }
1592 return program.Leak();
1593}
static std::shared_ptr< fml::Mapping > MakeCopyableMapping(const ImpellerMapping *data, void *user_data)
Definition impeller.cc:1561

References MakeCopyableMapping(), and VALIDATION_LOG.

◆ ImpellerFragmentProgramRelease()

IMPELLER_EXTERN_C void impeller::interop::ImpellerFragmentProgramRelease ( ImpellerFragmentProgram  fragment_program)

Definition at line 1601 of file impeller.cc.

1601 {
1602 ObjectBase::SafeRelease(fragment_program);
1603}

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

◆ ImpellerFragmentProgramRetain()

IMPELLER_EXTERN_C void impeller::interop::ImpellerFragmentProgramRetain ( ImpellerFragmentProgram  fragment_program)

Definition at line 1596 of file impeller.cc.

1596 {
1597 ObjectBase::SafeRetain(fragment_program);
1598}

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

◆ ImpellerGetVersion()

IMPELLER_EXTERN_C uint32_t impeller::interop::ImpellerGetVersion ( )

Definition at line 92 of file impeller.cc.

92 {
93 return IMPELLER_VERSION;
94}

References IMPELLER_VERSION.

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

◆ ImpellerGlyphInfoGetGraphemeClusterBounds()

IMPELLER_EXTERN_C void impeller::interop::ImpellerGlyphInfoGetGraphemeClusterBounds ( ImpellerGlyphInfo  glyph_info,
ImpellerRect out_bounds 
)

Definition at line 1541 of file impeller.cc.

1542 {
1543 *out_bounds = GetPeer(glyph_info)->GetGraphemeClusterBounds();
1544}

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

◆ ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeBegin()

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

Definition at line 1529 of file impeller.cc.

1530 {
1531 return GetPeer(glyph_info)->GetGraphemeClusterCodeUnitRangeBegin();
1532}

◆ ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeEnd()

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

Definition at line 1535 of file impeller.cc.

1536 {
1537 return GetPeer(glyph_info)->GetGraphemeClusterCodeUnitRangeEnd();
1538}

◆ ImpellerGlyphInfoGetTextDirection()

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

Definition at line 1552 of file impeller.cc.

1553 {
1554 return GetPeer(glyph_info)->GetTextDirection();
1555}

◆ ImpellerGlyphInfoIsEllipsis()

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

Definition at line 1547 of file impeller.cc.

1547 {
1548 return GetPeer(glyph_info)->IsEllipsis();
1549}

◆ ImpellerGlyphInfoRelease()

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

Definition at line 1524 of file impeller.cc.

1524 {
1525 ObjectBase::SafeRelease(glyph_info);
1526}

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

◆ ImpellerGlyphInfoRetain()

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

Definition at line 1519 of file impeller.cc.

1519 {
1520 ObjectBase::SafeRetain(glyph_info);
1521}

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 1054 of file impeller.cc.

1057 {
1058 return ImageFilter::MakeBlur(x_sigma, y_sigma, ToDisplayListType(tile_mode))
1059 .Leak();
1060}

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

◆ ImpellerImageFilterCreateComposeNew()

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

Definition at line 1102 of file impeller.cc.

1103 {
1104 return ImageFilter::MakeCompose(*GetPeer(outer), *GetPeer(inner)).Leak();
1105}

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

◆ ImpellerImageFilterCreateDilateNew()

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

Definition at line 1063 of file impeller.cc.

1064 {
1065 return ImageFilter::MakeDilate(x_radius, y_radius).Leak();
1066}

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

◆ ImpellerImageFilterCreateErodeNew()

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

Definition at line 1069 of file impeller.cc.

1070 {
1071 return ImageFilter::MakeErode(x_radius, y_radius).Leak();
1072}

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

◆ ImpellerImageFilterCreateFragmentProgramNew()

IMPELLER_EXTERN_C ImpellerImageFilter impeller::interop::ImpellerImageFilterCreateFragmentProgramNew ( ImpellerContext  context,
ImpellerFragmentProgram  fragment_program,
ImpellerTexture *  samplers,
size_t  samplers_count,
const uint8_t *  data,
size_t  data_bytes_length 
)

Definition at line 1084 of file impeller.cc.

1090 {
1091 auto bindings = ReadSamplersAndUniforms(samplers, samplers_count, data,
1092 data_bytes_length);
1093 return ImageFilter::MakeFragmentProgram(*GetPeer(context), //
1094 *GetPeer(fragment_program), //
1095 std::move(bindings.samplers), //
1096 std::move(bindings.uniforms) //
1097 )
1098 .Leak();
1099}

References context, impeller::interop::ImageFilter::MakeFragmentProgram(), and ReadSamplersAndUniforms().

◆ ImpellerImageFilterCreateMatrixNew()

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

Definition at line 1075 of file impeller.cc.

1077 {
1078 return ImageFilter::MakeMatrix(ToImpellerType(*matrix),
1079 ToDisplayListType(sampling))
1080 .Leak();
1081}

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

◆ ImpellerImageFilterRelease()

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

Definition at line 1049 of file impeller.cc.

1049 {
1050 ObjectBase::SafeRelease(image_filter);
1051}

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

◆ ImpellerImageFilterRetain()

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

Definition at line 1044 of file impeller.cc.

1044 {
1045 ObjectBase::SafeRetain(image_filter);
1046}

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

◆ ImpellerLineMetricsGetAscent()

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

Definition at line 1453 of file impeller.cc.

1453 {
1454 return GetPeer(metrics)->GetAscent(line);
1455}

◆ ImpellerLineMetricsGetBaseline()

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

Definition at line 1463 of file impeller.cc.

1464 {
1465 return GetPeer(metrics)->GetBaseline(line);
1466}

◆ ImpellerLineMetricsGetCodeUnitEndIndex()

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

Definition at line 1495 of file impeller.cc.

1496 {
1497 return GetPeer(metrics)->GetCodeUnitEndIndex(line);
1498}

◆ ImpellerLineMetricsGetCodeUnitEndIndexExcludingWhitespace()

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

Definition at line 1501 of file impeller.cc.

1503 {
1504 return GetPeer(metrics)->GetCodeUnitEndIndexExcludingWhitespace(line);
1505}

◆ ImpellerLineMetricsGetCodeUnitEndIndexIncludingNewline()

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

Definition at line 1508 of file impeller.cc.

1510 {
1511 return GetPeer(metrics)->GetCodeUnitEndIndexIncludingNewline(line);
1512}

◆ ImpellerLineMetricsGetCodeUnitStartIndex()

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

Definition at line 1489 of file impeller.cc.

1490 {
1491 return GetPeer(metrics)->GetCodeUnitStartIndex(line);
1492}

◆ ImpellerLineMetricsGetDescent()

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

Definition at line 1458 of file impeller.cc.

1458 {
1459 return GetPeer(metrics)->GetDescent(line);
1460}

◆ ImpellerLineMetricsGetHeight()

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

Definition at line 1479 of file impeller.cc.

1479 {
1480 return GetPeer(metrics)->GetHeight(line);
1481}

◆ ImpellerLineMetricsGetLeft()

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

Definition at line 1484 of file impeller.cc.

1484 {
1485 return GetPeer(metrics)->GetLeft(line);
1486}

◆ ImpellerLineMetricsGetUnscaledAscent()

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

Definition at line 1447 of file impeller.cc.

1448 {
1449 return GetPeer(metrics)->GetUnscaledAscent(line);
1450}

◆ ImpellerLineMetricsGetWidth()

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

Definition at line 1474 of file impeller.cc.

1474 {
1475 return GetPeer(metrics)->GetWidth(line);
1476}

◆ ImpellerLineMetricsIsHardbreak()

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

Definition at line 1469 of file impeller.cc.

1469 {
1470 return GetPeer(metrics)->IsHardbreak(line);
1471}

◆ ImpellerLineMetricsRelease()

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

Definition at line 1442 of file impeller.cc.

1442 {
1443 ObjectBase::SafeRelease(line_metrics);
1444}

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

◆ ImpellerLineMetricsRetain()

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

Definition at line 1437 of file impeller.cc.

1437 {
1438 ObjectBase::SafeRetain(line_metrics);
1439}

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

◆ ImpellerMaskFilterCreateBlurNew()

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

Definition at line 1038 of file impeller.cc.

1039 {
1040 return MaskFilter::MakeBlur(ToDisplayListType(style), sigma).Leak();
1041}

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

◆ ImpellerMaskFilterRelease()

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

Definition at line 1033 of file impeller.cc.

1033 {
1034 ObjectBase::SafeRelease(mask_filter);
1035}

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

◆ ImpellerMaskFilterRetain()

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

Definition at line 1028 of file impeller.cc.

1028 {
1029 ObjectBase::SafeRetain(mask_filter);
1030}

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

◆ ImpellerPaintNew()

IMPELLER_EXTERN_C ImpellerPaint impeller::interop::ImpellerPaintNew ( )

Definition at line 465 of file impeller.cc.

465 {
466 return Create<Paint>().Leak();
467}

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

◆ ImpellerPaintRelease()

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

Definition at line 475 of file impeller.cc.

475 {
476 ObjectBase::SafeRelease(paint);
477}

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

◆ ImpellerPaintRetain()

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

Definition at line 470 of file impeller.cc.

470 {
471 ObjectBase::SafeRetain(paint);
472}

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

◆ ImpellerPaintSetBlendMode()

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

Definition at line 485 of file impeller.cc.

485 {
486 GetPeer(paint)->SetBlendMode(ToImpellerType(mode));
487}

References ToImpellerType().

◆ ImpellerPaintSetColor()

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

Definition at line 480 of file impeller.cc.

480 {
481 GetPeer(paint)->SetColor(ToDisplayListType(*color));
482}

References ToDisplayListType().

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

◆ ImpellerPaintSetColorFilter()

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

Definition at line 1108 of file impeller.cc.

1109 {
1110 GetPeer(paint)->SetColorFilter(*GetPeer(color_filter));
1111}

◆ ImpellerPaintSetColorSource()

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

Definition at line 1114 of file impeller.cc.

1115 {
1116 GetPeer(paint)->SetColorSource(*GetPeer(color_source));
1117}

◆ ImpellerPaintSetDrawStyle()

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

Definition at line 490 of file impeller.cc.

490 {
491 GetPeer(paint)->SetDrawStyle(ToDisplayListType(style));
492}

References ToDisplayListType().

◆ ImpellerPaintSetImageFilter()

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

Definition at line 1120 of file impeller.cc.

1121 {
1122 GetPeer(paint)->SetImageFilter(*GetPeer(image_filter));
1123}

◆ ImpellerPaintSetMaskFilter()

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

Definition at line 1126 of file impeller.cc.

1127 {
1128 GetPeer(paint)->SetMaskFilter(*GetPeer(mask_filter));
1129}

◆ ImpellerPaintSetStrokeCap()

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

Definition at line 495 of file impeller.cc.

495 {
496 GetPeer(paint)->SetStrokeCap(ToDisplayListType(cap));
497}

References ToDisplayListType().

◆ ImpellerPaintSetStrokeJoin()

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

Definition at line 500 of file impeller.cc.

500 {
501 GetPeer(paint)->SetStrokeJoin(ToDisplayListType(join));
502}

References ToDisplayListType().

◆ ImpellerPaintSetStrokeMiter()

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

Definition at line 510 of file impeller.cc.

510 {
511 GetPeer(paint)->SetStrokeMiter(miter);
512}

◆ ImpellerPaintSetStrokeWidth()

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

Definition at line 505 of file impeller.cc.

505 {
506 GetPeer(paint)->SetStrokeWidth(width);
507}
int32_t width

References width.

◆ ImpellerParagraphBuilderAddText()

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

Definition at line 1294 of file impeller.cc.

1296 {
1297 if (data == nullptr) {
1298 length = 0;
1299 }
1300 if (length == 0) {
1301 return;
1302 }
1303 GetPeer(paragraph_builder)->AddText(data, length);
1304}
size_t length

References length.

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

◆ ImpellerParagraphBuilderBuildParagraphNew()

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

Definition at line 1307 of file impeller.cc.

1309 {
1310 return GetPeer(paragraph_builder)->Build(width).Leak();
1311}

References width.

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

◆ ImpellerParagraphBuilderNew()

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

Definition at line 1257 of file impeller.cc.

1258 {
1259 auto builder =
1260 Create<ParagraphBuilder>(Ref<TypographyContext>(GetPeer(context)));
1261 if (!builder->IsValid()) {
1262 VALIDATION_LOG << "Could not create valid paragraph builder.";
1263 return nullptr;
1264 }
1265 return builder.Leak();
1266}

References context, and VALIDATION_LOG.

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

◆ ImpellerParagraphBuilderPopStyle()

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

Definition at line 1288 of file impeller.cc.

1289 {
1290 GetPeer(paragraph_builder)->PopStyle();
1291}

◆ ImpellerParagraphBuilderPushStyle()

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

Definition at line 1281 of file impeller.cc.

1283 {
1284 GetPeer(paragraph_builder)->PushStyle(*GetPeer(style));
1285}

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

◆ ImpellerParagraphBuilderRelease()

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

Definition at line 1275 of file impeller.cc.

1276 {
1277 ObjectBase::SafeRelease(paragraph_builder);
1278}

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

◆ ImpellerParagraphBuilderRetain()

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

Definition at line 1269 of file impeller.cc.

1270 {
1271 ObjectBase::SafeRetain(paragraph_builder);
1272}

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

◆ ImpellerParagraphCreateGlyphInfoAtCodeUnitIndexNew()

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

Definition at line 1414 of file impeller.cc.

1416 {
1417 return GetPeer(paragraph)
1418 ->GetGlyphInfoAtCodeUnitIndex(code_unit_index)
1419 .Leak();
1420}

◆ ImpellerParagraphCreateGlyphInfoAtParagraphCoordinatesNew()

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

Definition at line 1423 of file impeller.cc.

1426 {
1427 return GetPeer(paragraph)
1428 ->GetClosestGlyphInfoAtParagraphCoordinates(x, y)
1429 .Leak();
1430}
int32_t x
double y

References x, and y.

◆ ImpellerParagraphGetAlphabeticBaseline()

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

Definition at line 1354 of file impeller.cc.

1354 {
1355 return GetPeer(paragraph)->GetAlphabeticBaseline();
1356}

◆ ImpellerParagraphGetHeight()

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

Definition at line 1329 of file impeller.cc.

1329 {
1330 return GetPeer(paragraph)->GetHeight();
1331}

◆ ImpellerParagraphGetIdeographicBaseline()

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

Definition at line 1349 of file impeller.cc.

1349 {
1350 return GetPeer(paragraph)->GetIdeographicBaseline();
1351}

◆ ImpellerParagraphGetLineCount()

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

Definition at line 1359 of file impeller.cc.

1359 {
1360 return GetPeer(paragraph)->GetLineCount();
1361}

◆ ImpellerParagraphGetLineMetrics()

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

Definition at line 1408 of file impeller.cc.

1409 {
1410 return GetPeer(paragraph)->GetLineMetrics().GetC();
1411}

◆ ImpellerParagraphGetLongestLineWidth()

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

Definition at line 1334 of file impeller.cc.

1334 {
1335 return GetPeer(paragraph)->GetLongestLineWidth();
1336}

◆ ImpellerParagraphGetMaxIntrinsicWidth()

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

Definition at line 1344 of file impeller.cc.

1344 {
1345 return GetPeer(paragraph)->GetMaxIntrinsicWidth();
1346}

◆ ImpellerParagraphGetMaxWidth()

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

Definition at line 1324 of file impeller.cc.

1324 {
1325 return GetPeer(paragraph)->GetMaxWidth();
1326}

◆ ImpellerParagraphGetMinIntrinsicWidth()

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

Definition at line 1339 of file impeller.cc.

1339 {
1340 return GetPeer(paragraph)->GetMinIntrinsicWidth();
1341}

◆ ImpellerParagraphGetWordBoundary()

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

Definition at line 1364 of file impeller.cc.

1366 {
1367 *out_range = GetPeer(paragraph)->GetWordBoundary(code_unit_index);
1368}

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

◆ ImpellerParagraphRelease()

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

Definition at line 1319 of file impeller.cc.

1319 {
1320 ObjectBase::SafeRelease(paragraph);
1321}

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

◆ ImpellerParagraphRetain()

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

Definition at line 1314 of file impeller.cc.

1314 {
1315 ObjectBase::SafeRetain(paragraph);
1316}

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

◆ ImpellerParagraphStyleNew()

IMPELLER_EXTERN_C ImpellerParagraphStyle impeller::interop::ImpellerParagraphStyleNew ( )

Definition at line 1132 of file impeller.cc.

1132 {
1133 return Create<ParagraphStyle>().Leak();
1134}

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

◆ ImpellerParagraphStyleRelease()

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

Definition at line 1142 of file impeller.cc.

1142 {
1143 ObjectBase::SafeRelease(paragraph_style);
1144}

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

◆ ImpellerParagraphStyleRetain()

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

Definition at line 1137 of file impeller.cc.

1137 {
1138 ObjectBase::SafeRetain(paragraph_style);
1139}

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

◆ ImpellerParagraphStyleSetBackground()

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

Definition at line 1153 of file impeller.cc.

1154 {
1155 GetPeer(paragraph_style)->SetBackground(Ref(GetPeer(paint)));
1156}

References Ref().

◆ ImpellerParagraphStyleSetEllipsis()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetEllipsis ( ImpellerParagraphStyle  paragraph_style,
const char *  ellipsis 
)

Definition at line 1229 of file impeller.cc.

1230 {
1231 GetPeer(paragraph_style)->SetEllipsis(ReadString(ellipsis));
1232}
static std::string ReadString(const char *string)
Definition impeller.cc:1170

References ReadString().

◆ ImpellerParagraphStyleSetFontFamily()

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

Definition at line 1178 of file impeller.cc.

1179 {
1180 GetPeer(paragraph_style)->SetFontFamily(ReadString(family_name));
1181}

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 1184 of file impeller.cc.

1185 {
1186 GetPeer(paragraph_style)->SetFontSize(size);
1187}

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

◆ ImpellerParagraphStyleSetFontStyle()

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

Definition at line 1165 of file impeller.cc.

1166 {
1167 GetPeer(paragraph_style)->SetFontStyle(ToTxtType(style));
1168}
constexpr txt::TextDecorationStyle ToTxtType(ImpellerTextDecorationStyle style)
Definition formats.h:442

References ToTxtType().

◆ ImpellerParagraphStyleSetFontWeight()

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

Definition at line 1159 of file impeller.cc.

1160 {
1161 GetPeer(paragraph_style)->SetFontWeight(ToTxtType(weight));
1162}

References ToTxtType(), and weight.

◆ ImpellerParagraphStyleSetForeground()

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

Definition at line 1147 of file impeller.cc.

1148 {
1149 GetPeer(paragraph_style)->SetForeground(Ref(GetPeer(paint)));
1150}

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 1190 of file impeller.cc.

1191 {
1192 GetPeer(paragraph_style)->SetHeight(height);
1193}
int32_t height

References height.

◆ ImpellerParagraphStyleSetLocale()

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

Definition at line 1223 of file impeller.cc.

1224 {
1225 GetPeer(paragraph_style)->SetLocale(ReadString(locale));
1226}

References ReadString().

◆ ImpellerParagraphStyleSetMaxLines()

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

Definition at line 1217 of file impeller.cc.

1218 {
1219 GetPeer(paragraph_style)->SetMaxLines(max_lines);
1220}

◆ ImpellerParagraphStyleSetTextAlignment()

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

Definition at line 1196 of file impeller.cc.

1198 {
1199 GetPeer(paragraph_style)->SetTextAlignment(ToTxtType(align));
1200}

References ToTxtType().

◆ ImpellerParagraphStyleSetTextDecoration()

IMPELLER_EXTERN_C void impeller::interop::ImpellerParagraphStyleSetTextDecoration ( ImpellerParagraphStyle  paragraph_style,
const ImpellerTextDecoration decoration 
)

Definition at line 1210 of file impeller.cc.

1212 {
1213 GetPeer(paragraph_style)->SetTextDecoration(*decoration);
1214}

◆ ImpellerParagraphStyleSetTextDirection()

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

Definition at line 1203 of file impeller.cc.

1205 {
1206 GetPeer(paragraph_style)->SetTextDirection(ToTxtType(direction));
1207}

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 389 of file impeller.cc.

392 {
393 GetPeer(builder)->AddArc(ToImpellerType(*oval_bounds), //
394 Degrees{start_angle_degrees}, //
395 Degrees{end_angle_degrees} //
396 );
397}

References ToImpellerType().

◆ ImpellerPathBuilderAddOval()

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

Definition at line 400 of file impeller.cc.

401 {
402 GetPeer(builder)->AddOval(ToImpellerType(*oval_bounds));
403}

References ToImpellerType().

◆ ImpellerPathBuilderAddRect()

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

Definition at line 383 of file impeller.cc.

384 {
385 GetPeer(builder)->AddRect(ToImpellerType(*rect));
386}

References ToImpellerType().

◆ ImpellerPathBuilderAddRoundedRect()

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

Definition at line 406 of file impeller.cc.

409 {
410 GetPeer(builder)->AddRoundedRect(ToImpellerType(*rect),
411 ToImpellerType(*rounding_radii));
412}

References ToImpellerType().

◆ ImpellerPathBuilderClose()

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

Definition at line 415 of file impeller.cc.

415 {
416 GetPeer(builder)->Close();
417}

◆ ImpellerPathBuilderCopyPathNew()

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

Definition at line 420 of file impeller.cc.

421 {
422 return GetPeer(builder)->CopyPath(ToImpellerType(fill)).Leak();
423}

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 372 of file impeller.cc.

375 {
376 GetPeer(builder)->CubicCurveTo(ToImpellerType(*control_point_1), //
377 ToImpellerType(*control_point_2), //
378 ToImpellerType(*end_point) //
379 );
380}

References ToImpellerType().

◆ ImpellerPathBuilderLineTo()

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

Definition at line 358 of file impeller.cc.

359 {
360 GetPeer(builder)->LineTo(ToImpellerType(*location));
361}
uint32_t location

References location, and ToImpellerType().

◆ ImpellerPathBuilderMoveTo()

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

Definition at line 352 of file impeller.cc.

353 {
354 GetPeer(builder)->MoveTo(ToImpellerType(*location));
355}

References location, and ToImpellerType().

◆ ImpellerPathBuilderNew()

IMPELLER_EXTERN_C ImpellerPathBuilder impeller::interop::ImpellerPathBuilderNew ( )

Definition at line 337 of file impeller.cc.

337 {
338 return Create<PathBuilder>().Leak();
339}

◆ ImpellerPathBuilderQuadraticCurveTo()

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

Definition at line 364 of file impeller.cc.

366 {
367 GetPeer(builder)->QuadraticCurveTo(ToImpellerType(*control_point),
368 ToImpellerType(*end_point));
369}

References ToImpellerType().

◆ ImpellerPathBuilderRelease()

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

Definition at line 347 of file impeller.cc.

347 {
348 ObjectBase::SafeRelease(builder);
349}

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

◆ ImpellerPathBuilderRetain()

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

Definition at line 342 of file impeller.cc.

342 {
343 ObjectBase::SafeRetain(builder);
344}

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

◆ ImpellerPathBuilderTakePathNew()

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

Definition at line 426 of file impeller.cc.

427 {
428 return GetPeer(builder)->TakePath(ToImpellerType(fill)).Leak();
429}

References ToImpellerType().

◆ ImpellerPathGetBounds()

IMPELLER_EXTERN_C void impeller::interop::ImpellerPathGetBounds ( ImpellerPath  path,
ImpellerRect out_bounds 
)

Definition at line 332 of file impeller.cc.

332 {
333 *out_bounds = GetPeer(path)->GetBounds();
334}

◆ ImpellerPathRelease()

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

Definition at line 327 of file impeller.cc.

327 {
328 ObjectBase::SafeRelease(path);
329}

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

◆ ImpellerPathRetain()

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

Definition at line 322 of file impeller.cc.

322 {
323 ObjectBase::SafeRetain(path);
324}

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 732 of file impeller.cc.

735 {
736#if IMPELLER_ENABLE_OPENGLES
737 if (!GetPeer(context)->IsGL()) {
738 VALIDATION_LOG << "Context is not OpenGL.";
739 return nullptr;
740 }
741 return Create<SurfaceGLES>(*GetPeer(context), //
742 fbo, //
743 ToImpellerType(format), //
744 ToImpellerType(*size)) //
745 .Leak();
746#else // IMPELLER_ENABLE_OPENGLES
747 VALIDATION_LOG << "OpenGL unavailable.";
748 return nullptr;
749#endif // IMPELLER_ENABLE_OPENGLES
750}

References context, format, 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 753 of file impeller.cc.

755 {
756#if IMPELLER_ENABLE_METAL
757 if (!GetPeer(context)->IsMetal()) {
758 VALIDATION_LOG << "Context is not Metal.";
759 return nullptr;
760 }
761 return Create<SurfaceMTL>(*GetPeer(context), metal_drawable).Leak();
762#else // IMPELLER_ENABLE_METAL
763 VALIDATION_LOG << "Metal unavailable.";
764 return nullptr;
765#endif // IMPELLER_ENABLE_METAL
766}

References context, and VALIDATION_LOG.

◆ ImpellerSurfaceDrawDisplayList()

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

Definition at line 778 of file impeller.cc.

779 {
780 return GetPeer(surface)->DrawDisplayList(*GetPeer(display_list));
781}

References surface.

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

◆ ImpellerSurfacePresent()

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

Definition at line 784 of file impeller.cc.

784 {
785 return GetPeer(surface)->Present();
786}

References surface.

◆ ImpellerSurfaceRelease()

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

Definition at line 773 of file impeller.cc.

773 {
774 ObjectBase::SafeRelease(surface);
775}

References impeller::interop::ObjectBase::SafeRelease(), and surface.

◆ ImpellerSurfaceRetain()

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

Definition at line 768 of file impeller.cc.

768 {
769 ObjectBase::SafeRetain(surface);
770}

References impeller::interop::ObjectBase::SafeRetain(), and surface.

◆ 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 597 of file impeller.cc.

601 {
603 desc.storage_mode = StorageMode::kHostVisible;
604 desc.type = TextureType::kTexture2D;
605 desc.format = ToImpellerType(descriptor->pixel_format);
606 desc.size = ToImpellerType(descriptor->size);
607 desc.mip_count = std::min(descriptor->mip_count, 1u);
608 desc.usage = TextureUsage::kShaderRead;
609 desc.compression_type = CompressionType::kLossless;
610 auto texture = Create<Texture>(*GetPeer(context), desc);
611 if (!texture->IsValid()) {
612 VALIDATION_LOG << "Could not create texture.";
613 return nullptr;
614 }
615 // Depending on whether the de-allocation can be delayed, it may be possible
616 // to avoid a data copy.
617 if (contents->on_release) {
618 // Avoids data copy.
619 auto wrapped_contents = std::make_shared<fml::NonOwnedMapping>(
620 contents->data, // data ptr
621 contents->length, // data length
622 [on_release = contents->on_release, contents_on_release_user_data](
623 auto, auto) {
624 on_release(contents_on_release_user_data);
625 } // release callback
626 );
627 if (!texture->SetContents(std::move(wrapped_contents))) {
628 VALIDATION_LOG << "Could not set texture contents.";
629 return nullptr;
630 }
631 } else {
632 // May copy.
633 if (!texture->SetContents(contents->data, contents->length)) {
634 VALIDATION_LOG << "Could not set texture contents.";
635 return nullptr;
636 }
637 }
638 return texture.Leak();
639}
ImpellerCallback IMPELLER_NULLABLE on_release
Definition impeller.h:629
uint64_t length
Definition impeller.h:628
const uint8_t *IMPELLER_NONNULL data
Definition impeller.h:627
ImpellerPixelFormat pixel_format
Definition impeller.h:621
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...

References impeller::TextureDescriptor::compression_type, context, 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, texture, ToImpellerType(), impeller::TextureDescriptor::type, impeller::TextureDescriptor::usage, and VALIDATION_LOG.

◆ ImpellerTextureCreateWithOpenGLTextureHandleNew()

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

Definition at line 642 of file impeller.cc.

645 {
646 auto impeller_context = GetPeer(context)->GetContext();
647 if (impeller_context->GetBackendType() !=
649 VALIDATION_LOG << "Context is not OpenGL.";
650 return nullptr;
651 }
652
653 const auto& impeller_context_gl =
654 impeller::ContextGLES::Cast(*impeller_context);
655 const auto& reactor = impeller_context_gl.GetReactor();
656
658 desc.storage_mode = StorageMode::kDevicePrivate;
659 desc.type = TextureType::kTexture2D;
660 desc.format = ToImpellerType(descriptor->pixel_format);
661 desc.size = ToImpellerType(descriptor->size);
662 desc.mip_count = std::min(descriptor->mip_count, 1u);
663 desc.usage = TextureUsage::kShaderRead;
664 desc.compression_type = CompressionType::kLossless;
665
666 auto texture = TextureGLES::WrapTexture(
667 reactor, //
668 desc, //
669 reactor->CreateHandle(HandleType::kTexture, external_gl_handle) //
670 );
671 if (!texture || !texture->IsValid()) {
672 VALIDATION_LOG << "Could not wrap external texture.";
673 return nullptr;
674 }
675 return Create<Texture>(impeller::Context::BackendType::kOpenGLES,
676 std::move(texture))
677 .Leak();
678}
static ContextGLES & Cast(Context &base)
std::shared_ptr< ReactorGLES > reactor

References impeller::BackendCast< ContextGLES, Context >::Cast(), impeller::TextureDescriptor::compression_type, context, impeller::TextureDescriptor::format, impeller::kDevicePrivate, impeller::kLossless, impeller::Context::kOpenGLES, impeller::kShaderRead, impeller::kTexture, impeller::kTexture2D, impeller::TextureDescriptor::mip_count, ImpellerTextureDescriptor::mip_count, ImpellerTextureDescriptor::pixel_format, reactor, impeller::TextureDescriptor::size, ImpellerTextureDescriptor::size, impeller::TextureDescriptor::storage_mode, texture, 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 691 of file impeller.cc.

691 {
692 auto interop_texture = GetPeer(texture);
693 if (interop_texture->GetBackendType() !=
695 VALIDATION_LOG << "Can only fetch the texture handle of an OpenGL texture.";
696 return 0u;
697 }
698 return TextureGLES::Cast(*interop_texture->GetTexture())
699 .GetGLHandle()
700 .value_or(0u);
701}

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

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

◆ ImpellerTextureRelease()

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

Definition at line 686 of file impeller.cc.

686 {
687 ObjectBase::SafeRelease(texture);
688}

References impeller::interop::ObjectBase::SafeRelease(), and texture.

◆ ImpellerTextureRetain()

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

Definition at line 681 of file impeller.cc.

681 {
682 ObjectBase::SafeRetain(texture);
683}

References impeller::interop::ObjectBase::SafeRetain(), and texture.

◆ ImpellerTypographyContextNew()

IMPELLER_EXTERN_C ImpellerTypographyContext impeller::interop::ImpellerTypographyContextNew ( )

Definition at line 1371 of file impeller.cc.

1371 {
1372 auto context = Create<TypographyContext>();
1373 if (!context->IsValid()) {
1374 VALIDATION_LOG << "Could not create typography context.";
1375 return nullptr;
1376 }
1377 return context.Leak();
1378}

References context, and 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 1391 of file impeller.cc.

1394 {
1395 auto wrapped_contents = std::make_unique<fml::NonOwnedMapping>(
1396 contents->data, // data ptr
1397 contents->length, // data length
1398 [on_release = contents->on_release, contents_on_release_user_data](auto,
1399 auto) {
1400 on_release(contents_on_release_user_data);
1401 } // release callback
1402 );
1403 return GetPeer(context)->RegisterFont(std::move(wrapped_contents),
1404 family_name_alias);
1405}

References context, 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 1386 of file impeller.cc.

1386 {
1387 ObjectBase::SafeRelease(context);
1388}

References context, and impeller::interop::ObjectBase::SafeRelease().

◆ ImpellerTypographyContextRetain()

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

Definition at line 1381 of file impeller.cc.

1381 {
1382 ObjectBase::SafeRetain(context);
1383}

References context, and impeller::interop::ObjectBase::SafeRetain().

◆ ImpellerVulkanSwapchainAcquireNextSurfaceNew()

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

Definition at line 223 of file impeller.cc.

224 {
225 return GetPeer(swapchain)->AcquireNextSurface().Leak();
226}

References swapchain.

◆ ImpellerVulkanSwapchainCreateNew()

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

Definition at line 197 of file impeller.cc.

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

References context, and VALIDATION_LOG.

◆ ImpellerVulkanSwapchainRelease()

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

Definition at line 218 of file impeller.cc.

218 {
219 ObjectBase::SafeRelease(swapchain);
220}

References impeller::interop::ObjectBase::SafeRelease(), and swapchain.

◆ ImpellerVulkanSwapchainRetain()

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

Definition at line 213 of file impeller.cc.

213 {
214 ObjectBase::SafeRetain(swapchain);
215}

References impeller::interop::ObjectBase::SafeRetain(), and swapchain.

◆ MakeCopyableMapping()

static std::shared_ptr< fml::Mapping > impeller::interop::MakeCopyableMapping ( const ImpellerMapping data,
void *  user_data 
)
static

Definition at line 1561 of file impeller.cc.

1563 {
1564 if (data == nullptr) {
1565 return nullptr;
1566 }
1567
1568 // If the user has supplied a release callback, defer deallocation to them.
1569 if (auto callback = data->on_release) {
1570 return std::make_shared<fml::NonOwnedMapping>(
1571 data->data, //
1572 data->length, //
1573 [user_data, callback](const uint8_t* data, size_t size) {
1574 callback(user_data);
1575 });
1576 }
1577
1578 return std::make_shared<fml::MallocMapping>(
1579 fml::MallocMapping::Copy(data->data, data->length));
1580}
static MallocMapping Copy(const T *begin, const T *end)
Definition mapping.h:162
FlutterDesktopBinaryReply callback

References callback, fml::MallocMapping::Copy(), and user_data.

Referenced by ImpellerFragmentProgramNew().

◆ 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 828 of file impeller.cc.

830 {
831 if (stop_count == 0) {
832 return {};
833 }
834 std::pair<std::vector<flutter::DlColor>, std::vector<Scalar>> result;
835 result.first.reserve(stop_count);
836 result.second.reserve(stop_count);
837 for (size_t i = 0; i < stop_count; i++) {
838 result.first.emplace_back(ToDisplayListType(colors[i]));
839 result.second.emplace_back(stops[i]);
840 }
841 return result;
842}

References i, and ToDisplayListType().

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

◆ ReadSamplersAndUniforms()

static SamplersAndUniforms impeller::interop::ReadSamplersAndUniforms ( ImpellerTexture *  samplers,
size_t  samplers_count,
const uint8_t *  data,
size_t  data_bytes_length 
)
static

Definition at line 961 of file impeller.cc.

964 {
965 SamplersAndUniforms result;
966 result.uniforms = std::make_shared<std::vector<uint8_t>>();
967 if (data_bytes_length > 0) {
968 std::copy(data, data + data_bytes_length,
969 std::back_inserter(*result.uniforms));
970 }
971 if (samplers_count > 0) {
972 result.samplers.reserve(samplers_count);
973 for (size_t i = 0; i < samplers_count; i++) {
975 DlImageImpeller::Make(GetPeer(samplers[i])->GetTexture()), //
978 ));
979 }
980 }
981 return result;
982}
static std::shared_ptr< DlColorSource > MakeImage(const sk_sp< const DlImage > &image, DlTileMode horizontal_tile_mode, DlTileMode vertical_tile_mode, DlImageSampling sampling=DlImageSampling::kLinear, const DlMatrix *matrix=nullptr)
std::shared_ptr< std::vector< uint8_t > > uniforms
Definition impeller.cc:958
std::vector< std::shared_ptr< flutter::DlColorSource > > samplers
Definition impeller.cc:957

References i, flutter::kClamp, impeller::DlImageImpeller::Make(), flutter::DlColorSource::MakeImage(), impeller::interop::SamplersAndUniforms::samplers, and impeller::interop::SamplersAndUniforms::uniforms.

Referenced by ImpellerColorSourceCreateFragmentProgramNew(), and ImpellerImageFilterCreateFragmentProgramNew().

◆ ReadString()

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

Definition at line 1170 of file impeller.cc.

1170 {
1171 if (string == nullptr) {
1172 return "";
1173 }
1174 return std::string{string};
1175}

Referenced by ImpellerParagraphStyleSetEllipsis(), ImpellerParagraphStyleSetFontFamily(), and ImpellerParagraphStyleSetLocale().

◆ Ref()

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

◆ RuntimeStageBackendToString()

const char * impeller::interop::RuntimeStageBackendToString ( RuntimeStageBackend  backend)

Definition at line 74 of file fragment_program.cc.

74 {
75 switch (backend) {
76 case RuntimeStageBackend::kSkSL:
77 return "SKSL";
78 case RuntimeStageBackend::kMetal:
79 return "Metal";
80 case RuntimeStageBackend::kOpenGLES:
81 return "OpenGL ES2";
82 case RuntimeStageBackend::kOpenGLES3:
83 return "OpenGL ES3";
84 case RuntimeStageBackend::kVulkan:
85 return "Vulkan";
86 }
87 return "Unknown";
88}

References impeller::kMetal, impeller::kOpenGLES, impeller::kOpenGLES3, impeller::kSkSL, and impeller::kVulkan.

Referenced by AvailableStagesAsString(), and impeller::interop::FragmentProgram::FindRuntimeStage().

◆ ToDisplayListType() [1/11]

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

Definition at line 136 of file formats.h.

136 {
137 using Mode = flutter::DlBlendMode;
138 switch (mode) {
139 case BlendMode::kClear:
140 return Mode::kClear;
141 case BlendMode::kSrc:
142 return Mode::kSrc;
143 case BlendMode::kDst:
144 return Mode::kDst;
145 case BlendMode::kSrcOver:
146 return Mode::kSrcOver;
147 case BlendMode::kDstOver:
148 return Mode::kDstOver;
149 case BlendMode::kSrcIn:
150 return Mode::kSrcIn;
151 case BlendMode::kDstIn:
152 return Mode::kDstIn;
153 case BlendMode::kSrcOut:
154 return Mode::kSrcOut;
155 case BlendMode::kDstOut:
156 return Mode::kDstOut;
157 case BlendMode::kSrcATop:
158 return Mode::kSrcATop;
159 case BlendMode::kDstATop:
160 return Mode::kDstATop;
161 case BlendMode::kXor:
162 return Mode::kXor;
163 case BlendMode::kPlus:
164 return Mode::kPlus;
165 case BlendMode::kModulate:
166 return Mode::kModulate;
167 case BlendMode::kScreen:
168 return Mode::kScreen;
169 case BlendMode::kOverlay:
170 return Mode::kOverlay;
171 case BlendMode::kDarken:
172 return Mode::kDarken;
173 case BlendMode::kLighten:
174 return Mode::kLighten;
175 case BlendMode::kColorDodge:
176 return Mode::kColorDodge;
177 case BlendMode::kColorBurn:
178 return Mode::kColorBurn;
179 case BlendMode::kHardLight:
180 return Mode::kHardLight;
181 case BlendMode::kSoftLight:
182 return Mode::kSoftLight;
183 case BlendMode::kDifference:
184 return Mode::kDifference;
185 case BlendMode::kExclusion:
186 return Mode::kExclusion;
187 case BlendMode::kMultiply:
188 return Mode::kMultiply;
189 case BlendMode::kHue:
190 return Mode::kHue;
191 case BlendMode::kSaturation:
192 return Mode::kSaturation;
193 case BlendMode::kColor:
194 return Mode::kColor;
195 case BlendMode::kLuminosity:
196 return Mode::kLuminosity;
197 }
198 return Mode::kSrcOver;
199}
impeller::BlendMode DlBlendMode

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]

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

◆ ToDisplayListType() [3/11]

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

Definition at line 102 of file formats.h.

102 {
103 std::vector<DlType> dl_vec;
104 dl_vec.reserve(other_vec.size());
105 for (const auto& other : other_vec) {
106 dl_vec.emplace_back(ToDisplayListType(other));
107 }
108 return dl_vec;
109}

References ToDisplayListType().

◆ ToDisplayListType() [4/11]

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

Definition at line 122 of file formats.h.

122 {
123 switch (style) {
132 }
134}
@ kImpellerBlurStyleNormal
Definition impeller.h:441
@ kImpellerBlurStyleOuter
Definition impeller.h:443
@ kImpellerBlurStyleInner
Definition impeller.h:444
@ kImpellerBlurStyleSolid
Definition impeller.h:442
@ kNormal
fuzzy inside and outside
@ kOuter
nothing inside, fuzzy outside
@ kInner
fuzzy inside, nothing outside
@ kSolid
solid inside, fuzzy outside

References kImpellerBlurStyleInner, kImpellerBlurStyleNormal, kImpellerBlurStyleOuter, kImpellerBlurStyleSolid, flutter::kInner, flutter::kNormal, flutter::kOuter, and flutter::kSolid.

◆ ToDisplayListType() [5/11]

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

Definition at line 433 of file formats.h.

433 {
434 return flutter::DlColor(color.alpha, //
435 color.red, //
436 color.green, //
437 color.blue, //
439 );
440}
ImpellerColorSpace color_space
Definition impeller.h:617

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

◆ ToDisplayListType() [7/11]

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

Definition at line 372 of file formats.h.

372 {
373 switch (style) {
380 }
382}
@ kImpellerDrawStyleStroke
Definition impeller.h:408
@ kImpellerDrawStyleFill
Definition impeller.h:407
@ kImpellerDrawStyleStrokeAndFill
Definition impeller.h:409
@ kStrokeAndFill
both strokes and fills shapes
@ kStroke
strokes boundary of shapes
@ kFill
fills interior of shapes

References flutter::kFill, kImpellerDrawStyleFill, kImpellerDrawStyleStroke, kImpellerDrawStyleStrokeAndFill, flutter::kStroke, and flutter::kStrokeAndFill.

◆ ToDisplayListType() [8/11]

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

Definition at line 384 of file formats.h.

384 {
385 switch (cap) {
392 }
394}
@ kImpellerStrokeCapButt
Definition impeller.h:413
@ kImpellerStrokeCapRound
Definition impeller.h:414
@ kImpellerStrokeCapSquare
Definition impeller.h:415
@ kRound
adds circle
@ kButt
no stroke extension
@ kSquare
adds square

References flutter::kButt, kImpellerStrokeCapButt, kImpellerStrokeCapRound, kImpellerStrokeCapSquare, flutter::kRound, and flutter::kSquare.

◆ ToDisplayListType() [9/11]

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

Definition at line 396 of file formats.h.

396 {
397 switch (join) {
404 }
406}
@ kImpellerStrokeJoinRound
Definition impeller.h:420
@ kImpellerStrokeJoinBevel
Definition impeller.h:421
@ kImpellerStrokeJoinMiter
Definition impeller.h:419
@ kMiter
extends to miter limit
@ kBevel
connects outside edges

References flutter::kBevel, kImpellerStrokeJoinBevel, kImpellerStrokeJoinMiter, kImpellerStrokeJoinRound, flutter::kMiter, and flutter::kRound.

◆ ToDisplayListType() [10/11]

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

◆ ToDisplayListType() [11/11]

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

◆ ToImpellerSize()

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

Definition at line 248 of file formats.h.

248 {
249 return Size{point.x, point.y};
250}

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

Referenced by ToImpellerType().

◆ ToImpellerType() [1/11]

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

Definition at line 299 of file formats.h.

299 {
300 Color result;
301 result.red = color.red;
302 result.green = color.green;
303 result.blue = color.blue;
304 result.alpha = color.alpha;
305 return result;
306}

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 416 of file formats.h.

416 {
417 return ISize::MakeWH(size.width, size.height);
418}

References impeller::TSize< T >::MakeWH().

◆ ToImpellerType() [3/11]

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

Definition at line 213 of file formats.h.

213 {
214 return Matrix(m.m[0], m.m[1], m.m[2], m.m[3], //
215 m.m[4], m.m[5], m.m[6], m.m[7], //
216 m.m[8], m.m[9], m.m[10], m.m[11], //
217 m.m[12], m.m[13], m.m[14], m.m[15] //
218 );
219}

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 244 of file formats.h.

244 {
245 return Point{point.x, point.y};
246}

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

◆ ToImpellerType() [5/11]

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

Definition at line 252 of file formats.h.

252 {
253 return Rect::MakeXYWH(rect.x, rect.y, rect.width, rect.height);
254}
float width
Definition impeller.h:505
float height
Definition impeller.h:506

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 270 of file formats.h.

270 {
271 auto result = RoundingRadii{};
272 result.top_left = ToImpellerSize(radii.top_left);
273 result.bottom_left = ToImpellerSize(radii.bottom_left);
274 result.top_right = ToImpellerSize(radii.top_right);
275 result.bottom_right = ToImpellerSize(radii.bottom_right);
276 return result;
277}
ImpellerPoint top_left
Definition impeller.h:606
ImpellerPoint top_right
Definition impeller.h:608
ImpellerPoint bottom_left
Definition impeller.h:607
ImpellerPoint bottom_right
Definition impeller.h:609

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 240 of file formats.h.

240 {
241 return Size{size.width, size.height};
242}

◆ ToImpellerType() [8/11]

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

Definition at line 308 of file formats.h.

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

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

◆ ToImpellerType() [10/11]

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

Definition at line 279 of file formats.h.

279 {
280 switch (type) {
282 return FillType::kNonZero;
284 return FillType::kOdd;
285 }
286 return FillType::kNonZero;
287}
@ kImpellerFillTypeOdd
Definition impeller.h:366
@ kImpellerFillTypeNonZero
Definition impeller.h:365
impeller::ShaderType type

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

◆ ToImpellerType() [11/11]

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

Definition at line 408 of file formats.h.

408 {
409 switch (format) {
411 return PixelFormat::kR8G8B8A8UNormInt;
412 }
413 return PixelFormat::kR8G8B8A8UNormInt;
414}
@ kImpellerPixelFormatRGBA8888
Definition impeller.h:425

References format, kImpellerPixelFormatRGBA8888, and impeller::kR8G8B8A8UNormInt.

◆ ToSkiaType() [1/8]

constexpr SkColor impeller::interop::ToSkiaType ( const ImpellerColor color)
constexpr

Definition at line 41 of file formats.h.

41 {
42 return SkColorSetARGB(color.alpha * 255, //
43 color.red * 255, //
44 color.green * 255, //
45 color.blue * 255 //
46 );
47}

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

◆ ToSkiaType() [2/8]

◆ ToSkiaType() [3/8]

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

Definition at line 37 of file formats.h.

37 {
38 return SkPoint::Make(point.x, point.y);
39}

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

◆ ToSkiaType() [4/8]

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

Definition at line 53 of file formats.h.

53 {
54 return SkRect::MakeXYWH(rect.GetX(), //
55 rect.GetY(), //
56 rect.GetWidth(), //
57 rect.GetHeight() //
58 );
59}
constexpr Type GetY() const
Returns the Y coordinate of the upper left corner, equivalent to |GetOrigin().y|.
Definition rect.h:371
constexpr Type GetHeight() const
Returns the height of the rectangle, equivalent to |GetSize().height|.
Definition rect.h:381
constexpr Type GetX() const
Returns the X coordinate of the upper left corner, equivalent to |GetOrigin().x|.
Definition rect.h:367
constexpr Type GetWidth() const
Returns the width of the rectangle, equivalent to |GetSize().width|.
Definition rect.h:375

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

◆ ToSkiaType() [5/8]

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

Definition at line 201 of file formats.h.

201 {
202 using Corner = SkRRect::Corner;
203 SkVector sk_radii[4];
204 sk_radii[Corner::kUpperLeft_Corner] = ToSkiaVector(radii.top_left);
205 sk_radii[Corner::kUpperRight_Corner] = ToSkiaVector(radii.top_right);
206 sk_radii[Corner::kLowerRight_Corner] = ToSkiaVector(radii.bottom_right);
207 sk_radii[Corner::kLowerLeft_Corner] = ToSkiaVector(radii.bottom_left);
208 SkRRect result;
209 result.setRectRadii(ToSkiaType(rect), sk_radii);
210 return result;
211}
constexpr SkVector ToSkiaVector(const Size &point)
Definition formats.h:49
constexpr std::optional< SkRect > ToSkiaType(const ImpellerRect *rect)
Definition formats.h:30

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

◆ ToSkiaType() [6/8]

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

Definition at line 80 of file formats.h.

80 {
81 std::vector<SkiaType> skia_vec;
82 skia_vec.reserve(other_vec.size());
83 for (const auto& other : other_vec) {
84 skia_vec.emplace_back(ToSkiaType(other));
85 }
86 return skia_vec;
87}

References ToSkiaType().

◆ ToSkiaType() [7/8]

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

Definition at line 61 of file formats.h.

61 {
62 switch (type) {
63 case FillType::kNonZero:
64 return SkPathFillType::kWinding;
65 case FillType::kOdd:
66 return SkPathFillType::kEvenOdd;
67 }
68 return SkPathFillType::kWinding;
69}

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

◆ ToSkiaType() [8/8]

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

Definition at line 71 of file formats.h.

71 {
72 return SkIRect::MakeXYWH(rect.GetX(), //
73 rect.GetY(), //
74 rect.GetWidth(), //
75 rect.GetHeight() //
76 );
77}

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 49 of file formats.h.

49 {
50 return SkVector::Make(point.width, point.height);
51}
Type height
Definition size.h:29
Type width
Definition size.h:28

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

Referenced by ToSkiaType().

◆ ToSkMatrix()

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

Definition at line 97 of file formats.h.

97 {
98 return SkM44::ColMajor(matrix.m).asM33();
99}

References impeller::Matrix::m.

◆ ToTxtType() [1/5]

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

Definition at line 483 of file formats.h.

483 {
484 switch (style) {
489 }
491}
@ kImpellerFontStyleItalic
Definition impeller.h:467
@ kImpellerFontStyleNormal
Definition impeller.h:466

References txt::italic, kImpellerFontStyleItalic, kImpellerFontStyleNormal, and txt::normal.

◆ ToTxtType() [2/5]

constexpr int impeller::interop::ToTxtType ( ImpellerFontWeight  weight)
constexpr

Definition at line 459 of file formats.h.

459 {
460 switch (weight) {
462 return 100;
464 return 200;
466 return 300;
468 return 400;
470 return 500;
472 return 600;
474 return 700;
476 return 800;
478 return 900;
479 }
481}
@ kImpellerFontWeight400
Definition impeller.h:457
@ kImpellerFontWeight500
Definition impeller.h:458
@ kImpellerFontWeight700
Definition impeller.h:460
@ kImpellerFontWeight200
Definition impeller.h:455
@ kImpellerFontWeight300
Definition impeller.h:456
@ kImpellerFontWeight900
Definition impeller.h:462
@ kImpellerFontWeight800
Definition impeller.h:461
@ kImpellerFontWeight600
Definition impeller.h:459
@ kImpellerFontWeight100
Definition impeller.h:454
@ normal
Definition font_weight.h:12

References kImpellerFontWeight100, kImpellerFontWeight200, kImpellerFontWeight300, kImpellerFontWeight400, kImpellerFontWeight500, kImpellerFontWeight600, kImpellerFontWeight700, kImpellerFontWeight800, kImpellerFontWeight900, txt::normal, and weight.

◆ ToTxtType() [3/5]

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

◆ ToTxtType() [4/5]

constexpr txt::TextDecorationStyle impeller::interop::ToTxtType ( ImpellerTextDecorationStyle  style)
constexpr

Definition at line 442 of file formats.h.

443 {
444 switch (style) {
455 }
457}
@ kImpellerTextDecorationStyleSolid
Definition impeller.h:492
@ kImpellerTextDecorationStyleWavy
Definition impeller.h:496
@ kImpellerTextDecorationStyleDouble
Definition impeller.h:493
@ kImpellerTextDecorationStyleDotted
Definition impeller.h:494
@ kImpellerTextDecorationStyleDashed
Definition impeller.h:495

References txt::kDashed, txt::kDotted, txt::kDouble, kImpellerTextDecorationStyleDashed, kImpellerTextDecorationStyleDotted, kImpellerTextDecorationStyleDouble, kImpellerTextDecorationStyleSolid, kImpellerTextDecorationStyleWavy, txt::kSolid, and txt::kWavy.

Referenced by impeller::interop::ParagraphStyle::CreateTextStyle(), ImpellerParagraphStyleSetFontStyle(), ImpellerParagraphStyleSetFontWeight(), ImpellerParagraphStyleSetTextAlignment(), and ImpellerParagraphStyleSetTextDirection().

◆ ToTxtType() [5/5]

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

Definition at line 511 of file formats.h.

511 {
512 switch (direction) {
517 }
519}
@ kImpellerTextDirectionLTR
Definition impeller.h:481
@ kImpellerTextDirectionRTL
Definition impeller.h:480

References kImpellerTextDirectionLTR, kImpellerTextDirectionRTL, txt::ltr, and txt::rtl.

Variable Documentation

◆ sContextVKProcAddressCallback

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