| Flutter Impeller |

impeller.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "impeller/toolkit/interop/impeller.h"
6
7 #include <algorithm>
8 #include <iterator>
9 #include <sstream>
10
11 #include "flutter/fml/mapping.h"
12 #include "impeller/base/validation.h"
13 #include "impeller/geometry/scalar.h"
14 #include "impeller/renderer/backend/gles/context_gles.h"
15 #include "impeller/renderer/backend/gles/texture_gles.h"
16 #include "impeller/renderer/context.h"
17 #include "impeller/toolkit/interop/color_filter.h"
18 #include "impeller/toolkit/interop/color_source.h"
19 #include "impeller/toolkit/interop/context.h"
20 #include "impeller/toolkit/interop/dl_builder.h"
21 #include "impeller/toolkit/interop/formats.h"
22 #include "impeller/toolkit/interop/fragment_program.h"
23 #include "impeller/toolkit/interop/glyph_info.h"
24 #include "impeller/toolkit/interop/image_filter.h"
25 #include "impeller/toolkit/interop/line_metrics.h"
26 #include "impeller/toolkit/interop/mask_filter.h"
27 #include "impeller/toolkit/interop/object.h"
28 #include "impeller/toolkit/interop/paint.h"
29 #include "impeller/toolkit/interop/paragraph.h"
30 #include "impeller/toolkit/interop/paragraph_builder.h"
31 #include "impeller/toolkit/interop/paragraph_style.h"
32 #include "impeller/toolkit/interop/path.h"
33 #include "impeller/toolkit/interop/path_builder.h"
34 #include "impeller/toolkit/interop/surface.h"
35 #include "impeller/toolkit/interop/texture.h"
36 #include "impeller/toolkit/interop/typography_context.h"
37
38 #if IMPELLER_ENABLE_OPENGLES
39 #include "impeller/toolkit/interop/backend/gles/context_gles.h"
40 #include "impeller/toolkit/interop/backend/gles/surface_gles.h"
41 #endif // IMPELLER_ENABLE_OPENGLES
42
43 #if IMPELLER_ENABLE_METAL
44 #include "impeller/toolkit/interop/backend/metal/context_mtl.h"
45 #include "impeller/toolkit/interop/backend/metal/surface_mtl.h"
46 #endif // IMPELLER_ENABLE_METAL
47
48 #if IMPELLER_ENABLE_VULKAN
49 #include "impeller/toolkit/interop/backend/vulkan/context_vk.h"
50 #include "impeller/toolkit/interop/backend/vulkan/surface_vk.h"
51 #include "impeller/toolkit/interop/backend/vulkan/swapchain_vk.h"
52 #endif // IMPELLER_ENABLE_VULKAN
53
54 namespace impeller::interop {
55
56 #define DEFINE_PEER_GETTER(cxx_type, c_type) \
57 cxx_type* GetPeer(c_type object) { \
58 return reinterpret_cast<cxx_type*>(object); \
59 }
60
61 DEFINE_PEER_GETTER(ColorFilter, ImpellerColorFilter);
62 DEFINE_PEER_GETTER(ColorSource, ImpellerColorSource);
63 DEFINE_PEER_GETTER(Context, ImpellerContext);
64 DEFINE_PEER_GETTER(DisplayList, ImpellerDisplayList);
65 DEFINE_PEER_GETTER(DisplayListBuilder, ImpellerDisplayListBuilder);
66 DEFINE_PEER_GETTER(FragmentProgram, ImpellerFragmentProgram);
67 DEFINE_PEER_GETTER(GlyphInfo, ImpellerGlyphInfo);
68 DEFINE_PEER_GETTER(ImageFilter, ImpellerImageFilter);
69 DEFINE_PEER_GETTER(LineMetrics, ImpellerLineMetrics);
70 DEFINE_PEER_GETTER(MaskFilter, ImpellerMaskFilter);
71 DEFINE_PEER_GETTER(Paint, ImpellerPaint);
72 DEFINE_PEER_GETTER(Paragraph, ImpellerParagraph);
73 DEFINE_PEER_GETTER(ParagraphBuilder, ImpellerParagraphBuilder);
74 DEFINE_PEER_GETTER(ParagraphStyle, ImpellerParagraphStyle);
75 DEFINE_PEER_GETTER(Path, ImpellerPath);
76 DEFINE_PEER_GETTER(PathBuilder, ImpellerPathBuilder);
77 DEFINE_PEER_GETTER(Surface, ImpellerSurface);
78 DEFINE_PEER_GETTER(SwapchainVK, ImpellerVulkanSwapchain);
79 DEFINE_PEER_GETTER(Texture, ImpellerTexture);
80 DEFINE_PEER_GETTER(TypographyContext, ImpellerTypographyContext);
81
82 static std::string GetVersionAsString(uint32_t version) {
83 std::stringstream stream;
84 stream << IMPELLER_VERSION_GET_VARIANT(version) << "."
85 << IMPELLER_VERSION_GET_MAJOR(version) << "."
86 << IMPELLER_VERSION_GET_MINOR(version) << "."
87 << IMPELLER_VERSION_GET_PATCH(version);
88 return stream.str();
89 }
90
91 IMPELLER_EXTERN_C
92 uint32_t ImpellerGetVersion() {
93 return IMPELLER_VERSION;
94 }
95
96 static bool CheckVersion(uint32_t version) {
97 if (version != IMPELLER_VERSION) {
98 VALIDATION_LOG << "This version of Impeller ("
99 << GetVersionAsString(ImpellerGetVersion()) << ") "
100 << "doesn't match the version the user expects ("
101 << GetVersionAsString(version) << ").";
102 return false;
103 }
104 return true;
105 }
106
107 IMPELLER_EXTERN_C
108 ImpellerContext ImpellerContextCreateOpenGLESNew(
109 uint32_t version,
110 ImpellerProcAddressCallback gl_proc_address_callback,
111 void* gl_proc_address_callback_user_data) {
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 }
132
133 IMPELLER_EXTERN_C ImpellerContext ImpellerContextCreateMetalNew(
134 uint32_t version) {
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 }
150
151 IMPELLER_EXTERN_C ImpellerContext ImpellerContextCreateVulkanNew(
152 uint32_t version,
153 const ImpellerContextVulkanSettings* settings) {
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 }
169
170 IMPELLER_EXTERN_C
171 void ImpellerContextRetain(ImpellerContext context) {
172 ObjectBase::SafeRetain(context);
173 }
174
175 IMPELLER_EXTERN_C
176 void ImpellerContextRelease(ImpellerContext context) {
177 ObjectBase::SafeRelease(context);
178 }
179
180 IMPELLER_EXTERN_C
181 bool ImpellerContextGetVulkanInfo(ImpellerContext IMPELLER_NONNULL context,
182 ImpellerContextVulkanInfo* out_vulkan_info) {
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 }
195
196 IMPELLER_EXTERN_C
197 ImpellerVulkanSwapchain ImpellerVulkanSwapchainCreateNew(
198 ImpellerContext context,
199 void* vulkan_surface_khr) {
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 }
211
212 IMPELLER_EXTERN_C
213 void ImpellerVulkanSwapchainRetain(ImpellerVulkanSwapchain swapchain) {
214 ObjectBase::SafeRetain(swapchain);
215 }
216
217 IMPELLER_EXTERN_C
218 void ImpellerVulkanSwapchainRelease(ImpellerVulkanSwapchain swapchain) {
219 ObjectBase::SafeRelease(swapchain);
220 }
221
222 IMPELLER_EXTERN_C
223 ImpellerSurface ImpellerVulkanSwapchainAcquireNextSurfaceNew(
224 ImpellerVulkanSwapchain swapchain) {
225 return GetPeer(swapchain)->AcquireNextSurface().Leak();
226 }
227
228 IMPELLER_EXTERN_C ImpellerDisplayListBuilder ImpellerDisplayListBuilderNew(
229 const ImpellerRect* cull_rect) {
230 return Create<DisplayListBuilder>(cull_rect).Leak();
231 }
232
233 IMPELLER_EXTERN_C
234 void ImpellerDisplayListBuilderRetain(ImpellerDisplayListBuilder builder) {
235 ObjectBase::SafeRetain(builder);
236 }
237
238 IMPELLER_EXTERN_C
239 void ImpellerDisplayListBuilderRelease(ImpellerDisplayListBuilder builder) {
240 ObjectBase::SafeRelease(builder);
241 }
242
243 IMPELLER_EXTERN_C
244 void ImpellerDisplayListBuilderSave(ImpellerDisplayListBuilder builder) {
245 GetPeer(builder)->Save();
246 }
247
248 IMPELLER_EXTERN_C
249 void ImpellerDisplayListBuilderSaveLayer(ImpellerDisplayListBuilder builder,
250 const ImpellerRect* bounds,
251 ImpellerPaint paint,
252 ImpellerImageFilter backdrop) {
253 GetPeer(builder)->SaveLayer(ToImpellerType(*bounds), //
254 GetPeer(paint), //
255 GetPeer(backdrop) //
256 );
257 }
258
259 IMPELLER_EXTERN_C
260 void ImpellerDisplayListBuilderRestore(ImpellerDisplayListBuilder builder) {
261 GetPeer(builder)->Restore();
262 }
263
264 IMPELLER_EXTERN_C
265 void ImpellerDisplayListBuilderScale(ImpellerDisplayListBuilder builder,
266 float x_scale,
267 float y_scale) {
268 GetPeer(builder)->Scale(Size{x_scale, y_scale});
269 }
270
271 IMPELLER_EXTERN_C
272 void ImpellerDisplayListBuilderRotate(ImpellerDisplayListBuilder builder,
273 float angle_degrees) {
274 GetPeer(builder)->Rotate(Degrees{angle_degrees});
275 }
276
277 IMPELLER_EXTERN_C
278 void ImpellerDisplayListBuilderTranslate(ImpellerDisplayListBuilder builder,
279 float x_translation,
280 float y_translation) {
281 GetPeer(builder)->Translate(Point{x_translation, y_translation});
282 }
283
284 IMPELLER_EXTERN_C
285 void ImpellerDisplayListBuilderSetTransform(ImpellerDisplayListBuilder builder,
286 const ImpellerMatrix* transform) {
287 GetPeer(builder)->SetTransform(ToImpellerType(*transform));
288 }
289
290 IMPELLER_EXTERN_C
291 void ImpellerDisplayListBuilderTransform(ImpellerDisplayListBuilder builder,
292 const ImpellerMatrix* transform) {
293 GetPeer(builder)->Transform(ToImpellerType(*transform));
294 }
295
296 IMPELLER_EXTERN_C
297 void ImpellerDisplayListBuilderGetTransform(ImpellerDisplayListBuilder builder,
298 ImpellerMatrix* out_transform) {
299 FromImpellerType(GetPeer(builder)->GetTransform(), *out_transform);
300 }
301
302 IMPELLER_EXTERN_C
303 void ImpellerDisplayListBuilderResetTransform(
304 ImpellerDisplayListBuilder builder) {
305 GetPeer(builder)->ResetTransform();
306 }
307
308 IMPELLER_EXTERN_C
309 uint32_t ImpellerDisplayListBuilderGetSaveCount(
310 ImpellerDisplayListBuilder builder) {
311 return GetPeer(builder)->GetSaveCount();
312 }
313
314 IMPELLER_EXTERN_C
315 void ImpellerDisplayListBuilderRestoreToCount(
316 ImpellerDisplayListBuilder builder,
317 uint32_t count) {
318 GetPeer(builder)->RestoreToCount(count);
319 }
320
321 IMPELLER_EXTERN_C
322 void ImpellerPathRetain(ImpellerPath path) {
323 ObjectBase::SafeRetain(path);
324 }
325
326 IMPELLER_EXTERN_C
327 void ImpellerPathRelease(ImpellerPath path) {
328 ObjectBase::SafeRelease(path);
329 }
330
331 IMPELLER_EXTERN_C
332 void ImpellerPathGetBounds(ImpellerPath path, ImpellerRect* out_bounds) {
333 *out_bounds = GetPeer(path)->GetBounds();
334 }
335
336 IMPELLER_EXTERN_C
337 ImpellerPathBuilder ImpellerPathBuilderNew() {
338 return Create<PathBuilder>().Leak();
339 }
340
341 IMPELLER_EXTERN_C
342 void ImpellerPathBuilderRetain(ImpellerPathBuilder builder) {
343 ObjectBase::SafeRetain(builder);
344 }
345
346 IMPELLER_EXTERN_C
347 void ImpellerPathBuilderRelease(ImpellerPathBuilder builder) {
348 ObjectBase::SafeRelease(builder);
349 }
350
351 IMPELLER_EXTERN_C
352 void ImpellerPathBuilderMoveTo(ImpellerPathBuilder builder,
353 const ImpellerPoint* location) {
354 GetPeer(builder)->MoveTo(ToImpellerType(*location));
355 }
356
357 IMPELLER_EXTERN_C
358 void ImpellerPathBuilderLineTo(ImpellerPathBuilder builder,
359 const ImpellerPoint* location) {
360 GetPeer(builder)->LineTo(ToImpellerType(*location));
361 }
362
363 IMPELLER_EXTERN_C
364 void ImpellerPathBuilderQuadraticCurveTo(ImpellerPathBuilder builder,
365 const ImpellerPoint* control_point,
366 const ImpellerPoint* end_point) {
367 GetPeer(builder)->QuadraticCurveTo(ToImpellerType(*control_point),
368 ToImpellerType(*end_point));
369 }
370
371 IMPELLER_EXTERN_C
372 void ImpellerPathBuilderCubicCurveTo(ImpellerPathBuilder builder,
373 const ImpellerPoint* control_point_1,
374 const ImpellerPoint* control_point_2,
375 const ImpellerPoint* end_point) {
376 GetPeer(builder)->CubicCurveTo(ToImpellerType(*control_point_1), //
377 ToImpellerType(*control_point_2), //
378 ToImpellerType(*end_point) //
379 );
380 }
381
382 IMPELLER_EXTERN_C
383 void ImpellerPathBuilderAddRect(ImpellerPathBuilder builder,
384 const ImpellerRect* rect) {
385 GetPeer(builder)->AddRect(ToImpellerType(*rect));
386 }
387
388 IMPELLER_EXTERN_C
389 void ImpellerPathBuilderAddArc(ImpellerPathBuilder builder,
390 const ImpellerRect* oval_bounds,
391 float start_angle_degrees,
392 float end_angle_degrees) {
393 GetPeer(builder)->AddArc(ToImpellerType(*oval_bounds), //
394 Degrees{start_angle_degrees}, //
395 Degrees{end_angle_degrees} //
396 );
397 }
398
399 IMPELLER_EXTERN_C
400 void ImpellerPathBuilderAddOval(ImpellerPathBuilder builder,
401 const ImpellerRect* oval_bounds) {
402 GetPeer(builder)->AddOval(ToImpellerType(*oval_bounds));
403 }
404
405 IMPELLER_EXTERN_C
406 void ImpellerPathBuilderAddRoundedRect(
407 ImpellerPathBuilder builder,
408 const ImpellerRect* rect,
409 const ImpellerRoundingRadii* rounding_radii) {
410 GetPeer(builder)->AddRoundedRect(ToImpellerType(*rect),
411 ToImpellerType(*rounding_radii));
412 }
413
414 IMPELLER_EXTERN_C
415 void ImpellerPathBuilderClose(ImpellerPathBuilder builder) {
416 GetPeer(builder)->Close();
417 }
418
419 IMPELLER_EXTERN_C
420 ImpellerPath ImpellerPathBuilderCopyPathNew(ImpellerPathBuilder builder,
421 ImpellerFillType fill) {
422 return GetPeer(builder)->CopyPath(ToImpellerType(fill)).Leak();
423 }
424
425 IMPELLER_EXTERN_C
426 ImpellerPath ImpellerPathBuilderTakePathNew(ImpellerPathBuilder builder,
427 ImpellerFillType fill) {
428 return GetPeer(builder)->TakePath(ToImpellerType(fill)).Leak();
429 }
430
431 IMPELLER_EXTERN_C
432 void ImpellerDisplayListBuilderClipRect(ImpellerDisplayListBuilder builder,
433 const ImpellerRect* rect,
434 ImpellerClipOperation op) {
435 GetPeer(builder)->ClipRect(ToImpellerType(*rect), ToImpellerType(op));
436 }
437
438 IMPELLER_EXTERN_C
439 void ImpellerDisplayListBuilderClipOval(ImpellerDisplayListBuilder builder,
440 const ImpellerRect* oval_bounds,
441 ImpellerClipOperation op) {
442 GetPeer(builder)->ClipOval(ToImpellerType(*oval_bounds), ToImpellerType(op));
443 }
444
445 IMPELLER_EXTERN_C
446 void ImpellerDisplayListBuilderClipRoundedRect(
447 ImpellerDisplayListBuilder builder,
448 const ImpellerRect* rect,
449 const ImpellerRoundingRadii* radii,
450 ImpellerClipOperation op) {
451 GetPeer(builder)->ClipRoundedRect(ToImpellerType(*rect), //
452 ToImpellerType(*radii), //
453 ToImpellerType(op) //
454 );
455 }
456
457 IMPELLER_EXTERN_C
458 void ImpellerDisplayListBuilderClipPath(ImpellerDisplayListBuilder builder,
459 ImpellerPath path,
460 ImpellerClipOperation op) {
461 GetPeer(builder)->ClipPath(*GetPeer(path), ToImpellerType(op));
462 }
463
464 IMPELLER_EXTERN_C
465 ImpellerPaint ImpellerPaintNew() {
466 return Create<Paint>().Leak();
467 }
468
469 IMPELLER_EXTERN_C
470 void ImpellerPaintRetain(ImpellerPaint paint) {
471 ObjectBase::SafeRetain(paint);
472 }
473
474 IMPELLER_EXTERN_C
475 void ImpellerPaintRelease(ImpellerPaint paint) {
476 ObjectBase::SafeRelease(paint);
477 }
478
479 IMPELLER_EXTERN_C
480 void ImpellerPaintSetColor(ImpellerPaint paint, const ImpellerColor* color) {
481 GetPeer(paint)->SetColor(ToDisplayListType(*color));
482 }
483
484 IMPELLER_EXTERN_C
485 void ImpellerPaintSetBlendMode(ImpellerPaint paint, ImpellerBlendMode mode) {
486 GetPeer(paint)->SetBlendMode(ToImpellerType(mode));
487 }
488
489 IMPELLER_EXTERN_C
490 void ImpellerPaintSetDrawStyle(ImpellerPaint paint, ImpellerDrawStyle style) {
491 GetPeer(paint)->SetDrawStyle(ToDisplayListType(style));
492 }
493
494 IMPELLER_EXTERN_C
495 void ImpellerPaintSetStrokeCap(ImpellerPaint paint, ImpellerStrokeCap cap) {
496 GetPeer(paint)->SetStrokeCap(ToDisplayListType(cap));
497 }
498
499 IMPELLER_EXTERN_C
500 void ImpellerPaintSetStrokeJoin(ImpellerPaint paint, ImpellerStrokeJoin join) {
501 GetPeer(paint)->SetStrokeJoin(ToDisplayListType(join));
502 }
503
504 IMPELLER_EXTERN_C
505 void ImpellerPaintSetStrokeWidth(ImpellerPaint paint, float width) {
506 GetPeer(paint)->SetStrokeWidth(width);
507 }
508
509 IMPELLER_EXTERN_C
510 void ImpellerPaintSetStrokeMiter(ImpellerPaint paint, float miter) {
511 GetPeer(paint)->SetStrokeMiter(miter);
512 }
513
514 IMPELLER_EXTERN_C
515 void ImpellerDisplayListBuilderDrawPaint(ImpellerDisplayListBuilder builder,
516 ImpellerPaint paint) {
517 GetPeer(builder)->DrawPaint(*GetPeer(paint));
518 }
519
520 IMPELLER_EXTERN_C
521 void ImpellerDisplayListBuilderDrawLine(ImpellerDisplayListBuilder builder,
522 const ImpellerPoint* from,
523 const ImpellerPoint* to,
524 ImpellerPaint paint) {
525 GetPeer(builder)->DrawLine(ToImpellerType(*from), //
526 ToImpellerType(*to), //
527 *GetPeer(paint) //
528 );
529 }
530
531 IMPELLER_EXTERN_C
532 void ImpellerDisplayListBuilderDrawDashedLine(
533 ImpellerDisplayListBuilder builder,
534 const ImpellerPoint* from,
535 const ImpellerPoint* to,
536 float on_length,
537 float off_length,
538 ImpellerPaint paint) {
539 GetPeer(builder)->DrawDashedLine(ToImpellerType(*from), //
540 ToImpellerType(*to), //
541 on_length, //
542 off_length, //
543 *GetPeer(paint) //
544 );
545 }
546
547 IMPELLER_EXTERN_C
548 void ImpellerDisplayListBuilderDrawRect(ImpellerDisplayListBuilder builder,
549 const ImpellerRect* rect,
550 ImpellerPaint paint) {
551 GetPeer(builder)->DrawRect(ToImpellerType(*rect), *GetPeer(paint));
552 }
553
554 IMPELLER_EXTERN_C
555 void ImpellerDisplayListBuilderDrawOval(ImpellerDisplayListBuilder builder,
556 const ImpellerRect* oval_bounds,
557 ImpellerPaint paint) {
558 GetPeer(builder)->DrawOval(ToImpellerType(*oval_bounds), *GetPeer(paint));
559 }
560
561 IMPELLER_EXTERN_C
562 void ImpellerDisplayListBuilderDrawRoundedRect(
563 ImpellerDisplayListBuilder builder,
564 const ImpellerRect* rect,
565 const ImpellerRoundingRadii* radii,
566 ImpellerPaint paint) {
567 GetPeer(builder)->DrawRoundedRect(ToImpellerType(*rect), //
568 ToImpellerType(*radii), //
569 *GetPeer(paint) //
570 );
571 }
572
573 IMPELLER_EXTERN_C
574 void ImpellerDisplayListBuilderDrawRoundedRectDifference(
575 ImpellerDisplayListBuilder builder,
576 const ImpellerRect* outer_rect,
577 const ImpellerRoundingRadii* outer_radii,
578 const ImpellerRect* inner_rect,
579 const ImpellerRoundingRadii* inner_radii,
580 ImpellerPaint paint) {
581 GetPeer(builder)->DrawRoundedRectDifference(ToImpellerType(*outer_rect), //
582 ToImpellerType(*outer_radii), //
583 ToImpellerType(*inner_rect), //
584 ToImpellerType(*inner_radii), //
585 *GetPeer(paint) //
586 );
587 }
588
589 IMPELLER_EXTERN_C
590 void ImpellerDisplayListBuilderDrawPath(ImpellerDisplayListBuilder builder,
591 ImpellerPath path,
592 ImpellerPaint paint) {
593 GetPeer(builder)->DrawPath(*GetPeer(path), *GetPeer(paint));
594 }
595
596 IMPELLER_EXTERN_C
597 ImpellerTexture ImpellerTextureCreateWithContentsNew(
598 ImpellerContext context,
599 const ImpellerTextureDescriptor* descriptor,
600 const ImpellerMapping* contents,
601 void* contents_on_release_user_data) {
602 TextureDescriptor desc;
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 }
640
641 IMPELLER_EXTERN_C
642 ImpellerTexture ImpellerTextureCreateWithOpenGLTextureHandleNew(
643 ImpellerContext context,
644 const ImpellerTextureDescriptor* descriptor,
645 uint64_t external_gl_handle) {
646 auto impeller_context = GetPeer(context)->GetContext();
647 if (impeller_context->GetBackendType() !=
648 impeller::Context::BackendType::kOpenGLES) {
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
657 TextureDescriptor desc;
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 texture->SetCoordinateSystem(TextureCoordinateSystem::kUploadFromHost);
676 return Create<Texture>(impeller::Context::BackendType::kOpenGLES,
677 std::move(texture))
678 .Leak();
679 }
680
681 IMPELLER_EXTERN_C
682 void ImpellerTextureRetain(ImpellerTexture texture) {
683 ObjectBase::SafeRetain(texture);
684 }
685
686 IMPELLER_EXTERN_C
687 void ImpellerTextureRelease(ImpellerTexture texture) {
688 ObjectBase::SafeRelease(texture);
689 }
690
691 IMPELLER_EXTERN_C
692 uint64_t ImpellerTextureGetOpenGLHandle(ImpellerTexture texture) {
693 auto interop_texture = GetPeer(texture);
694 if (interop_texture->GetBackendType() !=
695 impeller::Context::BackendType::kOpenGLES) {
696 VALIDATION_LOG << "Can only fetch the texture handle of an OpenGL texture.";
697 return 0u;
698 }
699 return TextureGLES::Cast(*interop_texture->GetTexture())
700 .GetGLHandle()
701 .value_or(0u);
702 }
703
704 IMPELLER_EXTERN_C
705 void ImpellerDisplayListRetain(ImpellerDisplayList display_list) {
706 ObjectBase::SafeRetain(display_list);
707 }
708
709 IMPELLER_EXTERN_C
710 void ImpellerDisplayListRelease(ImpellerDisplayList display_list) {
711 ObjectBase::SafeRelease(display_list);
712 }
713
714 IMPELLER_EXTERN_C
715 ImpellerDisplayList ImpellerDisplayListBuilderCreateDisplayListNew(
716 ImpellerDisplayListBuilder builder) {
717 auto dl = GetPeer(builder)->Build();
718 if (!dl->IsValid()) {
719 return nullptr;
720 }
721 return dl.Leak();
722 }
723
724 IMPELLER_EXTERN_C
725 void ImpellerDisplayListBuilderDrawDisplayList(
726 ImpellerDisplayListBuilder builder,
727 ImpellerDisplayList display_list,
728 float opacity) {
729 GetPeer(builder)->DrawDisplayList(*GetPeer(display_list), opacity);
730 }
731
732 IMPELLER_EXTERN_C
733 ImpellerSurface ImpellerSurfaceCreateWrappedFBONew(ImpellerContext context,
734 uint64_t fbo,
735 ImpellerPixelFormat format,
736 const ImpellerISize* size) {
737 #if IMPELLER_ENABLE_OPENGLES
738 if (!GetPeer(context)->IsGL()) {
739 VALIDATION_LOG << "Context is not OpenGL.";
740 return nullptr;
741 }
742 return Create<SurfaceGLES>(*GetPeer(context), //
743 fbo, //
744 ToImpellerType(format), //
745 ToImpellerType(*size)) //
746 .Leak();
747 #else // IMPELLER_ENABLE_OPENGLES
748 VALIDATION_LOG << "OpenGL unavailable.";
749 return nullptr;
750 #endif // IMPELLER_ENABLE_OPENGLES
751 }
752
753 IMPELLER_EXTERN_C
754 ImpellerSurface ImpellerSurfaceCreateWrappedMetalDrawableNew(
755 ImpellerContext context,
756 void* metal_drawable) {
757 #if IMPELLER_ENABLE_METAL
758 if (!GetPeer(context)->IsMetal()) {
759 VALIDATION_LOG << "Context is not Metal.";
760 return nullptr;
761 }
762 return Create<SurfaceMTL>(*GetPeer(context), metal_drawable).Leak();
763 #else // IMPELLER_ENABLE_METAL
764 VALIDATION_LOG << "Metal unavailable.";
765 return nullptr;
766 #endif // IMPELLER_ENABLE_METAL
767 }
768
769 IMPELLER_EXTERN_C void ImpellerSurfaceRetain(ImpellerSurface surface) {
770 ObjectBase::SafeRetain(surface);
771 }
772
773 IMPELLER_EXTERN_C
774 void ImpellerSurfaceRelease(ImpellerSurface surface) {
775 ObjectBase::SafeRelease(surface);
776 }
777
778 IMPELLER_EXTERN_C
779 bool ImpellerSurfaceDrawDisplayList(ImpellerSurface surface,
780 ImpellerDisplayList display_list) {
781 return GetPeer(surface)->DrawDisplayList(*GetPeer(display_list));
782 }
783
784 IMPELLER_EXTERN_C
785 bool ImpellerSurfacePresent(ImpellerSurface surface) {
786 return GetPeer(surface)->Present();
787 }
788
789 IMPELLER_EXTERN_C
790 void ImpellerDisplayListBuilderDrawTexture(ImpellerDisplayListBuilder builder,
791 ImpellerTexture texture,
792 const ImpellerPoint* point,
793 ImpellerTextureSampling sampling,
794 ImpellerPaint paint) {
795 GetPeer(builder)->DrawTexture(*GetPeer(texture), //
796 ToImpellerType(*point), //
797 ToDisplayListType(sampling), //
798 GetPeer(paint) //
799 );
800 }
801
802 IMPELLER_EXTERN_C
803 void ImpellerDisplayListBuilderDrawTextureRect(
804 ImpellerDisplayListBuilder builder,
805 ImpellerTexture texture,
806 const ImpellerRect* src_rect,
807 const ImpellerRect* dst_rect,
808 ImpellerTextureSampling sampling,
809 ImpellerPaint paint) {
810 GetPeer(builder)->DrawTextureRect(*GetPeer(texture), //
811 ToImpellerType(*src_rect), //
812 ToImpellerType(*dst_rect), //
813 ToDisplayListType(sampling), //
814 GetPeer(paint) //
815 );
816 }
817
818 IMPELLER_EXTERN_C
819 void ImpellerColorSourceRetain(ImpellerColorSource color_source) {
820 ObjectBase::SafeRetain(color_source);
821 }
822
823 IMPELLER_EXTERN_C
824 void ImpellerColorSourceRelease(ImpellerColorSource color_source) {
825 ObjectBase::SafeRelease(color_source);
826 }
827
828 static std::pair<std::vector<flutter::DlColor>, std::vector<Scalar>>
829 ParseColorsAndStops(uint32_t stop_count,
830 const ImpellerColor* colors,
831 const float* stops) {
832 if (stop_count == 0) {
833 return {};
834 }
835 std::pair<std::vector<flutter::DlColor>, std::vector<Scalar>> result;
836 result.first.reserve(stop_count);
837 result.second.reserve(stop_count);
838 for (size_t i = 0; i < stop_count; i++) {
839 result.first.emplace_back(ToDisplayListType(colors[i]));
840 result.second.emplace_back(stops[i]);
841 }
842 return result;
843 }
844
845 IMPELLER_EXTERN_C
846 ImpellerColorSource ImpellerColorSourceCreateLinearGradientNew(
847 const ImpellerPoint* start_point,
848 const ImpellerPoint* end_point,
849 uint32_t stop_count,
850 const ImpellerColor* colors,
851 const float* stops,
852 ImpellerTileMode tile_mode,
853 const ImpellerMatrix* transformation) {
854 const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
855 return ColorSource::MakeLinearGradient(
856 ToImpellerType(*start_point), //
857 ToImpellerType(*end_point), //
858 colors_and_stops.first, //
859 colors_and_stops.second, //
860 ToDisplayListType(tile_mode), //
861 transformation == nullptr ? Matrix{}
862 : ToImpellerType(*transformation) //
863 )
864 .Leak();
865 }
866
867 IMPELLER_EXTERN_C
868 ImpellerColorSource ImpellerColorSourceCreateRadialGradientNew(
869 const ImpellerPoint* center,
870 float radius,
871 uint32_t stop_count,
872 const ImpellerColor* colors,
873 const float* stops,
874 ImpellerTileMode tile_mode,
875 const ImpellerMatrix* transformation) {
876 const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
877 return ColorSource::MakeRadialGradient(
878 ToImpellerType(*center), //
879 radius, //
880 colors_and_stops.first, //
881 colors_and_stops.second, //
882 ToDisplayListType(tile_mode), //
883 transformation == nullptr ? Matrix{}
884 : ToImpellerType(*transformation) //
885 )
886 .Leak();
887 }
888
889 IMPELLER_EXTERN_C
890 ImpellerColorSource ImpellerColorSourceCreateConicalGradientNew(
891 const ImpellerPoint* start_center,
892 float start_radius,
893 const ImpellerPoint* end_center,
894 float end_radius,
895 uint32_t stop_count,
896 const ImpellerColor* colors,
897 const float* stops,
898 ImpellerTileMode tile_mode,
899 const ImpellerMatrix* transformation) {
900 const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
901 return ColorSource::MakeConicalGradient(
902 ToImpellerType(*start_center), //
903 start_radius, //
904 ToImpellerType(*end_center), //
905 end_radius, //
906 colors_and_stops.first, //
907 colors_and_stops.second, //
908 ToDisplayListType(tile_mode), //
909 transformation == nullptr ? Matrix{}
910 : ToImpellerType(*transformation) //
911 )
912 .Leak();
913 }
914
915 IMPELLER_EXTERN_C
916 ImpellerColorSource ImpellerColorSourceCreateSweepGradientNew(
917 const ImpellerPoint* center,
918 float start,
919 float end,
920 uint32_t stop_count,
921 const ImpellerColor* colors,
922 const float* stops,
923 ImpellerTileMode tile_mode,
924 const ImpellerMatrix* transformation) {
925 const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
926 return ColorSource::MakeSweepGradient(
927 ToImpellerType(*center), //
928 start, //
929 end, //
930 colors_and_stops.first, //
931 colors_and_stops.second, //
932 ToDisplayListType(tile_mode), //
933 transformation == nullptr ? Matrix{}
934 : ToImpellerType(*transformation) //
935 )
936 .Leak();
937 }
938
939 IMPELLER_EXTERN_C
940 ImpellerColorSource ImpellerColorSourceCreateImageNew(
941 ImpellerTexture image,
942 ImpellerTileMode horizontal_tile_mode,
943 ImpellerTileMode vertical_tile_mode,
944 ImpellerTextureSampling sampling,
945 const ImpellerMatrix* transformation) {
946 return ColorSource::MakeImage(
947 *GetPeer(image), //
948 ToDisplayListType(horizontal_tile_mode), //
949 ToDisplayListType(vertical_tile_mode), //
950 ToDisplayListType(sampling), //
951 transformation == nullptr ? Matrix{}
952 : ToImpellerType(*transformation) //
953 )
954 .Leak();
955 }
956
957 struct SamplersAndUniforms {
958 std::vector<std::shared_ptr<flutter::DlColorSource>> samplers;
959 std::shared_ptr<std::vector<uint8_t>> uniforms;
960 };
961
962 static SamplersAndUniforms ReadSamplersAndUniforms(ImpellerTexture* samplers,
963 size_t samplers_count,
964 const uint8_t* data,
965 size_t data_bytes_length) {
966 SamplersAndUniforms result;
967 result.uniforms = std::make_shared<std::vector<uint8_t>>();
968 if (data_bytes_length > 0) {
969 std::copy(data, data + data_bytes_length,
970 std::back_inserter(*result.uniforms));
971 }
972 if (samplers_count > 0) {
973 result.samplers.reserve(samplers_count);
974 for (size_t i = 0; i < samplers_count; i++) {
975 result.samplers.emplace_back(flutter::DlColorSource::MakeImage(
976 DlImageImpeller::Make(GetPeer(samplers[i])->GetTexture()), //
977 flutter::DlTileMode::kClamp, //
978 flutter::DlTileMode::kClamp //
979 ));
980 }
981 }
982 return result;
983 }
984
985 IMPELLER_EXTERN_C ImpellerColorSource
986 ImpellerColorSourceCreateFragmentProgramNew(
987 ImpellerContext context,
988 ImpellerFragmentProgram fragment_program,
989 ImpellerTexture* samplers,
990 size_t samplers_count,
991 const uint8_t* data,
992 size_t data_bytes_length) {
993 auto bindings = ReadSamplersAndUniforms(samplers, samplers_count, data,
994 data_bytes_length);
995 return ColorSource::MakeFragmentProgram(*GetPeer(context), //
996 *GetPeer(fragment_program), //
997 std::move(bindings.samplers), //
998 std::move(bindings.uniforms) //
999 )
1000 .Leak();
1001 }
1002
1003 IMPELLER_EXTERN_C
1004 void ImpellerColorFilterRetain(ImpellerColorFilter color_filter) {
1005 ObjectBase::SafeRetain(color_filter);
1006 }
1007
1008 IMPELLER_EXTERN_C
1009 void ImpellerColorFilterRelease(ImpellerColorFilter color_filter) {
1010 ObjectBase::SafeRelease(color_filter);
1011 }
1012
1013 IMPELLER_EXTERN_C
1014 ImpellerColorFilter ImpellerColorFilterCreateBlendNew(
1015 const ImpellerColor* color,
1016 ImpellerBlendMode blend_mode) {
1017 return ColorFilter::MakeBlend(ToImpellerType(*color),
1018 ToImpellerType(blend_mode))
1019 .Leak();
1020 }
1021
1022 IMPELLER_EXTERN_C
1023 ImpellerColorFilter ImpellerColorFilterCreateColorMatrixNew(
1024 const ImpellerColorMatrix* color_matrix) {
1025 return ColorFilter::MakeMatrix(color_matrix->m).Leak();
1026 }
1027
1028 IMPELLER_EXTERN_C
1029 void ImpellerMaskFilterRetain(ImpellerMaskFilter mask_filter) {
1030 ObjectBase::SafeRetain(mask_filter);
1031 }
1032
1033 IMPELLER_EXTERN_C
1034 void ImpellerMaskFilterRelease(ImpellerMaskFilter mask_filter) {
1035 ObjectBase::SafeRelease(mask_filter);
1036 }
1037
1038 IMPELLER_EXTERN_C
1039 ImpellerMaskFilter ImpellerMaskFilterCreateBlurNew(ImpellerBlurStyle style,
1040 float sigma) {
1041 return MaskFilter::MakeBlur(ToDisplayListType(style), sigma).Leak();
1042 }
1043
1044 IMPELLER_EXTERN_C
1045 void ImpellerImageFilterRetain(ImpellerImageFilter image_filter) {
1046 ObjectBase::SafeRetain(image_filter);
1047 }
1048
1049 IMPELLER_EXTERN_C
1050 void ImpellerImageFilterRelease(ImpellerImageFilter image_filter) {
1051 ObjectBase::SafeRelease(image_filter);
1052 }
1053
1054 IMPELLER_EXTERN_C
1055 ImpellerImageFilter ImpellerImageFilterCreateBlurNew(
1056 float x_sigma,
1057 float y_sigma,
1058 ImpellerTileMode tile_mode) {
1059 return ImageFilter::MakeBlur(x_sigma, y_sigma, ToDisplayListType(tile_mode))
1060 .Leak();
1061 }
1062
1063 IMPELLER_EXTERN_C
1064 ImpellerImageFilter ImpellerImageFilterCreateDilateNew(float x_radius,
1065 float y_radius) {
1066 return ImageFilter::MakeDilate(x_radius, y_radius).Leak();
1067 }
1068
1069 IMPELLER_EXTERN_C
1070 ImpellerImageFilter ImpellerImageFilterCreateErodeNew(float x_radius,
1071 float y_radius) {
1072 return ImageFilter::MakeErode(x_radius, y_radius).Leak();
1073 }
1074
1075 IMPELLER_EXTERN_C
1076 ImpellerImageFilter ImpellerImageFilterCreateMatrixNew(
1077 const ImpellerMatrix* matrix,
1078 ImpellerTextureSampling sampling) {
1079 return ImageFilter::MakeMatrix(ToImpellerType(*matrix),
1080 ToDisplayListType(sampling))
1081 .Leak();
1082 }
1083
1084 IMPELLER_EXTERN_C
1085 ImpellerImageFilter ImpellerImageFilterCreateFragmentProgramNew(
1086 ImpellerContext context,
1087 ImpellerFragmentProgram fragment_program,
1088 ImpellerTexture* samplers,
1089 size_t samplers_count,
1090 const uint8_t* data,
1091 size_t data_bytes_length) {
1092 auto bindings = ReadSamplersAndUniforms(samplers, samplers_count, data,
1093 data_bytes_length);
1094 return ImageFilter::MakeFragmentProgram(*GetPeer(context), //
1095 *GetPeer(fragment_program), //
1096 std::move(bindings.samplers), //
1097 std::move(bindings.uniforms) //
1098 )
1099 .Leak();
1100 }
1101
1102 IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateComposeNew(
1103 ImpellerImageFilter outer,
1104 ImpellerImageFilter inner) {
1105 return ImageFilter::MakeCompose(*GetPeer(outer), *GetPeer(inner)).Leak();
1106 }
1107
1108 IMPELLER_EXTERN_C
1109 void ImpellerPaintSetColorFilter(ImpellerPaint paint,
1110 ImpellerColorFilter color_filter) {
1111 GetPeer(paint)->SetColorFilter(*GetPeer(color_filter));
1112 }
1113
1114 IMPELLER_EXTERN_C
1115 void ImpellerPaintSetColorSource(ImpellerPaint paint,
1116 ImpellerColorSource color_source) {
1117 GetPeer(paint)->SetColorSource(*GetPeer(color_source));
1118 }
1119
1120 IMPELLER_EXTERN_C
1121 void ImpellerPaintSetImageFilter(ImpellerPaint paint,
1122 ImpellerImageFilter image_filter) {
1123 GetPeer(paint)->SetImageFilter(*GetPeer(image_filter));
1124 }
1125
1126 IMPELLER_EXTERN_C
1127 void ImpellerPaintSetMaskFilter(ImpellerPaint paint,
1128 ImpellerMaskFilter mask_filter) {
1129 GetPeer(paint)->SetMaskFilter(*GetPeer(mask_filter));
1130 }
1131
1132 IMPELLER_EXTERN_C
1133 ImpellerParagraphStyle ImpellerParagraphStyleNew() {
1134 return Create<ParagraphStyle>().Leak();
1135 }
1136
1137 IMPELLER_EXTERN_C
1138 void ImpellerParagraphStyleRetain(ImpellerParagraphStyle paragraph_style) {
1139 ObjectBase::SafeRetain(paragraph_style);
1140 }
1141
1142 IMPELLER_EXTERN_C
1143 void ImpellerParagraphStyleRelease(ImpellerParagraphStyle paragraph_style) {
1144 ObjectBase::SafeRelease(paragraph_style);
1145 }
1146
1147 IMPELLER_EXTERN_C
1148 void ImpellerParagraphStyleSetForeground(ImpellerParagraphStyle paragraph_style,
1149 ImpellerPaint paint) {
1150 GetPeer(paragraph_style)->SetForeground(Ref(GetPeer(paint)));
1151 }
1152
1153 IMPELLER_EXTERN_C
1154 void ImpellerParagraphStyleSetBackground(ImpellerParagraphStyle paragraph_style,
1155 ImpellerPaint paint) {
1156 GetPeer(paragraph_style)->SetBackground(Ref(GetPeer(paint)));
1157 }
1158
1159 IMPELLER_EXTERN_C
1160 void ImpellerParagraphStyleSetFontWeight(ImpellerParagraphStyle paragraph_style,
1161 ImpellerFontWeight weight) {
1162 GetPeer(paragraph_style)->SetFontWeight(ToTxtType(weight));
1163 }
1164
1165 IMPELLER_EXTERN_C
1166 void ImpellerParagraphStyleSetFontStyle(ImpellerParagraphStyle paragraph_style,
1167 ImpellerFontStyle style) {
1168 GetPeer(paragraph_style)->SetFontStyle(ToTxtType(style));
1169 }
1170
1171 static std::string ReadString(const char* string) {
1172 if (string == nullptr) {
1173 return "";
1174 }
1175 return std::string{string};
1176 }
1177
1178 IMPELLER_EXTERN_C
1179 void ImpellerParagraphStyleSetFontFamily(ImpellerParagraphStyle paragraph_style,
1180 const char* family_name) {
1181 GetPeer(paragraph_style)->SetFontFamily(ReadString(family_name));
1182 }
1183
1184 IMPELLER_EXTERN_C
1185 void ImpellerParagraphStyleSetFontSize(ImpellerParagraphStyle paragraph_style,
1186 float size) {
1187 GetPeer(paragraph_style)->SetFontSize(size);
1188 }
1189
1190 IMPELLER_EXTERN_C
1191 void ImpellerParagraphStyleSetHeight(ImpellerParagraphStyle paragraph_style,
1192 float height) {
1193 GetPeer(paragraph_style)->SetHeight(height);
1194 }
1195
1196 IMPELLER_EXTERN_C
1197 void ImpellerParagraphStyleSetTextAlignment(
1198 ImpellerParagraphStyle paragraph_style,
1199 ImpellerTextAlignment align) {
1200 GetPeer(paragraph_style)->SetTextAlignment(ToTxtType(align));
1201 }
1202
1203 IMPELLER_EXTERN_C
1204 void ImpellerParagraphStyleSetTextDirection(
1205 ImpellerParagraphStyle paragraph_style,
1206 ImpellerTextDirection direction) {
1207 GetPeer(paragraph_style)->SetTextDirection(ToTxtType(direction));
1208 }
1209
1210 IMPELLER_EXTERN_C
1211 void ImpellerParagraphStyleSetTextDecoration(
1212 ImpellerParagraphStyle paragraph_style,
1213 const ImpellerTextDecoration* decoration) {
1214 GetPeer(paragraph_style)->SetTextDecoration(*decoration);
1215 }
1216
1217 IMPELLER_EXTERN_C
1218 void ImpellerParagraphStyleSetMaxLines(ImpellerParagraphStyle paragraph_style,
1219 uint32_t max_lines) {
1220 GetPeer(paragraph_style)->SetMaxLines(max_lines);
1221 }
1222
1223 IMPELLER_EXTERN_C
1224 void ImpellerParagraphStyleSetLocale(ImpellerParagraphStyle paragraph_style,
1225 const char* locale) {
1226 GetPeer(paragraph_style)->SetLocale(ReadString(locale));
1227 }
1228
1229 IMPELLER_EXTERN_C
1230 void ImpellerParagraphStyleSetEllipsis(ImpellerParagraphStyle paragraph_style,
1231 const char* ellipsis) {
1232 GetPeer(paragraph_style)->SetEllipsis(ReadString(ellipsis));
1233 }
1234
1235 IMPELLER_EXTERN_C
1236 void ImpellerDisplayListBuilderDrawParagraph(ImpellerDisplayListBuilder builder,
1237 ImpellerParagraph paragraph,
1238 const ImpellerPoint* point) {
1239 GetPeer(builder)->DrawParagraph(*GetPeer(paragraph), ToImpellerType(*point));
1240 }
1241
1242 IMPELLER_EXTERN_C
1243 void ImpellerDisplayListBuilderDrawShadow(ImpellerDisplayListBuilder builder,
1244 ImpellerPath path,
1245 const ImpellerColor* color,
1246 float elevation,
1247 bool occluder_is_transparent,
1248 float device_pixel_ratio) {
1249 GetPeer(builder)->DrawShadow(*GetPeer(path), //
1250 ToDisplayListType(*color), //
1251 elevation, //
1252 occluder_is_transparent, //
1253 device_pixel_ratio //
1254 );
1255 }
1256
1257 IMPELLER_EXTERN_C
1258 ImpellerParagraphBuilder ImpellerParagraphBuilderNew(
1259 ImpellerTypographyContext context) {
1260 auto builder =
1261 Create<ParagraphBuilder>(Ref<TypographyContext>(GetPeer(context)));
1262 if (!builder->IsValid()) {
1263 VALIDATION_LOG << "Could not create valid paragraph builder.";
1264 return nullptr;
1265 }
1266 return builder.Leak();
1267 }
1268
1269 IMPELLER_EXTERN_C
1270 void ImpellerParagraphBuilderRetain(
1271 ImpellerParagraphBuilder paragraph_builder) {
1272 ObjectBase::SafeRetain(paragraph_builder);
1273 }
1274
1275 IMPELLER_EXTERN_C
1276 void ImpellerParagraphBuilderRelease(
1277 ImpellerParagraphBuilder paragraph_builder) {
1278 ObjectBase::SafeRelease(paragraph_builder);
1279 }
1280
1281 IMPELLER_EXTERN_C
1282 void ImpellerParagraphBuilderPushStyle(
1283 ImpellerParagraphBuilder paragraph_builder,
1284 ImpellerParagraphStyle style) {
1285 GetPeer(paragraph_builder)->PushStyle(*GetPeer(style));
1286 }
1287
1288 IMPELLER_EXTERN_C
1289 void ImpellerParagraphBuilderPopStyle(
1290 ImpellerParagraphBuilder paragraph_builder) {
1291 GetPeer(paragraph_builder)->PopStyle();
1292 }
1293
1294 IMPELLER_EXTERN_C
1295 void ImpellerParagraphBuilderAddText(ImpellerParagraphBuilder paragraph_builder,
1296 const uint8_t* data,
1297 uint32_t length) {
1298 if (data == nullptr) {
1299 length = 0;
1300 }
1301 if (length == 0) {
1302 return;
1303 }
1304 GetPeer(paragraph_builder)->AddText(data, length);
1305 }
1306
1307 IMPELLER_EXTERN_C
1308 ImpellerParagraph ImpellerParagraphBuilderBuildParagraphNew(
1309 ImpellerParagraphBuilder paragraph_builder,
1310 float width) {
1311 return GetPeer(paragraph_builder)->Build(width).Leak();
1312 }
1313
1314 IMPELLER_EXTERN_C
1315 void ImpellerParagraphRetain(ImpellerParagraph paragraph) {
1316 ObjectBase::SafeRetain(paragraph);
1317 }
1318
1319 IMPELLER_EXTERN_C
1320 void ImpellerParagraphRelease(ImpellerParagraph paragraph) {
1321 ObjectBase::SafeRelease(paragraph);
1322 }
1323
1324 IMPELLER_EXTERN_C
1325 float ImpellerParagraphGetMaxWidth(ImpellerParagraph paragraph) {
1326 return GetPeer(paragraph)->GetMaxWidth();
1327 }
1328
1329 IMPELLER_EXTERN_C
1330 float ImpellerParagraphGetHeight(ImpellerParagraph paragraph) {
1331 return GetPeer(paragraph)->GetHeight();
1332 }
1333
1334 IMPELLER_EXTERN_C
1335 float ImpellerParagraphGetLongestLineWidth(ImpellerParagraph paragraph) {
1336 return GetPeer(paragraph)->GetLongestLineWidth();
1337 }
1338
1339 IMPELLER_EXTERN_C
1340 float ImpellerParagraphGetMinIntrinsicWidth(ImpellerParagraph paragraph) {
1341 return GetPeer(paragraph)->GetMinIntrinsicWidth();
1342 }
1343
1344 IMPELLER_EXTERN_C
1345 float ImpellerParagraphGetMaxIntrinsicWidth(ImpellerParagraph paragraph) {
1346 return GetPeer(paragraph)->GetMaxIntrinsicWidth();
1347 }
1348
1349 IMPELLER_EXTERN_C
1350 float ImpellerParagraphGetIdeographicBaseline(ImpellerParagraph paragraph) {
1351 return GetPeer(paragraph)->GetIdeographicBaseline();
1352 }
1353
1354 IMPELLER_EXTERN_C
1355 float ImpellerParagraphGetAlphabeticBaseline(ImpellerParagraph paragraph) {
1356 return GetPeer(paragraph)->GetAlphabeticBaseline();
1357 }
1358
1359 IMPELLER_EXTERN_C
1360 uint32_t ImpellerParagraphGetLineCount(ImpellerParagraph paragraph) {
1361 return GetPeer(paragraph)->GetLineCount();
1362 }
1363
1364 IMPELLER_EXTERN_C
1365 void ImpellerParagraphGetWordBoundary(ImpellerParagraph paragraph,
1366 size_t code_unit_index,
1367 ImpellerRange* out_range) {
1368 *out_range = GetPeer(paragraph)->GetWordBoundary(code_unit_index);
1369 }
1370
1371 IMPELLER_EXTERN_C
1372 ImpellerTypographyContext ImpellerTypographyContextNew() {
1373 auto context = Create<TypographyContext>();
1374 if (!context->IsValid()) {
1375 VALIDATION_LOG << "Could not create typography context.";
1376 return nullptr;
1377 }
1378 return context.Leak();
1379 }
1380
1381 IMPELLER_EXTERN_C
1382 void ImpellerTypographyContextRetain(ImpellerTypographyContext context) {
1383 ObjectBase::SafeRetain(context);
1384 }
1385
1386 IMPELLER_EXTERN_C
1387 void ImpellerTypographyContextRelease(ImpellerTypographyContext context) {
1388 ObjectBase::SafeRelease(context);
1389 }
1390
1391 IMPELLER_EXTERN_C
1392 bool ImpellerTypographyContextRegisterFont(ImpellerTypographyContext context,
1393 const ImpellerMapping* contents,
1394 void* contents_on_release_user_data,
1395 const char* family_name_alias) {
1396 auto wrapped_contents = std::make_unique<fml::NonOwnedMapping>(
1397 contents->data, // data ptr
1398 contents->length, // data length
1399 [on_release = contents->on_release, contents_on_release_user_data](auto,
1400 auto) {
1401 on_release(contents_on_release_user_data);
1402 } // release callback
1403 );
1404 return GetPeer(context)->RegisterFont(std::move(wrapped_contents),
1405 family_name_alias);
1406 }
1407
1408 IMPELLER_EXTERN_C
1409 ImpellerLineMetrics ImpellerParagraphGetLineMetrics(
1410 ImpellerParagraph paragraph) {
1411 return GetPeer(paragraph)->GetLineMetrics().GetC();
1412 }
1413
1414 IMPELLER_EXTERN_C
1415 ImpellerGlyphInfo ImpellerParagraphCreateGlyphInfoAtCodeUnitIndexNew(
1416 ImpellerParagraph paragraph,
1417 size_t code_unit_index) {
1418 return GetPeer(paragraph)
1419 ->GetGlyphInfoAtCodeUnitIndex(code_unit_index)
1420 .Leak();
1421 }
1422
1423 IMPELLER_EXTERN_C
1424 ImpellerGlyphInfo ImpellerParagraphCreateGlyphInfoAtParagraphCoordinatesNew(
1425 ImpellerParagraph paragraph,
1426 double x,
1427 double y) {
1428 return GetPeer(paragraph)
1429 ->GetClosestGlyphInfoAtParagraphCoordinates(x, y)
1430 .Leak();
1431 }
1432
1433 //------------------------------------------------------------------------------
1434 // Line Metrics
1435 //------------------------------------------------------------------------------
1436
1437 IMPELLER_EXTERN_C
1438 void ImpellerLineMetricsRetain(ImpellerLineMetrics line_metrics) {
1439 ObjectBase::SafeRetain(line_metrics);
1440 }
1441
1442 IMPELLER_EXTERN_C
1443 void ImpellerLineMetricsRelease(ImpellerLineMetrics line_metrics) {
1444 ObjectBase::SafeRelease(line_metrics);
1445 }
1446
1447 IMPELLER_EXTERN_C
1448 double ImpellerLineMetricsGetUnscaledAscent(ImpellerLineMetrics metrics,
1449 size_t line) {
1450 return GetPeer(metrics)->GetUnscaledAscent(line);
1451 }
1452
1453 IMPELLER_EXTERN_C
1454 double ImpellerLineMetricsGetAscent(ImpellerLineMetrics metrics, size_t line) {
1455 return GetPeer(metrics)->GetAscent(line);
1456 }
1457
1458 IMPELLER_EXTERN_C
1459 double ImpellerLineMetricsGetDescent(ImpellerLineMetrics metrics, size_t line) {
1460 return GetPeer(metrics)->GetDescent(line);
1461 }
1462
1463 IMPELLER_EXTERN_C
1464 double ImpellerLineMetricsGetBaseline(ImpellerLineMetrics metrics,
1465 size_t line) {
1466 return GetPeer(metrics)->GetBaseline(line);
1467 }
1468
1469 IMPELLER_EXTERN_C
1470 bool ImpellerLineMetricsIsHardbreak(ImpellerLineMetrics metrics, size_t line) {
1471 return GetPeer(metrics)->IsHardbreak(line);
1472 }
1473
1474 IMPELLER_EXTERN_C
1475 double ImpellerLineMetricsGetWidth(ImpellerLineMetrics metrics, size_t line) {
1476 return GetPeer(metrics)->GetWidth(line);
1477 }
1478
1479 IMPELLER_EXTERN_C
1480 double ImpellerLineMetricsGetHeight(ImpellerLineMetrics metrics, size_t line) {
1481 return GetPeer(metrics)->GetHeight(line);
1482 }
1483
1484 IMPELLER_EXTERN_C
1485 double ImpellerLineMetricsGetLeft(ImpellerLineMetrics metrics, size_t line) {
1486 return GetPeer(metrics)->GetLeft(line);
1487 }
1488
1489 IMPELLER_EXTERN_C
1490 size_t ImpellerLineMetricsGetCodeUnitStartIndex(ImpellerLineMetrics metrics,
1491 size_t line) {
1492 return GetPeer(metrics)->GetCodeUnitStartIndex(line);
1493 }
1494
1495 IMPELLER_EXTERN_C
1496 size_t ImpellerLineMetricsGetCodeUnitEndIndex(ImpellerLineMetrics metrics,
1497 size_t line) {
1498 return GetPeer(metrics)->GetCodeUnitEndIndex(line);
1499 }
1500
1501 IMPELLER_EXTERN_C
1502 size_t ImpellerLineMetricsGetCodeUnitEndIndexExcludingWhitespace(
1503 ImpellerLineMetrics metrics,
1504 size_t line) {
1505 return GetPeer(metrics)->GetCodeUnitEndIndexExcludingWhitespace(line);
1506 }
1507
1508 IMPELLER_EXTERN_C
1509 size_t ImpellerLineMetricsGetCodeUnitEndIndexIncludingNewline(
1510 ImpellerLineMetrics metrics,
1511 size_t line) {
1512 return GetPeer(metrics)->GetCodeUnitEndIndexIncludingNewline(line);
1513 }
1514
1515 //------------------------------------------------------------------------------
1516 // Glyph Info
1517 //------------------------------------------------------------------------------
1518
1519 IMPELLER_EXTERN_C
1520 void ImpellerGlyphInfoRetain(ImpellerGlyphInfo glyph_info) {
1521 ObjectBase::SafeRetain(glyph_info);
1522 }
1523
1524 IMPELLER_EXTERN_C
1525 void ImpellerGlyphInfoRelease(ImpellerGlyphInfo glyph_info) {
1526 ObjectBase::SafeRelease(glyph_info);
1527 }
1528
1529 IMPELLER_EXTERN_C
1530 size_t ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeBegin(
1531 ImpellerGlyphInfo glyph_info) {
1532 return GetPeer(glyph_info)->GetGraphemeClusterCodeUnitRangeBegin();
1533 }
1534
1535 IMPELLER_EXTERN_C
1536 size_t ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeEnd(
1537 ImpellerGlyphInfo glyph_info) {
1538 return GetPeer(glyph_info)->GetGraphemeClusterCodeUnitRangeEnd();
1539 }
1540
1541 IMPELLER_EXTERN_C
1542 void ImpellerGlyphInfoGetGraphemeClusterBounds(ImpellerGlyphInfo glyph_info,
1543 ImpellerRect* out_bounds) {
1544 *out_bounds = GetPeer(glyph_info)->GetGraphemeClusterBounds();
1545 }
1546
1547 IMPELLER_EXTERN_C
1548 bool ImpellerGlyphInfoIsEllipsis(ImpellerGlyphInfo glyph_info) {
1549 return GetPeer(glyph_info)->IsEllipsis();
1550 }
1551
1552 IMPELLER_EXTERN_C
1553 ImpellerTextDirection ImpellerGlyphInfoGetTextDirection(
1554 ImpellerGlyphInfo glyph_info) {
1555 return GetPeer(glyph_info)->GetTextDirection();
1556 }
1557
1558 //------------------------------------------------------------------------------
1559 // Fragment Program
1560 //------------------------------------------------------------------------------
1561
1562 static std::shared_ptr<fml::Mapping> MakeCopyableMapping(
1563 const ImpellerMapping* data,
1564 void* user_data) {
1565 if (data == nullptr) {
1566 return nullptr;
1567 }
1568
1569 // If the user has supplied a release callback, defer deallocation to them.
1570 if (auto callback = data->on_release) {
1571 return std::make_shared<fml::NonOwnedMapping>(
1572 data->data, //
1573 data->length, //
1574 [user_data, callback](const uint8_t* data, size_t size) {
1575 callback(user_data);
1576 });
1577 }
1578
1579 return std::make_shared<fml::MallocMapping>(
1580 fml::MallocMapping::Copy(data->data, data->length));
1581 }
1582
1583 IMPELLER_EXTERN_C
1584 ImpellerFragmentProgram ImpellerFragmentProgramNew(
1585 const ImpellerMapping* data,
1586 void* data_release_user_data) {
1587 auto data_mapping = MakeCopyableMapping(data, data_release_user_data);
1588 auto program = Create<FragmentProgram>(std::move(data_mapping));
1589 if (!program->IsValid()) {
1590 VALIDATION_LOG << "Could not create valid fragment program.";
1591 return nullptr;
1592 }
1593 return program.Leak();
1594 }
1595
1596 IMPELLER_EXTERN_C
1597 void ImpellerFragmentProgramRetain(ImpellerFragmentProgram fragment_program) {
1598 ObjectBase::SafeRetain(fragment_program);
1599 }
1600
1601 IMPELLER_EXTERN_C
1602 void ImpellerFragmentProgramRelease(ImpellerFragmentProgram fragment_program) {
1603 ObjectBase::SafeRelease(fragment_program);
1604 }
1605
1606 } // namespace impeller::interop
impeller::BackendCast< ContextGLES, Context >::Cast
static ContextGLES & Cast(Context &base)
Definition: backend_cast.h:13
impeller::Context::BackendType::kOpenGLES
@ kOpenGLES
impeller::DlImageImpeller::Make
static sk_sp< DlImageImpeller > Make(std::shared_ptr< Texture > texture, OwningContext owning_context=OwningContext::kIO)
Definition: dl_image_impeller.cc:23
impeller::TextureGLES::GetGLHandle
std::optional< GLuint > GetGLHandle() const
Definition: texture_gles.cc:509
impeller::TextureGLES::WrapTexture
static std::shared_ptr< TextureGLES > WrapTexture(std::shared_ptr< ReactorGLES > reactor, TextureDescriptor desc, HandleGLES external_handle)
Create a texture by wrapping an external OpenGL texture handle. Ownership of the texture handle is as...
Definition: texture_gles.cc:159
impeller::interop::ColorFilter
Definition: color_filter.h:17
impeller::interop::ColorFilter::MakeMatrix
static ScopedObject< ColorFilter > MakeMatrix(const float matrix[20])
Definition: color_filter.cc:18
impeller::interop::ColorFilter::MakeBlend
static ScopedObject< ColorFilter > MakeBlend(Color color, BlendMode mode)
Definition: color_filter.cc:9
impeller::interop::ColorSource
Definition: color_source.h:24
impeller::interop::ColorSource::MakeSweepGradient
static ScopedObject< ColorSource > MakeSweepGradient(const Point &center, Scalar start, Scalar end, const std::vector< flutter::DlColor > &colors, const std::vector< Scalar > &stops, flutter::DlTileMode tile_mode, const Matrix &transformation)
Definition: color_source.cc:76
impeller::interop::ColorSource::MakeFragmentProgram
static ScopedObject< ColorSource > MakeFragmentProgram(const Context &context, const FragmentProgram &program, std::vector< std::shared_ptr< flutter::DlColorSource >> samplers, std::shared_ptr< std::vector< uint8_t >> uniform_data)
Definition: color_source.cc:114
impeller::interop::ColorSource::MakeImage
static ScopedObject< ColorSource > MakeImage(const Texture &image, flutter::DlTileMode horizontal_tile_mode, flutter::DlTileMode vertical_tile_mode, flutter::DlImageSampling sampling, const Matrix &transformation)
Definition: color_source.cc:99
impeller::interop::ColorSource::MakeRadialGradient
static ScopedObject< ColorSource > MakeRadialGradient(const Point &center, Scalar radius, const std::vector< flutter::DlColor > &colors, const std::vector< Scalar > &stops, flutter::DlTileMode tile_mode, const Matrix &transformation)
Definition: color_source.cc:30
impeller::interop::ColorSource::MakeLinearGradient
static ScopedObject< ColorSource > MakeLinearGradient(const Point &start_point, const Point &end_point, const std::vector< flutter::DlColor > &colors, const std::vector< Scalar > &stops, flutter::DlTileMode tile_mode, const Matrix &transformation)
Definition: color_source.cc:9
impeller::interop::ColorSource::MakeConicalGradient
static ScopedObject< ColorSource > MakeConicalGradient(const Point &start_center, Scalar start_radius, const Point &end_center, Scalar end_radius, const std::vector< flutter::DlColor > &colors, const std::vector< Scalar > &stops, flutter::DlTileMode tile_mode, const Matrix &transformation)
Definition: color_source.cc:51
impeller::interop::ContextGLES::Create
static ScopedObject< Context > Create(std::function< void *(const char *gl_proc_name)> proc_address_callback)
Definition: context_gles.cc:14
impeller::interop::Context
Definition: context.h:16
impeller::interop::ContextMTL::Create
static ScopedObject< Context > Create()
Definition: context_mtl.mm:29
impeller::interop::ContextVK
Definition: context_vk.h:14
impeller::interop::ContextVK::Create
static ScopedObject< Context > Create(const Settings &settings)
Definition: context_vk.cc:45
impeller::interop::DisplayListBuilder
Definition: dl_builder.h:26
impeller::interop::DisplayList
Definition: dl.h:16
impeller::interop::FragmentProgram
Definition: fragment_program.h:17
impeller::interop::GlyphInfo
Internal C++ peer of ImpellerGlyphInfo. For detailed documentation, refer to the headerdocs in the pu...
Definition: glyph_info.h:21
impeller::interop::ImageFilter
Definition: image_filter.h:18
impeller::interop::ImageFilter::MakeDilate
static ScopedObject< ImageFilter > MakeDilate(Scalar x_radius, Scalar y_radius)
Definition: image_filter.cc:28
impeller::interop::ImageFilter::MakeFragmentProgram
static ScopedObject< ImageFilter > MakeFragmentProgram(const Context &context, const FragmentProgram &program, std::vector< std::shared_ptr< flutter::DlColorSource >> samplers, std::shared_ptr< std::vector< uint8_t >> uniform_data)
Definition: image_filter.cc:56
impeller::interop::ImageFilter::MakeErode
static ScopedObject< ImageFilter > MakeErode(Scalar x_radius, Scalar y_radius)
Definition: image_filter.cc:37
impeller::interop::ImageFilter::MakeCompose
static ScopedObject< ImageFilter > MakeCompose(const ImageFilter &outer, const ImageFilter &inner)
Definition: image_filter.cc:85
impeller::interop::ImageFilter::MakeBlur
static ScopedObject< ImageFilter > MakeBlur(Scalar x_sigma, Scalar y_sigma, flutter::DlTileMode tile_mode)
Definition: image_filter.cc:18
impeller::interop::ImageFilter::MakeMatrix
static ScopedObject< ImageFilter > MakeMatrix(const Matrix &matrix, flutter::DlImageSampling sampling)
Definition: image_filter.cc:46
impeller::interop::LineMetrics
Internal C++ peer of ImpellerLineMetrics. For detailed documentation, refer to the headerdocs in the ...
Definition: line_metrics.h:26
impeller::interop::MaskFilter
Definition: mask_filter.h:16
impeller::interop::MaskFilter::MakeBlur
static ScopedObject< MaskFilter > MakeBlur(flutter::DlBlurStyle style, float sigma)
Definition: mask_filter.cc:9
impeller::interop::ObjectBase::SafeRelease
static void SafeRelease(void *ptr)
Definition: object.h:43
impeller::interop::ObjectBase::SafeRetain
static void SafeRetain(void *ptr)
Definition: object.h:37
impeller::interop::Paint
Definition: paint.h:22
impeller::interop::ParagraphBuilder
Definition: paragraph_builder.h:21
impeller::interop::Paragraph
Definition: paragraph.h:21
impeller::interop::ParagraphStyle
Definition: paragraph_style.h:17
impeller::interop::PathBuilder
Definition: path_builder.h:21
impeller::interop::Path
Definition: path.h:15
impeller::interop::Surface
Definition: surface.h:19
impeller::interop::SwapchainVK
Definition: swapchain_vk.h:18
impeller::interop::Texture
Definition: texture.h:17
impeller::interop::TypographyContext
Definition: typography_context.h:19
color_source.h
dl_builder.h
x
int32_t x
Definition: dl_golden_unittests.cc:458
fragment_program.h
transform
Matrix transform
Definition: gaussian_blur_filter_contents.cc:214
glyph_info.h
impeller.h
ImpellerFillType
ImpellerFillType
Definition: impeller.h:364
ImpellerTextDirection
ImpellerTextDirection
Definition: impeller.h:479
ImpellerTextureSampling
ImpellerTextureSampling
Definition: impeller.h:428
IMPELLER_VERSION_GET_PATCH
#define IMPELLER_VERSION_GET_PATCH(version)
Definition: impeller.h:135
IMPELLER_VERSION_GET_MAJOR
#define IMPELLER_VERSION_GET_MAJOR(version)
Definition: impeller.h:119
IMPELLER_VERSION_GET_VARIANT
#define IMPELLER_VERSION_GET_VARIANT(version)
Definition: impeller.h:112
ImpellerStrokeJoin
ImpellerStrokeJoin
Definition: impeller.h:418
ImpellerBlendMode
ImpellerBlendMode
Definition: impeller.h:374
IMPELLER_VERSION
#define IMPELLER_VERSION
Definition: impeller.h:103
ImpellerFontWeight
ImpellerFontWeight
Definition: impeller.h:453
IMPELLER_VERSION_GET_MINOR
#define IMPELLER_VERSION_GET_MINOR(version)
Definition: impeller.h:127
ImpellerProcAddressCallback
void *IMPELLER_NULLABLE(* ImpellerProcAddressCallback)(const char *IMPELLER_NONNULL proc_name, void *IMPELLER_NULLABLE user_data)
Definition: impeller.h:347
IMPELLER_EXTERN_C
#define IMPELLER_EXTERN_C
Definition: impeller.h:36
ImpellerStrokeCap
ImpellerStrokeCap
Definition: impeller.h:412
ImpellerDrawStyle
ImpellerDrawStyle
Definition: impeller.h:406
ImpellerTileMode
ImpellerTileMode
Definition: impeller.h:433
ImpellerTextAlignment
ImpellerTextAlignment
Definition: impeller.h:470
ImpellerFontStyle
ImpellerFontStyle
Definition: impeller.h:465
ImpellerClipOperation
ImpellerClipOperation
Definition: impeller.h:369
IMPELLER_NONNULL
#define IMPELLER_NONNULL
Definition: impeller.h:58
ImpellerBlurStyle
ImpellerBlurStyle
Definition: impeller.h:440
ImpellerPixelFormat
ImpellerPixelFormat
Definition: impeller.h:424
line_metrics.h
mask_filter.h
impeller::interop
Definition: context_gles.cc:12
impeller::interop::ImpellerImageFilterCreateComposeNew
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateComposeNew(ImpellerImageFilter outer, ImpellerImageFilter inner)
Definition: impeller.cc:1102
impeller::interop::ImpellerParagraphBuilderRetain
IMPELLER_EXTERN_C void ImpellerParagraphBuilderRetain(ImpellerParagraphBuilder paragraph_builder)
Definition: impeller.cc:1270
impeller::interop::ImpellerColorSourceCreateSweepGradientNew
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)
Definition: impeller.cc:916
impeller::interop::ImpellerLineMetricsIsHardbreak
IMPELLER_EXTERN_C bool ImpellerLineMetricsIsHardbreak(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1470
impeller::interop::ImpellerGlyphInfoRelease
IMPELLER_EXTERN_C void ImpellerGlyphInfoRelease(ImpellerGlyphInfo glyph_info)
Definition: impeller.cc:1525
impeller::interop::ImpellerImageFilterCreateMatrixNew
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateMatrixNew(const ImpellerMatrix *matrix, ImpellerTextureSampling sampling)
Definition: impeller.cc:1076
impeller::interop::ImpellerDisplayListBuilderDrawPaint
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawPaint(ImpellerDisplayListBuilder builder, ImpellerPaint paint)
Definition: impeller.cc:515
impeller::interop::ImpellerSurfaceRetain
IMPELLER_EXTERN_C void ImpellerSurfaceRetain(ImpellerSurface surface)
Definition: impeller.cc:769
impeller::interop::ImpellerParagraphStyleSetEllipsis
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetEllipsis(ImpellerParagraphStyle paragraph_style, const char *ellipsis)
Definition: impeller.cc:1230
impeller::interop::ImpellerParagraphStyleRelease
IMPELLER_EXTERN_C void ImpellerParagraphStyleRelease(ImpellerParagraphStyle paragraph_style)
Definition: impeller.cc:1143
impeller::interop::ImpellerGetVersion
IMPELLER_EXTERN_C uint32_t ImpellerGetVersion()
Definition: impeller.cc:92
impeller::interop::ImpellerColorSourceCreateFragmentProgramNew
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)
Definition: impeller.cc:986
impeller::interop::ImpellerParagraphStyleRetain
IMPELLER_EXTERN_C void ImpellerParagraphStyleRetain(ImpellerParagraphStyle paragraph_style)
Definition: impeller.cc:1138
impeller::interop::ImpellerLineMetricsGetCodeUnitStartIndex
IMPELLER_EXTERN_C size_t ImpellerLineMetricsGetCodeUnitStartIndex(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1490
impeller::interop::ImpellerGlyphInfoGetTextDirection
IMPELLER_EXTERN_C ImpellerTextDirection ImpellerGlyphInfoGetTextDirection(ImpellerGlyphInfo glyph_info)
Definition: impeller.cc:1553
impeller::interop::ImpellerPaintSetColorSource
IMPELLER_EXTERN_C void ImpellerPaintSetColorSource(ImpellerPaint paint, ImpellerColorSource color_source)
Definition: impeller.cc:1115
impeller::interop::ImpellerPathBuilderClose
IMPELLER_EXTERN_C void ImpellerPathBuilderClose(ImpellerPathBuilder builder)
Definition: impeller.cc:415
impeller::interop::ImpellerPathBuilderQuadraticCurveTo
IMPELLER_EXTERN_C void ImpellerPathBuilderQuadraticCurveTo(ImpellerPathBuilder builder, const ImpellerPoint *control_point, const ImpellerPoint *end_point)
Definition: impeller.cc:364
impeller::interop::ImpellerParagraphGetWordBoundary
IMPELLER_EXTERN_C void ImpellerParagraphGetWordBoundary(ImpellerParagraph paragraph, size_t code_unit_index, ImpellerRange *out_range)
Definition: impeller.cc:1365
impeller::interop::ImpellerTextureGetOpenGLHandle
IMPELLER_EXTERN_C uint64_t ImpellerTextureGetOpenGLHandle(ImpellerTexture texture)
Definition: impeller.cc:692
impeller::interop::ImpellerDisplayListBuilderRetain
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRetain(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:234
impeller::interop::ImpellerParagraphBuilderPopStyle
IMPELLER_EXTERN_C void ImpellerParagraphBuilderPopStyle(ImpellerParagraphBuilder paragraph_builder)
Definition: impeller.cc:1289
impeller::interop::CheckVersion
static bool CheckVersion(uint32_t version)
Definition: impeller.cc:96
impeller::interop::ImpellerMaskFilterCreateBlurNew
IMPELLER_EXTERN_C ImpellerMaskFilter ImpellerMaskFilterCreateBlurNew(ImpellerBlurStyle style, float sigma)
Definition: impeller.cc:1039
impeller::interop::ImpellerParagraphStyleSetMaxLines
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetMaxLines(ImpellerParagraphStyle paragraph_style, uint32_t max_lines)
Definition: impeller.cc:1218
impeller::interop::ImpellerLineMetricsGetCodeUnitEndIndex
IMPELLER_EXTERN_C size_t ImpellerLineMetricsGetCodeUnitEndIndex(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1496
impeller::interop::ImpellerColorFilterRetain
IMPELLER_EXTERN_C void ImpellerColorFilterRetain(ImpellerColorFilter color_filter)
Definition: impeller.cc:1004
impeller::interop::ImpellerSurfaceCreateWrappedFBONew
IMPELLER_EXTERN_C ImpellerSurface ImpellerSurfaceCreateWrappedFBONew(ImpellerContext context, uint64_t fbo, ImpellerPixelFormat format, const ImpellerISize *size)
Definition: impeller.cc:733
impeller::interop::ImpellerDisplayListBuilderDrawTextureRect
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawTextureRect(ImpellerDisplayListBuilder builder, ImpellerTexture texture, const ImpellerRect *src_rect, const ImpellerRect *dst_rect, ImpellerTextureSampling sampling, ImpellerPaint paint)
Definition: impeller.cc:803
impeller::interop::ImpellerFragmentProgramNew
IMPELLER_EXTERN_C ImpellerFragmentProgram ImpellerFragmentProgramNew(const ImpellerMapping *data, void *data_release_user_data)
Definition: impeller.cc:1584
impeller::interop::ImpellerImageFilterCreateFragmentProgramNew
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)
Definition: impeller.cc:1085
impeller::interop::ImpellerLineMetricsRelease
IMPELLER_EXTERN_C void ImpellerLineMetricsRelease(ImpellerLineMetrics line_metrics)
Definition: impeller.cc:1443
impeller::interop::ImpellerDisplayListBuilderSave
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSave(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:244
impeller::interop::ImpellerDisplayListBuilderCreateDisplayListNew
IMPELLER_EXTERN_C ImpellerDisplayList ImpellerDisplayListBuilderCreateDisplayListNew(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:715
impeller::interop::ImpellerGlyphInfoIsEllipsis
IMPELLER_EXTERN_C bool ImpellerGlyphInfoIsEllipsis(ImpellerGlyphInfo glyph_info)
Definition: impeller.cc:1548
impeller::interop::ImpellerPathBuilderRelease
IMPELLER_EXTERN_C void ImpellerPathBuilderRelease(ImpellerPathBuilder builder)
Definition: impeller.cc:347
impeller::interop::ToTxtType
constexpr txt::TextDecorationStyle ToTxtType(ImpellerTextDecorationStyle style)
Definition: formats.h:442
impeller::interop::ImpellerParagraphBuilderNew
IMPELLER_EXTERN_C ImpellerParagraphBuilder ImpellerParagraphBuilderNew(ImpellerTypographyContext context)
Definition: impeller.cc:1258
impeller::interop::ImpellerColorFilterCreateColorMatrixNew
IMPELLER_EXTERN_C ImpellerColorFilter ImpellerColorFilterCreateColorMatrixNew(const ImpellerColorMatrix *color_matrix)
Definition: impeller.cc:1023
impeller::interop::ParseColorsAndStops
static std::pair< std::vector< flutter::DlColor >, std::vector< Scalar > > ParseColorsAndStops(uint32_t stop_count, const ImpellerColor *colors, const float *stops)
Definition: impeller.cc:829
impeller::interop::MakeCopyableMapping
static std::shared_ptr< fml::Mapping > MakeCopyableMapping(const ImpellerMapping *data, void *user_data)
Definition: impeller.cc:1562
impeller::interop::ImpellerPaintRelease
IMPELLER_EXTERN_C void ImpellerPaintRelease(ImpellerPaint paint)
Definition: impeller.cc:475
impeller::interop::ImpellerDisplayListBuilderNew
IMPELLER_EXTERN_C ImpellerDisplayListBuilder ImpellerDisplayListBuilderNew(const ImpellerRect *cull_rect)
Definition: impeller.cc:228
impeller::interop::ImpellerLineMetricsGetDescent
IMPELLER_EXTERN_C double ImpellerLineMetricsGetDescent(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1459
impeller::interop::ImpellerParagraphStyleSetFontStyle
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontStyle(ImpellerParagraphStyle paragraph_style, ImpellerFontStyle style)
Definition: impeller.cc:1166
impeller::interop::ImpellerPaintNew
IMPELLER_EXTERN_C ImpellerPaint ImpellerPaintNew()
Definition: impeller.cc:465
impeller::interop::ImpellerTypographyContextRetain
IMPELLER_EXTERN_C void ImpellerTypographyContextRetain(ImpellerTypographyContext context)
Definition: impeller.cc:1382
impeller::interop::ReadSamplersAndUniforms
static SamplersAndUniforms ReadSamplersAndUniforms(ImpellerTexture *samplers, size_t samplers_count, const uint8_t *data, size_t data_bytes_length)
Definition: impeller.cc:962
impeller::interop::ImpellerLineMetricsGetCodeUnitEndIndexIncludingNewline
IMPELLER_EXTERN_C size_t ImpellerLineMetricsGetCodeUnitEndIndexIncludingNewline(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1509
impeller::interop::ImpellerParagraphStyleSetTextDirection
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetTextDirection(ImpellerParagraphStyle paragraph_style, ImpellerTextDirection direction)
Definition: impeller.cc:1204
impeller::interop::Ref
ScopedObject< Object > Ref(Object *object)
Definition: object.h:146
impeller::interop::ImpellerSurfaceCreateWrappedMetalDrawableNew
IMPELLER_EXTERN_C ImpellerSurface ImpellerSurfaceCreateWrappedMetalDrawableNew(ImpellerContext context, void *metal_drawable)
Definition: impeller.cc:754
impeller::interop::ImpellerDisplayListBuilderDrawOval
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawOval(ImpellerDisplayListBuilder builder, const ImpellerRect *oval_bounds, ImpellerPaint paint)
Definition: impeller.cc:555
impeller::interop::ImpellerLineMetricsGetCodeUnitEndIndexExcludingWhitespace
IMPELLER_EXTERN_C size_t ImpellerLineMetricsGetCodeUnitEndIndexExcludingWhitespace(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1502
impeller::interop::ImpellerContextCreateVulkanNew
IMPELLER_EXTERN_C ImpellerContext ImpellerContextCreateVulkanNew(uint32_t version, const ImpellerContextVulkanSettings *settings)
Definition: impeller.cc:151
impeller::interop::ImpellerParagraphBuilderBuildParagraphNew
IMPELLER_EXTERN_C ImpellerParagraph ImpellerParagraphBuilderBuildParagraphNew(ImpellerParagraphBuilder paragraph_builder, float width)
Definition: impeller.cc:1308
impeller::interop::ImpellerDisplayListBuilderSaveLayer
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSaveLayer(ImpellerDisplayListBuilder builder, const ImpellerRect *bounds, ImpellerPaint paint, ImpellerImageFilter backdrop)
Definition: impeller.cc:249
impeller::interop::ImpellerPathBuilderAddRect
IMPELLER_EXTERN_C void ImpellerPathBuilderAddRect(ImpellerPathBuilder builder, const ImpellerRect *rect)
Definition: impeller.cc:383
impeller::interop::ImpellerParagraphCreateGlyphInfoAtCodeUnitIndexNew
IMPELLER_EXTERN_C ImpellerGlyphInfo ImpellerParagraphCreateGlyphInfoAtCodeUnitIndexNew(ImpellerParagraph paragraph, size_t code_unit_index)
Definition: impeller.cc:1415
impeller::interop::ImpellerLineMetricsGetBaseline
IMPELLER_EXTERN_C double ImpellerLineMetricsGetBaseline(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1464
impeller::interop::ImpellerPaintSetStrokeCap
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeCap(ImpellerPaint paint, ImpellerStrokeCap cap)
Definition: impeller.cc:495
impeller::interop::ImpellerParagraphBuilderRelease
IMPELLER_EXTERN_C void ImpellerParagraphBuilderRelease(ImpellerParagraphBuilder paragraph_builder)
Definition: impeller.cc:1276
impeller::interop::ImpellerLineMetricsGetUnscaledAscent
IMPELLER_EXTERN_C double ImpellerLineMetricsGetUnscaledAscent(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1448
impeller::interop::ImpellerPathBuilderLineTo
IMPELLER_EXTERN_C void ImpellerPathBuilderLineTo(ImpellerPathBuilder builder, const ImpellerPoint *location)
Definition: impeller.cc:358
impeller::interop::ImpellerPathRetain
IMPELLER_EXTERN_C void ImpellerPathRetain(ImpellerPath path)
Definition: impeller.cc:322
impeller::interop::ImpellerPaintSetStrokeJoin
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeJoin(ImpellerPaint paint, ImpellerStrokeJoin join)
Definition: impeller.cc:500
impeller::interop::ImpellerParagraphCreateGlyphInfoAtParagraphCoordinatesNew
IMPELLER_EXTERN_C ImpellerGlyphInfo ImpellerParagraphCreateGlyphInfoAtParagraphCoordinatesNew(ImpellerParagraph paragraph, double x, double y)
Definition: impeller.cc:1424
impeller::interop::ImpellerParagraphGetHeight
IMPELLER_EXTERN_C float ImpellerParagraphGetHeight(ImpellerParagraph paragraph)
Definition: impeller.cc:1330
impeller::interop::ImpellerDisplayListBuilderClipOval
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipOval(ImpellerDisplayListBuilder builder, const ImpellerRect *oval_bounds, ImpellerClipOperation op)
Definition: impeller.cc:439
impeller::interop::ImpellerPathBuilderRetain
IMPELLER_EXTERN_C void ImpellerPathBuilderRetain(ImpellerPathBuilder builder)
Definition: impeller.cc:342
impeller::interop::ImpellerParagraphBuilderPushStyle
IMPELLER_EXTERN_C void ImpellerParagraphBuilderPushStyle(ImpellerParagraphBuilder paragraph_builder, ImpellerParagraphStyle style)
Definition: impeller.cc:1282
impeller::interop::ImpellerPathBuilderAddOval
IMPELLER_EXTERN_C void ImpellerPathBuilderAddOval(ImpellerPathBuilder builder, const ImpellerRect *oval_bounds)
Definition: impeller.cc:400
impeller::interop::ImpellerTypographyContextNew
IMPELLER_EXTERN_C ImpellerTypographyContext ImpellerTypographyContextNew()
Definition: impeller.cc:1372
impeller::interop::ImpellerParagraphGetAlphabeticBaseline
IMPELLER_EXTERN_C float ImpellerParagraphGetAlphabeticBaseline(ImpellerParagraph paragraph)
Definition: impeller.cc:1355
impeller::interop::ImpellerPathRelease
IMPELLER_EXTERN_C void ImpellerPathRelease(ImpellerPath path)
Definition: impeller.cc:327
impeller::interop::ImpellerImageFilterCreateBlurNew
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateBlurNew(float x_sigma, float y_sigma, ImpellerTileMode tile_mode)
Definition: impeller.cc:1055
impeller::interop::ImpellerColorSourceRetain
IMPELLER_EXTERN_C void ImpellerColorSourceRetain(ImpellerColorSource color_source)
Definition: impeller.cc:819
impeller::interop::ImpellerParagraphGetMinIntrinsicWidth
IMPELLER_EXTERN_C float ImpellerParagraphGetMinIntrinsicWidth(ImpellerParagraph paragraph)
Definition: impeller.cc:1340
impeller::interop::ImpellerPaintSetStrokeWidth
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeWidth(ImpellerPaint paint, float width)
Definition: impeller.cc:505
impeller::interop::ImpellerMaskFilterRetain
IMPELLER_EXTERN_C void ImpellerMaskFilterRetain(ImpellerMaskFilter mask_filter)
Definition: impeller.cc:1029
impeller::interop::ImpellerDisplayListBuilderDrawDashedLine
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawDashedLine(ImpellerDisplayListBuilder builder, const ImpellerPoint *from, const ImpellerPoint *to, float on_length, float off_length, ImpellerPaint paint)
Definition: impeller.cc:532
impeller::interop::ImpellerPathBuilderTakePathNew
IMPELLER_EXTERN_C ImpellerPath ImpellerPathBuilderTakePathNew(ImpellerPathBuilder builder, ImpellerFillType fill)
Definition: impeller.cc:426
impeller::interop::ImpellerPathBuilderCopyPathNew
IMPELLER_EXTERN_C ImpellerPath ImpellerPathBuilderCopyPathNew(ImpellerPathBuilder builder, ImpellerFillType fill)
Definition: impeller.cc:420
impeller::interop::ImpellerColorSourceRelease
IMPELLER_EXTERN_C void ImpellerColorSourceRelease(ImpellerColorSource color_source)
Definition: impeller.cc:824
impeller::interop::ImpellerDisplayListBuilderClipRoundedRect
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipRoundedRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *radii, ImpellerClipOperation op)
Definition: impeller.cc:446
impeller::interop::ImpellerDisplayListBuilderClipRect
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, ImpellerClipOperation op)
Definition: impeller.cc:432
impeller::interop::ImpellerLineMetricsGetAscent
IMPELLER_EXTERN_C double ImpellerLineMetricsGetAscent(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1454
impeller::interop::ToImpellerType
constexpr Matrix ToImpellerType(const ImpellerMatrix &m)
Definition: formats.h:213
impeller::interop::ImpellerGlyphInfoGetGraphemeClusterBounds
IMPELLER_EXTERN_C void ImpellerGlyphInfoGetGraphemeClusterBounds(ImpellerGlyphInfo glyph_info, ImpellerRect *out_bounds)
Definition: impeller.cc:1542
impeller::interop::ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeEnd
IMPELLER_EXTERN_C size_t ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeEnd(ImpellerGlyphInfo glyph_info)
Definition: impeller.cc:1536
impeller::interop::ImpellerColorSourceCreateRadialGradientNew
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)
Definition: impeller.cc:868
impeller::interop::ImpellerParagraphStyleSetTextAlignment
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetTextAlignment(ImpellerParagraphStyle paragraph_style, ImpellerTextAlignment align)
Definition: impeller.cc:1197
impeller::interop::ImpellerTypographyContextRelease
IMPELLER_EXTERN_C void ImpellerTypographyContextRelease(ImpellerTypographyContext context)
Definition: impeller.cc:1387
impeller::interop::ImpellerTextureCreateWithOpenGLTextureHandleNew
IMPELLER_EXTERN_C ImpellerTexture ImpellerTextureCreateWithOpenGLTextureHandleNew(ImpellerContext context, const ImpellerTextureDescriptor *descriptor, uint64_t external_gl_handle)
Definition: impeller.cc:642
impeller::interop::ImpellerDisplayListBuilderDrawRoundedRect
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRoundedRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *radii, ImpellerPaint paint)
Definition: impeller.cc:562
impeller::interop::ImpellerTextureCreateWithContentsNew
IMPELLER_EXTERN_C ImpellerTexture ImpellerTextureCreateWithContentsNew(ImpellerContext context, const ImpellerTextureDescriptor *descriptor, const ImpellerMapping *contents, void *contents_on_release_user_data)
Definition: impeller.cc:597
impeller::interop::ImpellerPathBuilderMoveTo
IMPELLER_EXTERN_C void ImpellerPathBuilderMoveTo(ImpellerPathBuilder builder, const ImpellerPoint *location)
Definition: impeller.cc:352
impeller::interop::ImpellerDisplayListBuilderTransform
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderTransform(ImpellerDisplayListBuilder builder, const ImpellerMatrix *transform)
Definition: impeller.cc:291
impeller::interop::ImpellerLineMetricsGetWidth
IMPELLER_EXTERN_C double ImpellerLineMetricsGetWidth(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1475
impeller::interop::ImpellerColorFilterRelease
IMPELLER_EXTERN_C void ImpellerColorFilterRelease(ImpellerColorFilter color_filter)
Definition: impeller.cc:1009
impeller::interop::ImpellerTypographyContextRegisterFont
IMPELLER_EXTERN_C bool ImpellerTypographyContextRegisterFont(ImpellerTypographyContext context, const ImpellerMapping *contents, void *contents_on_release_user_data, const char *family_name_alias)
Definition: impeller.cc:1392
impeller::interop::ImpellerLineMetricsGetLeft
IMPELLER_EXTERN_C double ImpellerLineMetricsGetLeft(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1485
impeller::interop::ImpellerParagraphStyleSetFontWeight
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontWeight(ImpellerParagraphStyle paragraph_style, ImpellerFontWeight weight)
Definition: impeller.cc:1160
impeller::interop::ImpellerParagraphGetMaxIntrinsicWidth
IMPELLER_EXTERN_C float ImpellerParagraphGetMaxIntrinsicWidth(ImpellerParagraph paragraph)
Definition: impeller.cc:1345
impeller::interop::ImpellerColorSourceCreateLinearGradientNew
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)
Definition: impeller.cc:846
impeller::interop::ImpellerVulkanSwapchainAcquireNextSurfaceNew
IMPELLER_EXTERN_C ImpellerSurface ImpellerVulkanSwapchainAcquireNextSurfaceNew(ImpellerVulkanSwapchain swapchain)
Definition: impeller.cc:223
impeller::interop::ImpellerPathBuilderNew
IMPELLER_EXTERN_C ImpellerPathBuilder ImpellerPathBuilderNew()
Definition: impeller.cc:337
impeller::interop::ImpellerContextCreateMetalNew
IMPELLER_EXTERN_C ImpellerContext ImpellerContextCreateMetalNew(uint32_t version)
Definition: impeller.cc:133
impeller::interop::ImpellerParagraphStyleSetFontSize
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontSize(ImpellerParagraphStyle paragraph_style, float size)
Definition: impeller.cc:1185
impeller::interop::ImpellerTextureRelease
IMPELLER_EXTERN_C void ImpellerTextureRelease(ImpellerTexture texture)
Definition: impeller.cc:687
impeller::interop::ImpellerContextGetVulkanInfo
IMPELLER_EXTERN_C bool ImpellerContextGetVulkanInfo(ImpellerContext IMPELLER_NONNULL context, ImpellerContextVulkanInfo *out_vulkan_info)
Definition: impeller.cc:181
impeller::interop::ImpellerContextRelease
IMPELLER_EXTERN_C void ImpellerContextRelease(ImpellerContext context)
Definition: impeller.cc:176
impeller::interop::ImpellerImageFilterRelease
IMPELLER_EXTERN_C void ImpellerImageFilterRelease(ImpellerImageFilter image_filter)
Definition: impeller.cc:1050
impeller::interop::ImpellerDisplayListBuilderDrawParagraph
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawParagraph(ImpellerDisplayListBuilder builder, ImpellerParagraph paragraph, const ImpellerPoint *point)
Definition: impeller.cc:1236
impeller::interop::ImpellerContextCreateOpenGLESNew
IMPELLER_EXTERN_C ImpellerContext ImpellerContextCreateOpenGLESNew(uint32_t version, ImpellerProcAddressCallback gl_proc_address_callback, void *gl_proc_address_callback_user_data)
Definition: impeller.cc:108
impeller::interop::ImpellerColorSourceCreateImageNew
IMPELLER_EXTERN_C ImpellerColorSource ImpellerColorSourceCreateImageNew(ImpellerTexture image, ImpellerTileMode horizontal_tile_mode, ImpellerTileMode vertical_tile_mode, ImpellerTextureSampling sampling, const ImpellerMatrix *transformation)
Definition: impeller.cc:940
impeller::interop::ImpellerMaskFilterRelease
IMPELLER_EXTERN_C void ImpellerMaskFilterRelease(ImpellerMaskFilter mask_filter)
Definition: impeller.cc:1034
impeller::interop::ImpellerParagraphStyleSetFontFamily
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontFamily(ImpellerParagraphStyle paragraph_style, const char *family_name)
Definition: impeller.cc:1179
impeller::interop::ImpellerParagraphStyleSetHeight
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetHeight(ImpellerParagraphStyle paragraph_style, float height)
Definition: impeller.cc:1191
impeller::interop::ImpellerPaintRetain
IMPELLER_EXTERN_C void ImpellerPaintRetain(ImpellerPaint paint)
Definition: impeller.cc:470
impeller::interop::ImpellerContextRetain
IMPELLER_EXTERN_C void ImpellerContextRetain(ImpellerContext context)
Definition: impeller.cc:171
impeller::interop::ImpellerParagraphRelease
IMPELLER_EXTERN_C void ImpellerParagraphRelease(ImpellerParagraph paragraph)
Definition: impeller.cc:1320
impeller::interop::ImpellerPaintSetBlendMode
IMPELLER_EXTERN_C void ImpellerPaintSetBlendMode(ImpellerPaint paint, ImpellerBlendMode mode)
Definition: impeller.cc:485
impeller::interop::ImpellerDisplayListBuilderResetTransform
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderResetTransform(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:303
impeller::interop::GetVersionAsString
static std::string GetVersionAsString(uint32_t version)
Definition: impeller.cc:82
impeller::interop::ImpellerDisplayListBuilderScale
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderScale(ImpellerDisplayListBuilder builder, float x_scale, float y_scale)
Definition: impeller.cc:265
impeller::interop::ImpellerParagraphStyleSetLocale
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetLocale(ImpellerParagraphStyle paragraph_style, const char *locale)
Definition: impeller.cc:1224
impeller::interop::ImpellerSurfaceDrawDisplayList
IMPELLER_EXTERN_C bool ImpellerSurfaceDrawDisplayList(ImpellerSurface surface, ImpellerDisplayList display_list)
Definition: impeller.cc:779
impeller::interop::ImpellerParagraphStyleSetTextDecoration
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetTextDecoration(ImpellerParagraphStyle paragraph_style, const ImpellerTextDecoration *decoration)
Definition: impeller.cc:1211
impeller::interop::ImpellerSurfacePresent
IMPELLER_EXTERN_C bool ImpellerSurfacePresent(ImpellerSurface surface)
Definition: impeller.cc:785
impeller::interop::ImpellerDisplayListBuilderDrawLine
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawLine(ImpellerDisplayListBuilder builder, const ImpellerPoint *from, const ImpellerPoint *to, ImpellerPaint paint)
Definition: impeller.cc:521
impeller::interop::ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeBegin
IMPELLER_EXTERN_C size_t ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeBegin(ImpellerGlyphInfo glyph_info)
Definition: impeller.cc:1530
impeller::interop::ImpellerDisplayListBuilderDrawDisplayList
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawDisplayList(ImpellerDisplayListBuilder builder, ImpellerDisplayList display_list, float opacity)
Definition: impeller.cc:725
impeller::interop::ImpellerDisplayListBuilderRestore
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRestore(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:260
impeller::interop::ImpellerFragmentProgramRetain
IMPELLER_EXTERN_C void ImpellerFragmentProgramRetain(ImpellerFragmentProgram fragment_program)
Definition: impeller.cc:1597
impeller::interop::ImpellerDisplayListBuilderDrawShadow
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawShadow(ImpellerDisplayListBuilder builder, ImpellerPath path, const ImpellerColor *color, float elevation, bool occluder_is_transparent, float device_pixel_ratio)
Definition: impeller.cc:1243
impeller::interop::ImpellerVulkanSwapchainRelease
IMPELLER_EXTERN_C void ImpellerVulkanSwapchainRelease(ImpellerVulkanSwapchain swapchain)
Definition: impeller.cc:218
impeller::interop::ImpellerDisplayListBuilderTranslate
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderTranslate(ImpellerDisplayListBuilder builder, float x_translation, float y_translation)
Definition: impeller.cc:278
impeller::interop::ImpellerParagraphStyleSetForeground
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetForeground(ImpellerParagraphStyle paragraph_style, ImpellerPaint paint)
Definition: impeller.cc:1148
impeller::interop::ImpellerDisplayListBuilderGetSaveCount
IMPELLER_EXTERN_C uint32_t ImpellerDisplayListBuilderGetSaveCount(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:309
impeller::interop::ImpellerImageFilterCreateDilateNew
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateDilateNew(float x_radius, float y_radius)
Definition: impeller.cc:1064
impeller::interop::ImpellerPaintSetStrokeMiter
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeMiter(ImpellerPaint paint, float miter)
Definition: impeller.cc:510
impeller::interop::ImpellerParagraphStyleNew
IMPELLER_EXTERN_C ImpellerParagraphStyle ImpellerParagraphStyleNew()
Definition: impeller.cc:1133
impeller::interop::ImpellerTextureRetain
IMPELLER_EXTERN_C void ImpellerTextureRetain(ImpellerTexture texture)
Definition: impeller.cc:682
impeller::interop::ImpellerParagraphGetLineMetrics
IMPELLER_EXTERN_C ImpellerLineMetrics ImpellerParagraphGetLineMetrics(ImpellerParagraph paragraph)
Definition: impeller.cc:1409
impeller::interop::ImpellerPathBuilderCubicCurveTo
IMPELLER_EXTERN_C void ImpellerPathBuilderCubicCurveTo(ImpellerPathBuilder builder, const ImpellerPoint *control_point_1, const ImpellerPoint *control_point_2, const ImpellerPoint *end_point)
Definition: impeller.cc:372
impeller::interop::ImpellerImageFilterRetain
IMPELLER_EXTERN_C void ImpellerImageFilterRetain(ImpellerImageFilter image_filter)
Definition: impeller.cc:1045
impeller::interop::ImpellerDisplayListBuilderDrawRoundedRectDifference
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)
Definition: impeller.cc:574
impeller::interop::ImpellerParagraphRetain
IMPELLER_EXTERN_C void ImpellerParagraphRetain(ImpellerParagraph paragraph)
Definition: impeller.cc:1315
impeller::interop::ImpellerDisplayListBuilderRelease
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRelease(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:239
impeller::interop::ImpellerColorFilterCreateBlendNew
IMPELLER_EXTERN_C ImpellerColorFilter ImpellerColorFilterCreateBlendNew(const ImpellerColor *color, ImpellerBlendMode blend_mode)
Definition: impeller.cc:1014
impeller::interop::ImpellerDisplayListBuilderRestoreToCount
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRestoreToCount(ImpellerDisplayListBuilder builder, uint32_t count)
Definition: impeller.cc:315
impeller::interop::ImpellerParagraphGetLongestLineWidth
IMPELLER_EXTERN_C float ImpellerParagraphGetLongestLineWidth(ImpellerParagraph paragraph)
Definition: impeller.cc:1335
impeller::interop::ImpellerGlyphInfoRetain
IMPELLER_EXTERN_C void ImpellerGlyphInfoRetain(ImpellerGlyphInfo glyph_info)
Definition: impeller.cc:1520
impeller::interop::ImpellerPaintSetMaskFilter
IMPELLER_EXTERN_C void ImpellerPaintSetMaskFilter(ImpellerPaint paint, ImpellerMaskFilter mask_filter)
Definition: impeller.cc:1127
impeller::interop::ImpellerDisplayListBuilderSetTransform
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSetTransform(ImpellerDisplayListBuilder builder, const ImpellerMatrix *transform)
Definition: impeller.cc:285
impeller::interop::ImpellerParagraphGetLineCount
IMPELLER_EXTERN_C uint32_t ImpellerParagraphGetLineCount(ImpellerParagraph paragraph)
Definition: impeller.cc:1360
impeller::interop::ImpellerLineMetricsRetain
IMPELLER_EXTERN_C void ImpellerLineMetricsRetain(ImpellerLineMetrics line_metrics)
Definition: impeller.cc:1438
impeller::interop::ImpellerImageFilterCreateErodeNew
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateErodeNew(float x_radius, float y_radius)
Definition: impeller.cc:1070
impeller::interop::ImpellerLineMetricsGetHeight
IMPELLER_EXTERN_C double ImpellerLineMetricsGetHeight(ImpellerLineMetrics metrics, size_t line)
Definition: impeller.cc:1480
impeller::interop::ImpellerDisplayListBuilderGetTransform
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderGetTransform(ImpellerDisplayListBuilder builder, ImpellerMatrix *out_transform)
Definition: impeller.cc:297
impeller::interop::ImpellerSurfaceRelease
IMPELLER_EXTERN_C void ImpellerSurfaceRelease(ImpellerSurface surface)
Definition: impeller.cc:774
impeller::interop::FromImpellerType
constexpr void FromImpellerType(const Matrix &from, ImpellerMatrix &to)
Definition: formats.h:221
impeller::interop::ReadString
static std::string ReadString(const char *string)
Definition: impeller.cc:1171
impeller::interop::ImpellerPaintSetColorFilter
IMPELLER_EXTERN_C void ImpellerPaintSetColorFilter(ImpellerPaint paint, ImpellerColorFilter color_filter)
Definition: impeller.cc:1109
impeller::interop::ImpellerDisplayListBuilderRotate
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRotate(ImpellerDisplayListBuilder builder, float angle_degrees)
Definition: impeller.cc:272
impeller::interop::ImpellerParagraphGetMaxWidth
IMPELLER_EXTERN_C float ImpellerParagraphGetMaxWidth(ImpellerParagraph paragraph)
Definition: impeller.cc:1325
impeller::interop::DEFINE_PEER_GETTER
DEFINE_PEER_GETTER(ColorFilter, ImpellerColorFilter)
impeller::interop::ImpellerPathBuilderAddRoundedRect
IMPELLER_EXTERN_C void ImpellerPathBuilderAddRoundedRect(ImpellerPathBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *rounding_radii)
Definition: impeller.cc:406
impeller::interop::ImpellerVulkanSwapchainRetain
IMPELLER_EXTERN_C void ImpellerVulkanSwapchainRetain(ImpellerVulkanSwapchain swapchain)
Definition: impeller.cc:213
impeller::interop::ImpellerVulkanSwapchainCreateNew
IMPELLER_EXTERN_C ImpellerVulkanSwapchain ImpellerVulkanSwapchainCreateNew(ImpellerContext context, void *vulkan_surface_khr)
Definition: impeller.cc:197
impeller::interop::ImpellerParagraphGetIdeographicBaseline
IMPELLER_EXTERN_C float ImpellerParagraphGetIdeographicBaseline(ImpellerParagraph paragraph)
Definition: impeller.cc:1350
impeller::interop::ToDisplayListType
constexpr flutter::DlColor ToDisplayListType(Color color)
Definition: formats.h:89
impeller::interop::ImpellerPaintSetDrawStyle
IMPELLER_EXTERN_C void ImpellerPaintSetDrawStyle(ImpellerPaint paint, ImpellerDrawStyle style)
Definition: impeller.cc:490
impeller::interop::ImpellerDisplayListBuilderDrawTexture
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawTexture(ImpellerDisplayListBuilder builder, ImpellerTexture texture, const ImpellerPoint *point, ImpellerTextureSampling sampling, ImpellerPaint paint)
Definition: impeller.cc:790
impeller::interop::ImpellerPaintSetImageFilter
IMPELLER_EXTERN_C void ImpellerPaintSetImageFilter(ImpellerPaint paint, ImpellerImageFilter image_filter)
Definition: impeller.cc:1121
impeller::interop::ImpellerPathGetBounds
IMPELLER_EXTERN_C void ImpellerPathGetBounds(ImpellerPath path, ImpellerRect *out_bounds)
Definition: impeller.cc:332
impeller::interop::ImpellerDisplayListRelease
IMPELLER_EXTERN_C void ImpellerDisplayListRelease(ImpellerDisplayList display_list)
Definition: impeller.cc:710
impeller::interop::ImpellerDisplayListBuilderClipPath
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipPath(ImpellerDisplayListBuilder builder, ImpellerPath path, ImpellerClipOperation op)
Definition: impeller.cc:458
impeller::interop::ImpellerColorSourceCreateConicalGradientNew
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)
Definition: impeller.cc:890
impeller::interop::ImpellerDisplayListBuilderDrawPath
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawPath(ImpellerDisplayListBuilder builder, ImpellerPath path, ImpellerPaint paint)
Definition: impeller.cc:590
impeller::interop::ImpellerPathBuilderAddArc
IMPELLER_EXTERN_C void ImpellerPathBuilderAddArc(ImpellerPathBuilder builder, const ImpellerRect *oval_bounds, float start_angle_degrees, float end_angle_degrees)
Definition: impeller.cc:389
impeller::interop::ImpellerDisplayListRetain
IMPELLER_EXTERN_C void ImpellerDisplayListRetain(ImpellerDisplayList display_list)
Definition: impeller.cc:705
impeller::interop::ImpellerParagraphStyleSetBackground
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetBackground(ImpellerParagraphStyle paragraph_style, ImpellerPaint paint)
Definition: impeller.cc:1154
impeller::interop::ImpellerDisplayListBuilderDrawRect
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, ImpellerPaint paint)
Definition: impeller.cc:548
impeller::interop::ImpellerPaintSetColor
IMPELLER_EXTERN_C void ImpellerPaintSetColor(ImpellerPaint paint, const ImpellerColor *color)
Definition: impeller.cc:480
impeller::interop::ImpellerParagraphBuilderAddText
IMPELLER_EXTERN_C void ImpellerParagraphBuilderAddText(ImpellerParagraphBuilder paragraph_builder, const uint8_t *data, uint32_t length)
Definition: impeller.cc:1295
impeller::interop::ImpellerFragmentProgramRelease
IMPELLER_EXTERN_C void ImpellerFragmentProgramRelease(ImpellerFragmentProgram fragment_program)
Definition: impeller.cc:1602
impeller::StorageMode::kDevicePrivate
@ kDevicePrivate
impeller::StorageMode::kHostVisible
@ kHostVisible
impeller::TextureType::kTexture2D
@ kTexture2D
impeller::TextureCoordinateSystem::kUploadFromHost
@ kUploadFromHost
impeller::CompressionType::kLossless
@ kLossless
impeller::HandleType::kTexture
@ kTexture
impeller::TextureUsage::kShaderRead
@ kShaderRead
object.h
paragraph.h
paragraph_builder.h
paragraph_style.h
path.h
path_builder.h
context_gles.h
context.h
scalar.h
ImpellerColor
Definition: impeller.h:612
ImpellerColorMatrix
Definition: impeller.h:601
ImpellerColorMatrix::m
float m[20]
Definition: impeller.h:602
ImpellerContextVulkanInfo
Definition: impeller.h:638
ImpellerContextVulkanSettings
Definition: impeller.h:632
ImpellerISize
Definition: impeller.h:519
ImpellerMapping
Definition: impeller.h:626
ImpellerMapping::on_release
ImpellerCallback IMPELLER_NULLABLE on_release
Definition: impeller.h:629
ImpellerMapping::length
uint64_t length
Definition: impeller.h:628
ImpellerMapping::data
const uint8_t *IMPELLER_NONNULL data
Definition: impeller.h:627
ImpellerMatrix
Definition: impeller.h:539
ImpellerPoint
Definition: impeller.h:509
ImpellerRange
Definition: impeller.h:524
ImpellerRect
Definition: impeller.h:502
ImpellerRoundingRadii
Definition: impeller.h:605
ImpellerTextDecoration
Definition: impeller.h:646
ImpellerTextureDescriptor
Definition: impeller.h:620
ImpellerTextureDescriptor::mip_count
uint32_t mip_count
Definition: impeller.h:623
ImpellerTextureDescriptor::pixel_format
ImpellerPixelFormat pixel_format
Definition: impeller.h:621
ImpellerTextureDescriptor::size
ImpellerISize size
Definition: impeller.h:622
impeller::Degrees
Definition: scalar.h:76
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
impeller::TPoint< Scalar >
impeller::TSize< Scalar >
impeller::TextureDescriptor
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...
Definition: texture_descriptor.h:38
impeller::TextureDescriptor::usage
TextureUsageMask usage
Definition: texture_descriptor.h:44
impeller::TextureDescriptor::compression_type
CompressionType compression_type
Definition: texture_descriptor.h:46
impeller::TextureDescriptor::type
TextureType type
Definition: texture_descriptor.h:40
impeller::TextureDescriptor::size
ISize size
Definition: texture_descriptor.h:42
impeller::TextureDescriptor::storage_mode
StorageMode storage_mode
Definition: texture_descriptor.h:39
impeller::TextureDescriptor::mip_count
size_t mip_count
Definition: texture_descriptor.h:43
impeller::TextureDescriptor::format
PixelFormat format
Definition: texture_descriptor.h:41
impeller::interop::ContextVK::Settings
Definition: context_vk.h:16
impeller::interop::SamplersAndUniforms
Definition: impeller.cc:957
impeller::interop::SamplersAndUniforms::uniforms
std::shared_ptr< std::vector< uint8_t > > uniforms
Definition: impeller.cc:959
impeller::interop::SamplersAndUniforms::samplers
std::vector< std::shared_ptr< flutter::DlColorSource > > samplers
Definition: impeller.cc:958
start
const size_t start
Definition: tessellator_libtess.cc:62
end
const size_t end
Definition: tessellator_libtess.cc:63
data
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:68
texture_gles.h
context_gles.h
surface_gles.h
context_mtl.h
surface_mtl.h
context_vk.h
surface_vk.h
swapchain_vk.h
color_filter.h
context.h
formats.h
image_filter.h
paint.h
surface.h
texture.h
typography_context.h
validation.h
VALIDATION_LOG
#define VALIDATION_LOG
Definition: validation.h:91