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 
6 
7 #include <sstream>
8 
9 #include "flutter/fml/mapping.h"
11 #include "impeller/core/texture.h"
33 
34 namespace impeller::interop {
35 
36 #define DEFINE_PEER_GETTER(cxx_type, c_type) \
37  cxx_type* GetPeer(c_type object) { \
38  return reinterpret_cast<cxx_type*>(object); \
39  }
40 
41 DEFINE_PEER_GETTER(ColorFilter, ImpellerColorFilter);
42 DEFINE_PEER_GETTER(ColorSource, ImpellerColorSource);
43 DEFINE_PEER_GETTER(Context, ImpellerContext);
44 DEFINE_PEER_GETTER(DisplayList, ImpellerDisplayList);
45 DEFINE_PEER_GETTER(DisplayListBuilder, ImpellerDisplayListBuilder);
46 DEFINE_PEER_GETTER(ImageFilter, ImpellerImageFilter);
47 DEFINE_PEER_GETTER(MaskFilter, ImpellerMaskFilter);
48 DEFINE_PEER_GETTER(Paint, ImpellerPaint);
49 DEFINE_PEER_GETTER(Paragraph, ImpellerParagraph);
50 DEFINE_PEER_GETTER(ParagraphBuilder, ImpellerParagraphBuilder);
51 DEFINE_PEER_GETTER(ParagraphStyle, ImpellerParagraphStyle);
52 DEFINE_PEER_GETTER(Path, ImpellerPath);
53 DEFINE_PEER_GETTER(PathBuilder, ImpellerPathBuilder);
54 DEFINE_PEER_GETTER(Surface, ImpellerSurface);
55 DEFINE_PEER_GETTER(Texture, ImpellerTexture);
56 DEFINE_PEER_GETTER(TypographyContext, ImpellerTypographyContext);
57 
58 static std::string GetVersionAsString(uint32_t version) {
59  std::stringstream stream;
60  stream << IMPELLER_VERSION_GET_VARIANT(version) << "."
61  << IMPELLER_VERSION_GET_MAJOR(version) << "."
62  << IMPELLER_VERSION_GET_MINOR(version) << "."
63  << IMPELLER_VERSION_GET_PATCH(version);
64  return stream.str();
65 }
66 
68 uint32_t ImpellerGetVersion() {
69  return IMPELLER_VERSION;
70 }
71 
74  uint32_t version,
75  ImpellerProcAddressCallback gl_proc_address_callback,
76  void* gl_proc_address_callback_user_data) {
77  if (version != IMPELLER_VERSION) {
78  VALIDATION_LOG << "This version of Impeller ("
80  << "doesn't match the version the user expects ("
81  << GetVersionAsString(version) << ").";
82  return nullptr;
83  }
84  auto context = Context::CreateOpenGLES(
85  [gl_proc_address_callback,
86  gl_proc_address_callback_user_data](const char* proc_name) -> void* {
87  return gl_proc_address_callback(proc_name,
88  gl_proc_address_callback_user_data);
89  });
90  if (!context || !context->IsValid()) {
91  VALIDATION_LOG << "Could not create valid context.";
92  return nullptr;
93  }
94  return context.Leak();
95 }
96 
98 void ImpellerContextRetain(ImpellerContext context) {
99  ObjectBase::SafeRetain(context);
100 }
101 
103 void ImpellerContextRelease(ImpellerContext context) {
104  ObjectBase::SafeRelease(context);
105 }
106 
108 ImpellerDisplayListBuilder ImpellerDisplayListBuilderNew(
109  const ImpellerRect* cull_rect) {
110  return Create<DisplayListBuilder>(cull_rect).Leak();
111 }
112 
114 void ImpellerDisplayListBuilderRetain(ImpellerDisplayListBuilder builder) {
115  ObjectBase::SafeRetain(builder);
116 }
117 
119 void ImpellerDisplayListBuilderRelease(ImpellerDisplayListBuilder builder) {
120  ObjectBase::SafeRelease(builder);
121 }
122 
124 void ImpellerDisplayListBuilderSave(ImpellerDisplayListBuilder builder) {
125  GetPeer(builder)->Save();
126 }
127 
129 void ImpellerDisplayListBuilderSaveLayer(ImpellerDisplayListBuilder builder,
130  const ImpellerRect* bounds,
131  ImpellerPaint paint,
132  ImpellerImageFilter backdrop) {
133  GetPeer(builder)->SaveLayer(ToImpellerType(*bounds), //
134  GetPeer(paint), //
135  GetPeer(backdrop) //
136  );
137 }
138 
140 void ImpellerDisplayListBuilderRestore(ImpellerDisplayListBuilder builder) {
141  GetPeer(builder)->Restore();
142 }
143 
145 void ImpellerDisplayListBuilderScale(ImpellerDisplayListBuilder builder,
146  float x_scale,
147  float y_scale) {
148  GetPeer(builder)->Scale(Size{x_scale, y_scale});
149 }
150 
152 void ImpellerDisplayListBuilderRotate(ImpellerDisplayListBuilder builder,
153  float angle_degrees) {
154  GetPeer(builder)->Rotate(Degrees{angle_degrees});
155 }
156 
158 void ImpellerDisplayListBuilderTranslate(ImpellerDisplayListBuilder builder,
159  float x_translation,
160  float y_translation) {
161  GetPeer(builder)->Translate(Point{x_translation, y_translation});
162 }
163 
165 void ImpellerDisplayListBuilderSetTransform(ImpellerDisplayListBuilder builder,
166  const ImpellerMatrix* transform) {
167  GetPeer(builder)->SetTransform(ToImpellerType(*transform));
168 }
169 
171 void ImpellerDisplayListBuilderGetTransform(ImpellerDisplayListBuilder builder,
172  ImpellerMatrix* out_transform) {
173  FromImpellerType(GetPeer(builder)->GetTransform(), *out_transform);
174 }
175 
178  ImpellerDisplayListBuilder builder) {
179  GetPeer(builder)->ResetTransform();
180 }
181 
184  ImpellerDisplayListBuilder builder) {
185  return GetPeer(builder)->GetSaveCount();
186 }
187 
190  ImpellerDisplayListBuilder builder,
191  uint32_t count) {
192  GetPeer(builder)->RestoreToCount(count);
193 }
194 
196 void ImpellerPathRetain(ImpellerPath path) {
198 }
199 
201 void ImpellerPathRelease(ImpellerPath path) {
203 }
204 
206 ImpellerPathBuilder ImpellerPathBuilderNew() {
207  return Create<PathBuilder>().Leak();
208 }
209 
211 void ImpellerPathBuilderRetain(ImpellerPathBuilder builder) {
212  ObjectBase::SafeRetain(builder);
213 }
214 
216 void ImpellerPathBuilderRelease(ImpellerPathBuilder builder) {
217  ObjectBase::SafeRelease(builder);
218 }
219 
221 void ImpellerPathBuilderMoveTo(ImpellerPathBuilder builder,
222  const ImpellerPoint* location) {
223  GetPeer(builder)->MoveTo(ToImpellerType(*location));
224 }
225 
227 void ImpellerPathBuilderLineTo(ImpellerPathBuilder builder,
228  const ImpellerPoint* location) {
229  GetPeer(builder)->LineTo(ToImpellerType(*location));
230 }
231 
233 void ImpellerPathBuilderQuadraticCurveTo(ImpellerPathBuilder builder,
234  const ImpellerPoint* control_point,
235  const ImpellerPoint* end_point) {
236  GetPeer(builder)->QuadraticCurveTo(ToImpellerType(*control_point),
237  ToImpellerType(*end_point));
238 }
239 
241 void ImpellerPathBuilderCubicCurveTo(ImpellerPathBuilder builder,
242  const ImpellerPoint* control_point_1,
243  const ImpellerPoint* control_point_2,
244  const ImpellerPoint* end_point) {
245  GetPeer(builder)->CubicCurveTo(ToImpellerType(*control_point_1), //
246  ToImpellerType(*control_point_2), //
247  ToImpellerType(*end_point) //
248  );
249 }
250 
251 IMPELLER_EXTERN_C void ImpellerPathBuilderAddRect(ImpellerPathBuilder builder,
252  const ImpellerRect* rect) {
253  GetPeer(builder)->AddRect(ToImpellerType(*rect));
254 }
255 
257 void ImpellerPathBuilderAddArc(ImpellerPathBuilder builder,
258  const ImpellerRect* oval_bounds,
259  float start_angle_degrees,
260  float end_angle_degrees) {
261  GetPeer(builder)->AddArc(ToImpellerType(*oval_bounds), //
262  Degrees{start_angle_degrees}, //
263  Degrees{end_angle_degrees} //
264  );
265 }
266 
268 void ImpellerPathBuilderAddOval(ImpellerPathBuilder builder,
269  const ImpellerRect* oval_bounds) {
270  GetPeer(builder)->AddOval(ToImpellerType(*oval_bounds));
271 }
272 
275  ImpellerPathBuilder builder,
276  const ImpellerRect* rect,
277  const ImpellerRoundingRadii* rounding_radii) {
278  GetPeer(builder)->AddRoundedRect(ToImpellerType(*rect),
279  ToImpellerType(*rounding_radii));
280 }
281 
283 void ImpellerPathBuilderClose(ImpellerPathBuilder builder) {
284  GetPeer(builder)->Close();
285 }
286 
288 ImpellerPath ImpellerPathBuilderCopyPathNew(ImpellerPathBuilder builder,
289  ImpellerFillType fill) {
290  return GetPeer(builder)->CopyPath(ToImpellerType(fill)).Leak();
291 }
292 
294  ImpellerPathBuilder builder,
295  ImpellerFillType fill) {
296  return GetPeer(builder)->TakePath(ToImpellerType(fill)).Leak();
297 }
298 
300 void ImpellerDisplayListBuilderClipRect(ImpellerDisplayListBuilder builder,
301  const ImpellerRect* rect,
303  GetPeer(builder)->ClipRect(ToImpellerType(*rect), ToImpellerType(op));
304 }
305 
307 void ImpellerDisplayListBuilderClipOval(ImpellerDisplayListBuilder builder,
308  const ImpellerRect* oval_bounds,
310  GetPeer(builder)->ClipOval(ToImpellerType(*oval_bounds), ToImpellerType(op));
311 }
312 
315  ImpellerDisplayListBuilder builder,
316  const ImpellerRect* rect,
317  const ImpellerRoundingRadii* radii,
319  GetPeer(builder)->ClipRoundedRect(ToImpellerType(*rect), //
320  ToImpellerType(*radii), //
321  ToImpellerType(op) //
322  );
323 }
324 
326 void ImpellerDisplayListBuilderClipPath(ImpellerDisplayListBuilder builder,
327  ImpellerPath path,
329  GetPeer(builder)->ClipPath(*GetPeer(path), ToImpellerType(op));
330 }
331 
333 ImpellerPaint ImpellerPaintNew() {
334  return Create<Paint>().Leak();
335 }
336 
338 void ImpellerPaintRetain(ImpellerPaint paint) {
339  ObjectBase::SafeRetain(paint);
340 }
341 
343 void ImpellerPaintRelease(ImpellerPaint paint) {
345 }
346 
348 void ImpellerPaintSetColor(ImpellerPaint paint, const ImpellerColor* color) {
349  GetPeer(paint)->SetColor(ToDisplayListType(*color));
350 }
351 
353 void ImpellerPaintSetBlendMode(ImpellerPaint paint, ImpellerBlendMode mode) {
354  GetPeer(paint)->SetBlendMode(ToImpellerType(mode));
355 }
356 
358 void ImpellerPaintSetDrawStyle(ImpellerPaint paint, ImpellerDrawStyle style) {
359  GetPeer(paint)->SetDrawStyle(ToDisplayListType(style));
360 }
361 
363 void ImpellerPaintSetStrokeCap(ImpellerPaint paint, ImpellerStrokeCap cap) {
364  GetPeer(paint)->SetStrokeCap(ToDisplayListType(cap));
365 }
366 
368 void ImpellerPaintSetStrokeJoin(ImpellerPaint paint, ImpellerStrokeJoin join) {
369  GetPeer(paint)->SetStrokeJoin(ToDisplayListType(join));
370 }
371 
373 void ImpellerPaintSetStrokeWidth(ImpellerPaint paint, float width) {
374  GetPeer(paint)->SetStrokeWidth(width);
375 }
376 
378 void ImpellerPaintSetStrokeMiter(ImpellerPaint paint, float miter) {
379  GetPeer(paint)->SetStrokeMiter(miter);
380 }
381 
383 void ImpellerDisplayListBuilderDrawPaint(ImpellerDisplayListBuilder builder,
384  ImpellerPaint paint) {
385  GetPeer(builder)->DrawPaint(*GetPeer(paint));
386 }
387 
389 void ImpellerDisplayListBuilderDrawLine(ImpellerDisplayListBuilder builder,
390  const ImpellerPoint* from,
391  const ImpellerPoint* to,
392  ImpellerPaint paint) {
393  GetPeer(builder)->DrawLine(ToImpellerType(*from), //
394  ToImpellerType(*to), //
395  *GetPeer(paint) //
396  );
397 }
398 
401  ImpellerDisplayListBuilder builder,
402  const ImpellerPoint* from,
403  const ImpellerPoint* to,
404  float on_length,
405  float off_length,
406  ImpellerPaint paint) {
407  GetPeer(builder)->DrawDashedLine(ToImpellerType(*from), //
408  ToImpellerType(*to), //
409  on_length, //
410  off_length, //
411  *GetPeer(paint) //
412  );
413 }
414 
416 void ImpellerDisplayListBuilderDrawRect(ImpellerDisplayListBuilder builder,
417  const ImpellerRect* rect,
418  ImpellerPaint paint) {
419  GetPeer(builder)->DrawRect(ToImpellerType(*rect), *GetPeer(paint));
420 }
421 
423 void ImpellerDisplayListBuilderDrawOval(ImpellerDisplayListBuilder builder,
424  const ImpellerRect* oval_bounds,
425  ImpellerPaint paint) {
426  GetPeer(builder)->DrawOval(ToImpellerType(*oval_bounds), *GetPeer(paint));
427 }
428 
431  ImpellerDisplayListBuilder builder,
432  const ImpellerRect* rect,
433  const ImpellerRoundingRadii* radii,
434  ImpellerPaint paint) {
435  GetPeer(builder)->DrawRoundedRect(ToImpellerType(*rect), //
436  ToImpellerType(*radii), //
437  *GetPeer(paint) //
438  );
439 }
440 
443  ImpellerDisplayListBuilder builder,
444  const ImpellerRect* outer_rect,
445  const ImpellerRoundingRadii* outer_radii,
446  const ImpellerRect* inner_rect,
447  const ImpellerRoundingRadii* inner_radii,
448  ImpellerPaint paint) {
449  GetPeer(builder)->DrawRoundedRectDifference(ToImpellerType(*outer_rect), //
450  ToImpellerType(*outer_radii), //
451  ToImpellerType(*inner_rect), //
452  ToImpellerType(*inner_radii), //
453  *GetPeer(paint) //
454  );
455 }
456 
458 void ImpellerDisplayListBuilderDrawPath(ImpellerDisplayListBuilder builder,
459  ImpellerPath path,
460  ImpellerPaint paint) {
461  GetPeer(builder)->DrawPath(*GetPeer(path), *GetPeer(paint));
462 }
463 
466  ImpellerContext context,
467  const ImpellerTextureDescriptor* descriptor,
468  const ImpellerMapping* contents,
469  void* contents_on_release_user_data) {
470  TextureDescriptor desc;
473  desc.format = ToImpellerType(descriptor->pixel_format);
474  desc.size = ToImpellerType(descriptor->size);
475  desc.mip_count = std::min(descriptor->mip_count, 1u);
478  auto texture = Create<Texture>(*GetPeer(context), desc);
479  if (!texture->IsValid()) {
480  VALIDATION_LOG << "Could not create texture.";
481  return nullptr;
482  }
483  // Depending on whether the de-allocation can be delayed, it may be possible
484  // to avoid a data copy.
485  if (contents->on_release) {
486  // Avoids data copy.
487  auto wrapped_contents = std::make_shared<fml::NonOwnedMapping>(
488  contents->data, // data ptr
489  contents->length, // data length
490  [contents, contents_on_release_user_data](auto, auto) {
491  contents->on_release(contents_on_release_user_data);
492  } // release callback
493  );
494  if (!texture->SetContents(std::move(wrapped_contents))) {
495  VALIDATION_LOG << "Could not set texture contents.";
496  return nullptr;
497  }
498  } else {
499  // May copy.
500  if (!texture->SetContents(contents->data, contents->length)) {
501  VALIDATION_LOG << "Could not set texture contents.";
502  return nullptr;
503  }
504  }
505  return texture.Leak();
506 }
507 
510  ImpellerContext context,
511  const ImpellerTextureDescriptor* descriptor,
512  uint64_t external_gl_handle) {
513  auto impeller_context = GetPeer(context)->GetContext();
514  if (impeller_context->GetBackendType() !=
516  VALIDATION_LOG << "Context is not OpenGL.";
517  return nullptr;
518  }
519 
520  const auto& impeller_context_gl = ContextGLES::Cast(*impeller_context);
521  const auto& reactor = impeller_context_gl.GetReactor();
522 
523  auto wrapped_external_gl_handle =
524  reactor->CreateHandle(HandleType::kTexture, external_gl_handle);
525  if (wrapped_external_gl_handle.IsDead()) {
526  VALIDATION_LOG << "Could not wrap external handle.";
527  return nullptr;
528  }
529 
530  TextureDescriptor desc;
533  desc.format = ToImpellerType(descriptor->pixel_format);
534  desc.size = ToImpellerType(descriptor->size);
535  desc.mip_count = std::min(descriptor->mip_count, 1u);
538  auto texture = std::make_shared<TextureGLES>(reactor, //
539  desc, //
540  wrapped_external_gl_handle //
541  );
542  if (!texture || !texture->IsValid()) {
543  VALIDATION_LOG << "Could not wrap external texture.";
544  return nullptr;
545  }
546  texture->SetCoordinateSystem(TextureCoordinateSystem::kUploadFromHost);
547  return Create<Texture>(impeller::Context::BackendType::kOpenGLES,
548  std::move(texture))
549  .Leak();
550 }
551 
553 void ImpellerTextureRetain(ImpellerTexture texture) {
554  ObjectBase::SafeRetain(texture);
555 }
556 
558 void ImpellerTextureRelease(ImpellerTexture texture) {
559  ObjectBase::SafeRelease(texture);
560 }
561 
563 uint64_t ImpellerTextureGetOpenGLHandle(ImpellerTexture texture) {
564  auto interop_texture = GetPeer(texture);
565  if (interop_texture->GetBackendType() !=
567  VALIDATION_LOG << "Can only fetch the texture handle of an OpenGL texture.";
568  return 0u;
569  }
570  return TextureGLES::Cast(*interop_texture->GetTexture())
571  .GetGLHandle()
572  .value_or(0u);
573 }
574 
576 void ImpellerDisplayListRetain(ImpellerDisplayList display_list) {
577  ObjectBase::SafeRetain(display_list);
578 }
579 
581 void ImpellerDisplayListRelease(ImpellerDisplayList display_list) {
582  ObjectBase::SafeRelease(display_list);
583 }
584 
587  ImpellerDisplayListBuilder builder) {
588  auto dl = GetPeer(builder)->Build();
589  if (!dl->IsValid()) {
590  return nullptr;
591  }
592  return dl.Leak();
593 }
594 
597  ImpellerDisplayListBuilder builder,
598  ImpellerDisplayList display_list,
599  float opacity) {
600  GetPeer(builder)->DrawDisplayList(*GetPeer(display_list), opacity);
601 }
602 
604 ImpellerSurface ImpellerSurfaceCreateWrappedFBONew(ImpellerContext context,
605  uint64_t fbo,
606  ImpellerPixelFormat format,
607  const ImpellerISize* size) {
608  return Surface::WrapFBO(*GetPeer(context), //
609  fbo, //
610  ToImpellerType(format), //
611  ToImpellerType(*size)) //
612  .Leak();
613 }
614 
616 void ImpellerSurfaceRetain(ImpellerSurface surface) {
617  ObjectBase::SafeRetain(surface);
618 }
619 
621 void ImpellerSurfaceRelease(ImpellerSurface surface) {
622  ObjectBase::SafeRelease(surface);
623 }
624 
626 bool ImpellerSurfaceDrawDisplayList(ImpellerSurface surface,
627  ImpellerDisplayList display_list) {
628  return GetPeer(surface)->DrawDisplayList(*GetPeer(display_list));
629 }
630 
632 void ImpellerDisplayListBuilderDrawTexture(ImpellerDisplayListBuilder builder,
633  ImpellerTexture texture,
634  const ImpellerPoint* point,
635  ImpellerTextureSampling sampling,
636  ImpellerPaint paint) {
637  GetPeer(builder)->DrawTexture(*GetPeer(texture), //
638  ToImpellerType(*point), //
639  ToDisplayListType(sampling), //
640  GetPeer(paint) //
641  );
642 }
643 
646  ImpellerDisplayListBuilder builder,
647  ImpellerTexture texture,
648  const ImpellerRect* src_rect,
649  const ImpellerRect* dst_rect,
650  ImpellerTextureSampling sampling,
651  ImpellerPaint paint) {
652  GetPeer(builder)->DrawTextureRect(*GetPeer(texture), //
653  ToImpellerType(*src_rect), //
654  ToImpellerType(*dst_rect), //
655  ToDisplayListType(sampling), //
656  GetPeer(paint) //
657  );
658 }
659 
661 void ImpellerColorSourceRetain(ImpellerColorSource color_source) {
662  ObjectBase::SafeRetain(color_source);
663 }
664 
666 void ImpellerColorSourceRelease(ImpellerColorSource color_source) {
667  ObjectBase::SafeRelease(color_source);
668 }
669 
670 static std::pair<std::vector<flutter::DlColor>, std::vector<Scalar>>
671 ParseColorsAndStops(uint32_t stop_count,
672  const ImpellerColor* colors,
673  const float* stops) {
674  if (stop_count == 0) {
675  return {};
676  }
677  std::pair<std::vector<flutter::DlColor>, std::vector<Scalar>> result;
678  result.first.reserve(stop_count);
679  result.second.reserve(stop_count);
680  for (size_t i = 0; i < stop_count; i++) {
681  result.first.emplace_back(ToDisplayListType(colors[i]));
682  result.second.emplace_back(stops[i]);
683  }
684  return result;
685 }
686 
689  const ImpellerPoint* start_point,
690  const ImpellerPoint* end_point,
691  uint32_t stop_count,
692  const ImpellerColor* colors,
693  const float* stops,
694  ImpellerTileMode tile_mode,
695  const ImpellerMatrix* transformation) {
696  const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
698  ToImpellerType(*start_point), //
699  ToImpellerType(*end_point), //
700  colors_and_stops.first, //
701  colors_and_stops.second, //
702  ToDisplayListType(tile_mode), //
703  transformation == nullptr ? Matrix{}
704  : ToImpellerType(*transformation) //
705  )
706  .Leak();
707 }
708 
711  const ImpellerPoint* center,
712  float radius,
713  uint32_t stop_count,
714  const ImpellerColor* colors,
715  const float* stops,
716  ImpellerTileMode tile_mode,
717  const ImpellerMatrix* transformation) {
718  const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
720  ToImpellerType(*center), //
721  radius, //
722  colors_and_stops.first, //
723  colors_and_stops.second, //
724  ToDisplayListType(tile_mode), //
725  transformation == nullptr ? Matrix{}
726  : ToImpellerType(*transformation) //
727  )
728  .Leak();
729 }
730 
733  const ImpellerPoint* start_center,
734  float start_radius,
735  const ImpellerPoint* end_center,
736  float end_radius,
737  uint32_t stop_count,
738  const ImpellerColor* colors,
739  const float* stops,
740  ImpellerTileMode tile_mode,
741  const ImpellerMatrix* transformation) {
742  const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
744  ToImpellerType(*start_center), //
745  start_radius, //
746  ToImpellerType(*end_center), //
747  end_radius, //
748  colors_and_stops.first, //
749  colors_and_stops.second, //
750  ToDisplayListType(tile_mode), //
751  transformation == nullptr ? Matrix{}
752  : ToImpellerType(*transformation) //
753  )
754  .Leak();
755 }
756 
759  const ImpellerPoint* center,
760  float start,
761  float end,
762  uint32_t stop_count,
763  const ImpellerColor* colors,
764  const float* stops,
765  ImpellerTileMode tile_mode,
766  const ImpellerMatrix* transformation) {
767  const auto colors_and_stops = ParseColorsAndStops(stop_count, colors, stops);
769  ToImpellerType(*center), //
770  start, //
771  end, //
772  colors_and_stops.first, //
773  colors_and_stops.second, //
774  ToDisplayListType(tile_mode), //
775  transformation == nullptr ? Matrix{}
776  : ToImpellerType(*transformation) //
777  )
778  .Leak();
779 }
780 
782 void ImpellerColorFilterRetain(ImpellerColorFilter color_filter) {
783  ObjectBase::SafeRetain(color_filter);
784 }
785 
787 void ImpellerColorFilterRelease(ImpellerColorFilter color_filter) {
788  ObjectBase::SafeRelease(color_filter);
789 }
790 
793  const ImpellerColor* color,
794  ImpellerBlendMode blend_mode) {
796  ToImpellerType(blend_mode))
797  .Leak();
798 }
799 
802  const ImpellerColorMatrix* color_matrix) {
803  return ColorFilter::MakeMatrix(color_matrix->m).Leak();
804 }
805 
807 void ImpellerMaskFilterRetain(ImpellerMaskFilter mask_filter) {
809 }
810 
812 void ImpellerMaskFilterRelease(ImpellerMaskFilter mask_filter) {
814 }
815 
818  float sigma) {
819  return MaskFilter::MakeBlur(ToDisplayListType(style), sigma).Leak();
820 }
821 
823 void ImpellerImageFilterRetain(ImpellerImageFilter image_filter) {
824  ObjectBase::SafeRetain(image_filter);
825 }
826 
828 void ImpellerImageFilterRelease(ImpellerImageFilter image_filter) {
829  ObjectBase::SafeRelease(image_filter);
830 }
831 
834  float x_sigma,
835  float y_sigma,
836  ImpellerTileMode tile_mode) {
837  return ImageFilter::MakeBlur(x_sigma, y_sigma, ToDisplayListType(tile_mode))
838  .Leak();
839 }
840 
842 ImpellerImageFilter ImpellerImageFilterCreateDilateNew(float x_radius,
843  float y_radius) {
844  return ImageFilter::MakeDilate(x_radius, y_radius).Leak();
845 }
846 
848 ImpellerImageFilter ImpellerImageFilterCreateErodeNew(float x_radius,
849  float y_radius) {
850  return ImageFilter::MakeErode(x_radius, y_radius).Leak();
851 }
852 
855  const ImpellerMatrix* matrix,
856  ImpellerTextureSampling sampling) {
857  return ImageFilter::MakeMatrix(ToImpellerType(*matrix),
858  ToDisplayListType(sampling))
859  .Leak();
860 }
861 
864  ImpellerImageFilter outer,
865  ImpellerImageFilter inner) {
866  return ImageFilter::MakeCompose(*GetPeer(outer), *GetPeer(inner)).Leak();
867 }
868 
869 void ImpellerPaintSetColorFilter(ImpellerPaint paint,
870  ImpellerColorFilter color_filter) {
871  GetPeer(paint)->SetColorFilter(*GetPeer(color_filter));
872 }
873 
874 void ImpellerPaintSetColorSource(ImpellerPaint paint,
875  ImpellerColorSource color_source) {
876  GetPeer(paint)->SetColorSource(*GetPeer(color_source));
877 }
878 
879 void ImpellerPaintSetImageFilter(ImpellerPaint paint,
880  ImpellerImageFilter image_filter) {
881  GetPeer(paint)->SetImageFilter(*GetPeer(image_filter));
882 }
883 
884 void ImpellerPaintSetMaskFilter(ImpellerPaint paint,
885  ImpellerMaskFilter mask_filter) {
886  GetPeer(paint)->SetMaskFilter(*GetPeer(mask_filter));
887 }
888 
890  return Create<ParagraphStyle>().Leak();
891 }
892 
894 void ImpellerParagraphStyleRetain(ImpellerParagraphStyle paragraph_style) {
895  ObjectBase::SafeRetain(paragraph_style);
896 }
897 
899 void ImpellerParagraphStyleRelease(ImpellerParagraphStyle paragraph_style) {
900  ObjectBase::SafeRelease(paragraph_style);
901 }
902 
904 void ImpellerParagraphStyleSetForeground(ImpellerParagraphStyle paragraph_style,
905  ImpellerPaint paint) {
906  GetPeer(paragraph_style)->SetForeground(Ref(GetPeer(paint)));
907 }
908 
910  ImpellerParagraphStyle paragraph_style,
911  ImpellerPaint paint) {
912  GetPeer(paragraph_style)->SetBackground(Ref(GetPeer(paint)));
913 }
914 
916 void ImpellerParagraphStyleSetFontWeight(ImpellerParagraphStyle paragraph_style,
917  ImpellerFontWeight weight) {
918  GetPeer(paragraph_style)->SetFontWeight(ToTxtType(weight));
919 }
920 
922 void ImpellerParagraphStyleSetFontStyle(ImpellerParagraphStyle paragraph_style,
923  ImpellerFontStyle style) {
924  GetPeer(paragraph_style)->SetFontStyle(ToTxtType(style));
925 }
926 
927 static std::string ReadString(const char* string) {
928  if (string == nullptr) {
929  return "";
930  }
931  return std::string{string};
932 }
933 
935 void ImpellerParagraphStyleSetFontFamily(ImpellerParagraphStyle paragraph_style,
936  const char* family_name) {
937  GetPeer(paragraph_style)->SetFontFamily(ReadString(family_name));
938 }
939 
941 void ImpellerParagraphStyleSetFontSize(ImpellerParagraphStyle paragraph_style,
942  float size) {
943  GetPeer(paragraph_style)->SetFontSize(size);
944 }
945 
947 void ImpellerParagraphStyleSetHeight(ImpellerParagraphStyle paragraph_style,
948  float height) {
949  GetPeer(paragraph_style)->SetHeight(height);
950 }
951 
954  ImpellerParagraphStyle paragraph_style,
955  ImpellerTextAlignment align) {
956  GetPeer(paragraph_style)->SetTextAlignment(ToTxtType(align));
957 }
958 
961  ImpellerParagraphStyle paragraph_style,
962  ImpellerTextDirection direction) {
963  GetPeer(paragraph_style)->SetTextDirection(ToTxtType(direction));
964 }
965 
967 void ImpellerParagraphStyleSetMaxLines(ImpellerParagraphStyle paragraph_style,
968  uint32_t max_lines) {
969  GetPeer(paragraph_style)->SetMaxLines(max_lines);
970 }
971 
973 void ImpellerParagraphStyleSetLocale(ImpellerParagraphStyle paragraph_style,
974  const char* locale) {
975  GetPeer(paragraph_style)->SetLocale(ReadString(locale));
976 }
977 
979 void ImpellerDisplayListBuilderDrawParagraph(ImpellerDisplayListBuilder builder,
980  ImpellerParagraph paragraph,
981  const ImpellerPoint* point) {
982  GetPeer(builder)->DrawParagraph(*GetPeer(paragraph), ToImpellerType(*point));
983 }
984 
986  ImpellerTypographyContext context) {
987  auto builder = Create<ParagraphBuilder>(*GetPeer(context));
988  if (!builder->IsValid()) {
989  VALIDATION_LOG << "Could not create valid paragraph builder.";
990  return nullptr;
991  }
992  return builder.Leak();
993 }
994 
997  ImpellerParagraphBuilder paragraph_builder) {
998  ObjectBase::SafeRetain(paragraph_builder);
999 }
1000 
1003  ImpellerParagraphBuilder paragraph_builder) {
1004  ObjectBase::SafeRelease(paragraph_builder);
1005 }
1006 
1009  ImpellerParagraphBuilder paragraph_builder,
1010  ImpellerParagraphStyle style) {
1011  GetPeer(paragraph_builder)->PushStyle(*GetPeer(style));
1012 }
1013 
1016  ImpellerParagraphBuilder paragraph_builder) {
1017  GetPeer(paragraph_builder)->PopStyle();
1018 }
1019 
1021 void ImpellerParagraphBuilderAddText(ImpellerParagraphBuilder paragraph_builder,
1022  const uint8_t* data,
1023  uint32_t length) {
1024  if (data == nullptr) {
1025  length = 0;
1026  }
1027  if (length == 0) {
1028  return;
1029  }
1030  GetPeer(paragraph_builder)->AddText(data, length);
1031 }
1032 
1034  ImpellerParagraphBuilder paragraph_builder,
1035  float width) {
1036  return GetPeer(paragraph_builder)->Build(width).Leak();
1037 }
1038 
1040 void ImpellerParagraphRetain(ImpellerParagraph paragraph) {
1041  ObjectBase::SafeRetain(paragraph);
1042 }
1043 
1045 void ImpellerParagraphRelease(ImpellerParagraph paragraph) {
1046  ObjectBase::SafeRelease(paragraph);
1047 }
1048 
1050 float ImpellerParagraphGetMaxWidth(ImpellerParagraph paragraph) {
1051  return GetPeer(paragraph)->GetMaxWidth();
1052 }
1053 
1055 float ImpellerParagraphGetHeight(ImpellerParagraph paragraph) {
1056  return GetPeer(paragraph)->GetHeight();
1057 }
1058 
1060 float ImpellerParagraphGetLongestLineWidth(ImpellerParagraph paragraph) {
1061  return GetPeer(paragraph)->GetLongestLineWidth();
1062 }
1063 
1065 float ImpellerParagraphGetMinIntrinsicWidth(ImpellerParagraph paragraph) {
1066  return GetPeer(paragraph)->GetMinIntrinsicWidth();
1067 }
1068 
1070 float ImpellerParagraphGetMaxIntrinsicWidth(ImpellerParagraph paragraph) {
1071  return GetPeer(paragraph)->GetMaxIntrinsicWidth();
1072 }
1073 
1075 float ImpellerParagraphGetIdeographicBaseline(ImpellerParagraph paragraph) {
1076  return GetPeer(paragraph)->GetIdeographicBaseline();
1077 }
1078 
1080 float ImpellerParagraphGetAlphabeticBaseline(ImpellerParagraph paragraph) {
1081  return GetPeer(paragraph)->GetAlphabeticBaseline();
1082 }
1083 
1085 uint32_t ImpellerParagraphGetLineCount(ImpellerParagraph paragraph) {
1086  return GetPeer(paragraph)->GetLineCount();
1087 }
1088 
1090  auto context = Create<TypographyContext>();
1091  if (!context->IsValid()) {
1092  VALIDATION_LOG << "Could not create typography context.";
1093  return nullptr;
1094  }
1095  return Create<TypographyContext>().Leak();
1096 }
1097 
1099 void ImpellerTypographyContextRetain(ImpellerTypographyContext context) {
1100  ObjectBase::SafeRetain(context);
1101 }
1102 
1104 void ImpellerTypographyContextRelease(ImpellerTypographyContext context) {
1105  ObjectBase::SafeRelease(context);
1106 }
1107 
1108 } // namespace impeller::interop
ImpellerPoint
Definition: impeller.h:241
impeller::interop::ImpellerParagraphGetMaxIntrinsicWidth
IMPELLER_EXTERN_C float ImpellerParagraphGetMaxIntrinsicWidth(ImpellerParagraph paragraph)
Definition: impeller.cc:1070
impeller.h
ImpellerTextureDescriptor
Definition: impeller.h:279
impeller::interop::ImpellerDisplayListBuilderDrawRoundedRect
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRoundedRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *radii, ImpellerPaint paint)
Definition: impeller.cc:430
impeller::interop::ImpellerImageFilterCreateMatrixNew
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateMatrixNew(const ImpellerMatrix *matrix, ImpellerTextureSampling sampling)
Definition: impeller.cc:854
impeller::interop::ImpellerPaintSetMaskFilter
void ImpellerPaintSetMaskFilter(ImpellerPaint paint, ImpellerMaskFilter mask_filter)
Definition: impeller.cc:884
impeller::interop::ToDisplayListType
constexpr flutter::DlColor ToDisplayListType(Color color)
Definition: formats.h:73
impeller::interop::ImpellerParagraphBuilderRetain
IMPELLER_EXTERN_C void ImpellerParagraphBuilderRetain(ImpellerParagraphBuilder paragraph_builder)
Definition: impeller.cc:996
ImpellerBlurStyle
ImpellerBlurStyle
Definition: impeller.h:187
ImpellerFontStyle
ImpellerFontStyle
Definition: impeller.h:212
paragraph.h
surface.h
impeller::interop::ImpellerParagraphRelease
IMPELLER_EXTERN_C void ImpellerParagraphRelease(ImpellerParagraph paragraph)
Definition: impeller.cc:1045
impeller::interop::ImpellerPaintRetain
IMPELLER_EXTERN_C void ImpellerPaintRetain(ImpellerPaint paint)
Definition: impeller.cc:338
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:73
ImpellerMapping::length
uint64_t length
Definition: impeller.h:287
impeller::interop::ImpellerImageFilterRetain
IMPELLER_EXTERN_C void ImpellerImageFilterRetain(ImpellerImageFilter image_filter)
Definition: impeller.cc:823
impeller::interop::MaskFilter::MakeBlur
static ScopedObject< MaskFilter > MakeBlur(flutter::DlBlurStyle style, float sigma)
Definition: mask_filter.cc:9
dl_builder.h
impeller::interop::ImpellerDisplayListBuilderRestoreToCount
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRestoreToCount(ImpellerDisplayListBuilder builder, uint32_t count)
Definition: impeller.cc:189
impeller::interop::ImpellerPaintSetBlendMode
IMPELLER_EXTERN_C void ImpellerPaintSetBlendMode(ImpellerPaint paint, ImpellerBlendMode mode)
Definition: impeller.cc:353
image_filter.h
impeller::interop::ImpellerPathRelease
IMPELLER_EXTERN_C void ImpellerPathRelease(ImpellerPath path)
Definition: impeller.cc:201
impeller::interop::ImpellerParagraphStyleSetLocale
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetLocale(ImpellerParagraphStyle paragraph_style, const char *locale)
Definition: impeller.cc:973
impeller::interop::ImpellerPathBuilderAddOval
IMPELLER_EXTERN_C void ImpellerPathBuilderAddOval(ImpellerPathBuilder builder, const ImpellerRect *oval_bounds)
Definition: impeller.cc:268
impeller::interop::ImpellerDisplayListBuilderRetain
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRetain(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:114
impeller::interop::ImageFilter::MakeMatrix
static ScopedObject< ImageFilter > MakeMatrix(const Matrix &matrix, flutter::DlImageSampling sampling)
Definition: image_filter.cc:42
ImpellerTextureDescriptor::mip_count
uint32_t mip_count
Definition: impeller.h:282
impeller::interop::ImpellerParagraphBuilderNew
IMPELLER_EXTERN_C ImpellerParagraphBuilder ImpellerParagraphBuilderNew(ImpellerTypographyContext context)
Definition: impeller.cc:985
impeller::interop::ImpellerPaintSetStrokeWidth
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeWidth(ImpellerPaint paint, float width)
Definition: impeller.cc:373
impeller::interop::FromImpellerType
constexpr void FromImpellerType(const Matrix &from, ImpellerMatrix &to)
Definition: formats.h:206
ImpellerClipOperation
ImpellerClipOperation
Definition: impeller.h:116
color_filter.h
impeller::interop::ImpellerDisplayListBuilderRelease
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRelease(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:119
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:465
impeller::interop::ObjectBase::SafeRelease
static void SafeRelease(void *ptr)
Definition: object.h:43
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:400
impeller::interop::ImpellerTypographyContextNew
IMPELLER_EXTERN_C ImpellerTypographyContext ImpellerTypographyContextNew()
Definition: impeller.cc:1089
ImpellerMapping::on_release
ImpellerCallback IMPELLER_NULLABLE on_release
Definition: impeller.h:288
impeller::interop::ImpellerColorFilterCreateBlendNew
IMPELLER_EXTERN_C ImpellerColorFilter ImpellerColorFilterCreateBlendNew(const ImpellerColor *color, ImpellerBlendMode blend_mode)
Definition: impeller.cc:792
data
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63
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:671
ImpellerISize
Definition: impeller.h:251
impeller::TextureDescriptor::format
PixelFormat format
Definition: texture_descriptor.h:41
impeller::interop::ImpellerParagraphGetMinIntrinsicWidth
IMPELLER_EXTERN_C float ImpellerParagraphGetMinIntrinsicWidth(ImpellerParagraph paragraph)
Definition: impeller.cc:1065
impeller::interop::ImpellerDisplayListBuilderGetTransform
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderGetTransform(ImpellerDisplayListBuilder builder, ImpellerMatrix *out_transform)
Definition: impeller.cc:171
ImpellerMapping
Definition: impeller.h:285
impeller::interop::ImpellerPathRetain
IMPELLER_EXTERN_C void ImpellerPathRetain(ImpellerPath path)
Definition: impeller.cc:196
impeller::interop::ImpellerParagraphRetain
IMPELLER_EXTERN_C void ImpellerParagraphRetain(ImpellerParagraph paragraph)
Definition: impeller.cc:1040
impeller::interop::ImpellerParagraphBuilderAddText
IMPELLER_EXTERN_C void ImpellerParagraphBuilderAddText(ImpellerParagraphBuilder paragraph_builder, const uint8_t *data, uint32_t length)
Definition: impeller.cc:1021
impeller::TextureGLES::GetGLHandle
std::optional< GLuint > GetGLHandle() const
Definition: texture_gles.cc:437
impeller::HandleType::kTexture
@ kTexture
ImpellerColor
Definition: impeller.h:271
impeller::interop::ImpellerParagraphBuilderPopStyle
IMPELLER_EXTERN_C void ImpellerParagraphBuilderPopStyle(ImpellerParagraphBuilder paragraph_builder)
Definition: impeller.cc:1015
texture_gles.h
impeller::TextureDescriptor::mip_count
size_t mip_count
Definition: texture_descriptor.h:43
context_gles.h
impeller::interop::ImpellerPathBuilderQuadraticCurveTo
IMPELLER_EXTERN_C void ImpellerPathBuilderQuadraticCurveTo(ImpellerPathBuilder builder, const ImpellerPoint *control_point, const ImpellerPoint *end_point)
Definition: impeller.cc:233
impeller::interop::ImpellerPaintSetImageFilter
void ImpellerPaintSetImageFilter(ImpellerPaint paint, ImpellerImageFilter image_filter)
Definition: impeller.cc:879
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:732
impeller::interop::ImpellerPathBuilderRetain
IMPELLER_EXTERN_C void ImpellerPathBuilderRetain(ImpellerPathBuilder builder)
Definition: impeller.cc:211
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:645
ImpellerRect
Definition: impeller.h:234
impeller::interop::ImpellerColorFilterRetain
IMPELLER_EXTERN_C void ImpellerColorFilterRetain(ImpellerColorFilter color_filter)
Definition: impeller.cc:782
impeller::interop::ImpellerParagraphStyleSetFontSize
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontSize(ImpellerParagraphStyle paragraph_style, float size)
Definition: impeller.cc:941
impeller::interop::ImpellerDisplayListBuilderDrawTexture
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawTexture(ImpellerDisplayListBuilder builder, ImpellerTexture texture, const ImpellerPoint *point, ImpellerTextureSampling sampling, ImpellerPaint paint)
Definition: impeller.cc:632
impeller::interop::ImpellerSurfaceCreateWrappedFBONew
IMPELLER_EXTERN_C ImpellerSurface ImpellerSurfaceCreateWrappedFBONew(ImpellerContext context, uint64_t fbo, ImpellerPixelFormat format, const ImpellerISize *size)
Definition: impeller.cc:604
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:32
impeller::interop::ImpellerDisplayListBuilderTranslate
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderTranslate(ImpellerDisplayListBuilder builder, float x_translation, float y_translation)
Definition: impeller.cc:158
impeller::interop::ImpellerPathBuilderRelease
IMPELLER_EXTERN_C void ImpellerPathBuilderRelease(ImpellerPathBuilder builder)
Definition: impeller.cc:216
ImpellerTileMode
ImpellerTileMode
Definition: impeller.h:180
impeller::interop::ImpellerParagraphGetLineCount
IMPELLER_EXTERN_C uint32_t ImpellerParagraphGetLineCount(ImpellerParagraph paragraph)
Definition: impeller.cc:1085
impeller::interop::ImpellerParagraphStyleRetain
IMPELLER_EXTERN_C void ImpellerParagraphStyleRetain(ImpellerParagraphStyle paragraph_style)
Definition: impeller.cc:894
impeller::interop::ImpellerGetVersion
IMPELLER_EXTERN_C uint32_t ImpellerGetVersion()
Definition: impeller.cc:68
impeller::interop
Definition: color_filter.cc:7
validation.h
impeller::interop::ImpellerSurfaceDrawDisplayList
IMPELLER_EXTERN_C bool ImpellerSurfaceDrawDisplayList(ImpellerSurface surface, ImpellerDisplayList display_list)
Definition: impeller.cc:626
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:257
impeller::interop::ImpellerParagraphStyleSetFontStyle
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontStyle(ImpellerParagraphStyle paragraph_style, ImpellerFontStyle style)
Definition: impeller.cc:922
impeller::TextureDescriptor::usage
TextureUsageMask usage
Definition: texture_descriptor.h:44
impeller::interop::ImpellerDisplayListBuilderRestore
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRestore(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:140
impeller::interop::ImpellerParagraphStyleSetFontFamily
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontFamily(ImpellerParagraphStyle paragraph_style, const char *family_name)
Definition: impeller.cc:935
impeller::interop::ImpellerDisplayListBuilderScale
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderScale(ImpellerDisplayListBuilder builder, float x_scale, float y_scale)
Definition: impeller.cc:145
ImpellerColorMatrix::m
float m[20]
Definition: impeller.h:261
paragraph_builder.h
ImpellerStrokeCap
ImpellerStrokeCap
Definition: impeller.h:159
impeller::interop::ImpellerParagraphStyleSetMaxLines
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetMaxLines(ImpellerParagraphStyle paragraph_style, uint32_t max_lines)
Definition: impeller.cc:967
impeller::interop::ImpellerPathBuilderAddRoundedRect
IMPELLER_EXTERN_C void ImpellerPathBuilderAddRoundedRect(ImpellerPathBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *rounding_radii)
Definition: impeller.cc:274
impeller::interop::DEFINE_PEER_GETTER
DEFINE_PEER_GETTER(ColorFilter, ImpellerColorFilter)
impeller::interop::ImpellerDisplayListBuilderDrawPath
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawPath(ImpellerDisplayListBuilder builder, ImpellerPath path, ImpellerPaint paint)
Definition: impeller.cc:458
typography_context.h
impeller::TextureCoordinateSystem::kUploadFromHost
@ kUploadFromHost
impeller::TextureDescriptor::type
TextureType type
Definition: texture_descriptor.h:40
impeller::interop::ImpellerPaintSetColorFilter
void ImpellerPaintSetColorFilter(ImpellerPaint paint, ImpellerColorFilter color_filter)
Definition: impeller.cc:869
impeller::interop::ImpellerParagraphStyleSetHeight
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetHeight(ImpellerParagraphStyle paragraph_style, float height)
Definition: impeller.cc:947
impeller::TSize< Scalar >
impeller::interop::ImpellerParagraphGetMaxWidth
IMPELLER_EXTERN_C float ImpellerParagraphGetMaxWidth(ImpellerParagraph paragraph)
Definition: impeller.cc:1050
impeller::interop::ImpellerPaintSetColor
IMPELLER_EXTERN_C void ImpellerPaintSetColor(ImpellerPaint paint, const ImpellerColor *color)
Definition: impeller.cc:348
path.h
ImpellerMatrix
Definition: impeller.h:256
color_source.h
impeller::interop::ImpellerTextureRelease
IMPELLER_EXTERN_C void ImpellerTextureRelease(ImpellerTexture texture)
Definition: impeller.cc:558
impeller::interop::ImpellerPaintSetDrawStyle
IMPELLER_EXTERN_C void ImpellerPaintSetDrawStyle(ImpellerPaint paint, ImpellerDrawStyle style)
Definition: impeller.cc:358
impeller::interop::ImpellerParagraphBuilderPushStyle
IMPELLER_EXTERN_C void ImpellerParagraphBuilderPushStyle(ImpellerParagraphBuilder paragraph_builder, ImpellerParagraphStyle style)
Definition: impeller.cc:1008
impeller::interop::ImpellerMaskFilterCreateBlurNew
IMPELLER_EXTERN_C ImpellerMaskFilter ImpellerMaskFilterCreateBlurNew(ImpellerBlurStyle style, float sigma)
Definition: impeller.cc:817
impeller::interop::ToTxtType
constexpr txt::FontWeight ToTxtType(ImpellerFontWeight weight)
Definition: formats.h:424
impeller::interop::ImpellerPaintSetColorSource
void ImpellerPaintSetColorSource(ImpellerPaint paint, ImpellerColorSource color_source)
Definition: impeller.cc:874
impeller::Context::BackendType::kOpenGLES
@ kOpenGLES
impeller::interop::ImpellerDisplayListBuilderClipPath
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipPath(ImpellerDisplayListBuilder builder, ImpellerPath path, ImpellerClipOperation op)
Definition: impeller.cc:326
ImpellerPixelFormat
ImpellerPixelFormat
Definition: impeller.h:171
ImpellerRoundingRadii
Definition: impeller.h:264
impeller::interop::ImpellerImageFilterCreateBlurNew
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateBlurNew(float x_sigma, float y_sigma, ImpellerTileMode tile_mode)
Definition: impeller.cc:833
impeller::interop::ImpellerDisplayListBuilderDrawOval
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawOval(ImpellerDisplayListBuilder builder, const ImpellerRect *oval_bounds, ImpellerPaint paint)
Definition: impeller.cc:423
impeller::interop::ImpellerTextureCreateWithOpenGLTextureHandleNew
IMPELLER_EXTERN_C ImpellerTexture ImpellerTextureCreateWithOpenGLTextureHandleNew(ImpellerContext context, const ImpellerTextureDescriptor *descriptor, uint64_t external_gl_handle)
Definition: impeller.cc:509
transform
Matrix transform
Definition: gaussian_blur_filter_contents.cc:213
impeller::interop::ImpellerDisplayListBuilderCreateDisplayListNew
IMPELLER_EXTERN_C ImpellerDisplayList ImpellerDisplayListBuilderCreateDisplayListNew(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:586
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:442
impeller::StorageMode::kDevicePrivate
@ kDevicePrivate
impeller::interop::ImageFilter::MakeErode
static ScopedObject< ImageFilter > MakeErode(Scalar x_radius, Scalar y_radius)
Definition: image_filter.cc:33
impeller::interop::ImpellerContextRetain
IMPELLER_EXTERN_C void ImpellerContextRetain(ImpellerContext context)
Definition: impeller.cc:98
impeller::interop::ImpellerDisplayListBuilderGetSaveCount
IMPELLER_EXTERN_C uint32_t ImpellerDisplayListBuilderGetSaveCount(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:183
impeller::interop::Ref
ScopedObject< Object > Ref(Object *object)
Definition: object.h:145
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:710
impeller::CompressionType::kLossless
@ kLossless
impeller::interop::ImpellerColorSourceRelease
IMPELLER_EXTERN_C void ImpellerColorSourceRelease(ImpellerColorSource color_source)
Definition: impeller.cc:666
IMPELLER_VERSION_GET_VARIANT
#define IMPELLER_VERSION_GET_VARIANT(version)
Definition: impeller.h:67
impeller::interop::ImpellerPathBuilderLineTo
IMPELLER_EXTERN_C void ImpellerPathBuilderLineTo(ImpellerPathBuilder builder, const ImpellerPoint *location)
Definition: impeller.cc:227
formats.h
impeller::interop::ImpellerMaskFilterRetain
IMPELLER_EXTERN_C void ImpellerMaskFilterRetain(ImpellerMaskFilter mask_filter)
Definition: impeller.cc:807
texture.h
impeller::interop::ImpellerDisplayListBuilderDrawParagraph
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawParagraph(ImpellerDisplayListBuilder builder, ImpellerParagraph paragraph, const ImpellerPoint *point)
Definition: impeller.cc:979
impeller::interop::ImpellerPathBuilderNew
IMPELLER_EXTERN_C ImpellerPathBuilder ImpellerPathBuilderNew()
Definition: impeller.cc:206
impeller::interop::ImpellerDisplayListBuilderClipOval
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipOval(ImpellerDisplayListBuilder builder, const ImpellerRect *oval_bounds, ImpellerClipOperation op)
Definition: impeller.cc:307
ImpellerStrokeJoin
ImpellerStrokeJoin
Definition: impeller.h:165
impeller::interop::ImpellerMaskFilterRelease
IMPELLER_EXTERN_C void ImpellerMaskFilterRelease(ImpellerMaskFilter mask_filter)
Definition: impeller.cc:812
impeller::interop::ImpellerParagraphStyleSetTextDirection
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetTextDirection(ImpellerParagraphStyle paragraph_style, ImpellerTextDirection direction)
Definition: impeller.cc:960
impeller::interop::ImpellerDisplayListBuilderRotate
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderRotate(ImpellerDisplayListBuilder builder, float angle_degrees)
Definition: impeller.cc:152
ImpellerDrawStyle
ImpellerDrawStyle
Definition: impeller.h:153
impeller::interop::ImpellerParagraphStyleRelease
IMPELLER_EXTERN_C void ImpellerParagraphStyleRelease(ImpellerParagraphStyle paragraph_style)
Definition: impeller.cc:899
impeller::interop::ImpellerDisplayListRelease
IMPELLER_EXTERN_C void ImpellerDisplayListRelease(ImpellerDisplayList display_list)
Definition: impeller.cc:581
ImpellerBlendMode
ImpellerBlendMode
Definition: impeller.h:121
impeller::interop::ImpellerPathBuilderClose
IMPELLER_EXTERN_C void ImpellerPathBuilderClose(ImpellerPathBuilder builder)
Definition: impeller.cc:283
impeller::interop::ImpellerTextureRetain
IMPELLER_EXTERN_C void ImpellerTextureRetain(ImpellerTexture texture)
Definition: impeller.cc:553
impeller::interop::ImpellerDisplayListBuilderResetTransform
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderResetTransform(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:177
impeller::interop::ImpellerParagraphGetAlphabeticBaseline
IMPELLER_EXTERN_C float ImpellerParagraphGetAlphabeticBaseline(ImpellerParagraph paragraph)
Definition: impeller.cc:1080
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:241
impeller::interop::ImpellerDisplayListBuilderNew
IMPELLER_EXTERN_C ImpellerDisplayListBuilder ImpellerDisplayListBuilderNew(const ImpellerRect *cull_rect)
Definition: impeller.cc:108
impeller::interop::ImpellerDisplayListBuilderSetTransform
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSetTransform(ImpellerDisplayListBuilder builder, const ImpellerMatrix *transform)
Definition: impeller.cc:165
impeller::interop::ToImpellerType
constexpr Matrix ToImpellerType(const ImpellerMatrix &m)
Definition: formats.h:198
impeller::interop::ImpellerPathBuilderAddRect
IMPELLER_EXTERN_C void ImpellerPathBuilderAddRect(ImpellerPathBuilder builder, const ImpellerRect *rect)
Definition: impeller.cc:251
impeller::interop::ImpellerImageFilterCreateErodeNew
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateErodeNew(float x_radius, float y_radius)
Definition: impeller.cc:848
impeller::interop::ImpellerDisplayListBuilderDrawLine
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawLine(ImpellerDisplayListBuilder builder, const ImpellerPoint *from, const ImpellerPoint *to, ImpellerPaint paint)
Definition: impeller.cc:389
impeller::interop::ImpellerContextRelease
IMPELLER_EXTERN_C void ImpellerContextRelease(ImpellerContext context)
Definition: impeller.cc:103
impeller::interop::ImpellerParagraphGetIdeographicBaseline
IMPELLER_EXTERN_C float ImpellerParagraphGetIdeographicBaseline(ImpellerParagraph paragraph)
Definition: impeller.cc:1075
impeller::TextureType::kTexture2D
@ kTexture2D
IMPELLER_EXTERN_C
#define IMPELLER_EXTERN_C
Definition: impeller.h:17
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:688
IMPELLER_VERSION_GET_PATCH
#define IMPELLER_VERSION_GET_PATCH(version)
Definition: impeller.h:72
impeller::interop::ImpellerPaintSetStrokeCap
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeCap(ImpellerPaint paint, ImpellerStrokeCap cap)
Definition: impeller.cc:363
impeller::interop::ImpellerDisplayListBuilderClipRoundedRect
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipRoundedRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, const ImpellerRoundingRadii *radii, ImpellerClipOperation op)
Definition: impeller.cc:314
impeller::interop::ImpellerDisplayListBuilderDrawRect
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, ImpellerPaint paint)
Definition: impeller.cc:416
impeller::interop::ImpellerPaintSetStrokeJoin
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeJoin(ImpellerPaint paint, ImpellerStrokeJoin join)
Definition: impeller.cc:368
IMPELLER_VERSION
#define IMPELLER_VERSION
Definition: impeller.h:63
impeller::interop::ImpellerDisplayListBuilderDrawDisplayList
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawDisplayList(ImpellerDisplayListBuilder builder, ImpellerDisplayList display_list, float opacity)
Definition: impeller.cc:596
scalar.h
impeller::interop::ImpellerDisplayListBuilderSave
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSave(ImpellerDisplayListBuilder builder)
Definition: impeller.cc:124
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:81
impeller::TextureDescriptor::size
ISize size
Definition: texture_descriptor.h:42
impeller::interop::ImpellerDisplayListBuilderSaveLayer
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderSaveLayer(ImpellerDisplayListBuilder builder, const ImpellerRect *bounds, ImpellerPaint paint, ImpellerImageFilter backdrop)
Definition: impeller.cc:129
IMPELLER_VERSION_GET_MINOR
#define IMPELLER_VERSION_GET_MINOR(version)
Definition: impeller.h:70
ImpellerTextureDescriptor::pixel_format
ImpellerPixelFormat pixel_format
Definition: impeller.h:280
path_builder.h
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:54
impeller::interop::ImpellerColorSourceRetain
IMPELLER_EXTERN_C void ImpellerColorSourceRetain(ImpellerColorSource color_source)
Definition: impeller.cc:661
VALIDATION_LOG
#define VALIDATION_LOG
Definition: validation.h:91
impeller::interop::ImpellerParagraphGetLongestLineWidth
IMPELLER_EXTERN_C float ImpellerParagraphGetLongestLineWidth(ImpellerParagraph paragraph)
Definition: impeller.cc:1060
ImpellerTextDirection
ImpellerTextDirection
Definition: impeller.h:226
impeller::interop::ImpellerImageFilterRelease
IMPELLER_EXTERN_C void ImpellerImageFilterRelease(ImpellerImageFilter image_filter)
Definition: impeller.cc:828
mask_filter
std::shared_ptr< DlMaskFilter > mask_filter
Definition: dl_golden_blur_unittests.cc:25
impeller::interop::ColorFilter::MakeBlend
static ScopedObject< ColorFilter > MakeBlend(Color color, BlendMode mode)
Definition: color_filter.cc:9
ImpellerTextureSampling
ImpellerTextureSampling
Definition: impeller.h:175
impeller::interop::ImpellerParagraphStyleSetTextAlignment
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetTextAlignment(ImpellerParagraphStyle paragraph_style, ImpellerTextAlignment align)
Definition: impeller.cc:953
impeller::interop::Context::CreateOpenGLES
static ScopedObject< Context > CreateOpenGLES(std::function< void *(const char *gl_proc_name)> proc_address_callback)
Definition: context.cc:65
impeller::interop::ImpellerDisplayListRetain
IMPELLER_EXTERN_C void ImpellerDisplayListRetain(ImpellerDisplayList display_list)
Definition: impeller.cc:576
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:758
impeller::interop::ImpellerDisplayListBuilderDrawPaint
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderDrawPaint(ImpellerDisplayListBuilder builder, ImpellerPaint paint)
Definition: impeller.cc:383
impeller::interop::ImpellerColorFilterCreateColorMatrixNew
IMPELLER_EXTERN_C ImpellerColorFilter ImpellerColorFilterCreateColorMatrixNew(const ImpellerColorMatrix *color_matrix)
Definition: impeller.cc:801
impeller::interop::Surface::WrapFBO
static ScopedObject< Surface > WrapFBO(Context &context, uint64_t fbo, PixelFormat color_format, ISize size)
Definition: surface.cc:23
impeller::TPoint
Definition: point.h:27
impeller::interop::ImpellerPathBuilderCopyPathNew
IMPELLER_EXTERN_C ImpellerPath ImpellerPathBuilderCopyPathNew(ImpellerPathBuilder builder, ImpellerFillType fill)
Definition: impeller.cc:288
paragraph_style.h
impeller::interop::ImpellerImageFilterCreateDilateNew
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateDilateNew(float x_radius, float y_radius)
Definition: impeller.cc:842
impeller::BackendCast< ContextGLES, Context >::Cast
static ContextGLES & Cast(Context &base)
Definition: backend_cast.h:13
impeller::interop::ImpellerParagraphStyleSetBackground
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetBackground(ImpellerParagraphStyle paragraph_style, ImpellerPaint paint)
Definition: impeller.cc:909
impeller::TextureUsage::kShaderRead
@ kShaderRead
texture.h
impeller::interop::ReadString
static std::string ReadString(const char *string)
Definition: impeller.cc:927
impeller::interop::ImpellerParagraphBuilderRelease
IMPELLER_EXTERN_C void ImpellerParagraphBuilderRelease(ImpellerParagraphBuilder paragraph_builder)
Definition: impeller.cc:1002
ImpellerFillType
ImpellerFillType
Definition: impeller.h:111
impeller::interop::ImpellerParagraphStyleSetFontWeight
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetFontWeight(ImpellerParagraphStyle paragraph_style, ImpellerFontWeight weight)
Definition: impeller.cc:916
impeller::interop::ImpellerTextureGetOpenGLHandle
IMPELLER_EXTERN_C uint64_t ImpellerTextureGetOpenGLHandle(ImpellerTexture texture)
Definition: impeller.cc:563
impeller::interop::ImpellerSurfaceRelease
IMPELLER_EXTERN_C void ImpellerSurfaceRelease(ImpellerSurface surface)
Definition: impeller.cc:621
impeller::Degrees
Definition: scalar.h:51
context.h
impeller::interop::ImpellerPaintSetStrokeMiter
IMPELLER_EXTERN_C void ImpellerPaintSetStrokeMiter(ImpellerPaint paint, float miter)
Definition: impeller.cc:378
color
DlColor color
Definition: dl_golden_blur_unittests.cc:24
impeller::TextureDescriptor::storage_mode
StorageMode storage_mode
Definition: texture_descriptor.h:39
ImpellerFontWeight
ImpellerFontWeight
Definition: impeller.h:200
paint.h
ImpellerMapping::data
const uint8_t *IMPELLER_NONNULL data
Definition: impeller.h:286
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::interop::ImpellerDisplayListBuilderClipRect
IMPELLER_EXTERN_C void ImpellerDisplayListBuilderClipRect(ImpellerDisplayListBuilder builder, const ImpellerRect *rect, ImpellerClipOperation op)
Definition: impeller.cc:300
impeller::interop::ColorFilter::MakeMatrix
static ScopedObject< ColorFilter > MakeMatrix(const float matrix[20])
Definition: color_filter.cc:18
impeller::interop::ObjectBase::SafeRetain
static void SafeRetain(void *ptr)
Definition: object.h:37
impeller::interop::ImpellerSurfaceRetain
IMPELLER_EXTERN_C void ImpellerSurfaceRetain(ImpellerSurface surface)
Definition: impeller.cc:616
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::ImpellerPathBuilderTakePathNew
IMPELLER_EXTERN_C ImpellerPath ImpellerPathBuilderTakePathNew(ImpellerPathBuilder builder, ImpellerFillType fill)
Definition: impeller.cc:293
impeller::interop::ImpellerParagraphStyleSetForeground
IMPELLER_EXTERN_C void ImpellerParagraphStyleSetForeground(ImpellerParagraphStyle paragraph_style, ImpellerPaint paint)
Definition: impeller.cc:904
impeller::interop::ImpellerPathBuilderMoveTo
IMPELLER_EXTERN_C void ImpellerPathBuilderMoveTo(ImpellerPathBuilder builder, const ImpellerPoint *location)
Definition: impeller.cc:221
impeller::interop::GetVersionAsString
static std::string GetVersionAsString(uint32_t version)
Definition: impeller.cc:58
ImpellerProcAddressCallback
void *IMPELLER_NULLABLE(* ImpellerProcAddressCallback)(const char *IMPELLER_NONNULL proc_name, void *IMPELLER_NULLABLE user_data)
Definition: impeller.h:104
impeller::interop::ImpellerParagraphStyleNew
IMPELLER_EXTERN_C ImpellerParagraphStyle ImpellerParagraphStyleNew()
Definition: impeller.cc:889
impeller::TextureDescriptor::compression_type
CompressionType compression_type
Definition: texture_descriptor.h:46
impeller::interop::ImageFilter::MakeDilate
static ScopedObject< ImageFilter > MakeDilate(Scalar x_radius, Scalar y_radius)
Definition: image_filter.cc:24
impeller::interop::ImageFilter::MakeBlur
static ScopedObject< ImageFilter > MakeBlur(Scalar x_sigma, Scalar y_sigma, flutter::DlTileMode tile_mode)
Definition: image_filter.cc:14
impeller::interop::ImpellerPaintRelease
IMPELLER_EXTERN_C void ImpellerPaintRelease(ImpellerPaint paint)
Definition: impeller.cc:343
ImpellerColorMatrix
Definition: impeller.h:260
impeller::interop::ImpellerParagraphBuilderBuildParagraphNew
IMPELLER_EXTERN_C ImpellerParagraph ImpellerParagraphBuilderBuildParagraphNew(ImpellerParagraphBuilder paragraph_builder, float width)
Definition: impeller.cc:1033
impeller::interop::ImpellerTypographyContextRelease
IMPELLER_EXTERN_C void ImpellerTypographyContextRelease(ImpellerTypographyContext context)
Definition: impeller.cc:1104
ImpellerTextAlignment
ImpellerTextAlignment
Definition: impeller.h:217
IMPELLER_VERSION_GET_MAJOR
#define IMPELLER_VERSION_GET_MAJOR(version)
Definition: impeller.h:68
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
ImpellerTextureDescriptor::size
ImpellerISize size
Definition: impeller.h:281
context.h
object.h
mask_filter.h
impeller::interop::ImageFilter::MakeCompose
static ScopedObject< ImageFilter > MakeCompose(const ImageFilter &outer, const ImageFilter &inner)
Definition: image_filter.cc:53
impeller::interop::ImpellerImageFilterCreateComposeNew
IMPELLER_EXTERN_C ImpellerImageFilter ImpellerImageFilterCreateComposeNew(ImpellerImageFilter outer, ImpellerImageFilter inner)
Definition: impeller.cc:863
impeller::interop::ImpellerColorFilterRelease
IMPELLER_EXTERN_C void ImpellerColorFilterRelease(ImpellerColorFilter color_filter)
Definition: impeller.cc:787
impeller::interop::ImpellerPaintNew
IMPELLER_EXTERN_C ImpellerPaint ImpellerPaintNew()
Definition: impeller.cc:333
impeller::interop::ImpellerParagraphGetHeight
IMPELLER_EXTERN_C float ImpellerParagraphGetHeight(ImpellerParagraph paragraph)
Definition: impeller.cc:1055
impeller::interop::ImpellerTypographyContextRetain
IMPELLER_EXTERN_C void ImpellerTypographyContextRetain(ImpellerTypographyContext context)
Definition: impeller.cc:1099