 |
Flutter Impeller
|
|
#include <dl_dispatcher.h>
|
| DlDispatcher () |
|
| DlDispatcher (Rect cull_rect) |
|
| DlDispatcher (IRect cull_rect) |
|
| ~DlDispatcher () |
|
Picture | EndRecordingAsPicture () |
|
bool | PrefersImpellerPaths () const override |
|
void | setAntiAlias (bool aa) override |
|
void | setDrawStyle (flutter::DlDrawStyle style) override |
|
void | setColor (flutter::DlColor color) override |
|
void | setStrokeWidth (SkScalar width) override |
|
void | setStrokeMiter (SkScalar limit) override |
|
void | setStrokeCap (flutter::DlStrokeCap cap) override |
|
void | setStrokeJoin (flutter::DlStrokeJoin join) override |
|
void | setColorSource (const flutter::DlColorSource *source) override |
|
void | setColorFilter (const flutter::DlColorFilter *filter) override |
|
void | setInvertColors (bool invert) override |
|
void | setBlendMode (flutter::DlBlendMode mode) override |
|
void | setPathEffect (const flutter::DlPathEffect *effect) override |
|
void | setMaskFilter (const flutter::DlMaskFilter *filter) override |
|
void | setImageFilter (const flutter::DlImageFilter *filter) override |
|
void | save () override |
|
void | saveLayer (const SkRect &bounds, const flutter::SaveLayerOptions options, const flutter::DlImageFilter *backdrop) override |
|
void | restore () override |
|
void | translate (SkScalar tx, SkScalar ty) override |
|
void | scale (SkScalar sx, SkScalar sy) override |
|
void | rotate (SkScalar degrees) override |
|
void | skew (SkScalar sx, SkScalar sy) override |
|
void | transform2DAffine (SkScalar mxx, SkScalar mxy, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myt) override |
|
void | transformFullPerspective (SkScalar mxx, SkScalar mxy, SkScalar mxz, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myz, SkScalar myt, SkScalar mzx, SkScalar mzy, SkScalar mzz, SkScalar mzt, SkScalar mwx, SkScalar mwy, SkScalar mwz, SkScalar mwt) override |
|
void | transformReset () override |
|
void | clipRect (const SkRect &rect, ClipOp clip_op, bool is_aa) override |
|
void | clipRRect (const SkRRect &rrect, ClipOp clip_op, bool is_aa) override |
|
void | clipPath (const SkPath &path, ClipOp clip_op, bool is_aa) override |
|
void | clipPath (const CacheablePath &cache, ClipOp clip_op, bool is_aa) override |
|
void | drawColor (flutter::DlColor color, flutter::DlBlendMode mode) override |
|
void | drawPaint () override |
|
void | drawLine (const SkPoint &p0, const SkPoint &p1) override |
|
void | drawRect (const SkRect &rect) override |
|
void | drawOval (const SkRect &bounds) override |
|
void | drawCircle (const SkPoint ¢er, SkScalar radius) override |
|
void | drawRRect (const SkRRect &rrect) override |
|
void | drawDRRect (const SkRRect &outer, const SkRRect &inner) override |
|
void | drawPath (const SkPath &path) override |
|
void | drawPath (const CacheablePath &cache) override |
|
void | drawArc (const SkRect &oval_bounds, SkScalar start_degrees, SkScalar sweep_degrees, bool use_center) override |
|
void | drawPoints (PointMode mode, uint32_t count, const SkPoint points[]) override |
|
void | drawVertices (const flutter::DlVertices *vertices, flutter::DlBlendMode dl_mode) override |
|
void | drawImage (const sk_sp< flutter::DlImage > image, const SkPoint point, flutter::DlImageSampling sampling, bool render_with_attributes) override |
|
void | drawImageRect (const sk_sp< flutter::DlImage > image, const SkRect &src, const SkRect &dst, flutter::DlImageSampling sampling, bool render_with_attributes, SrcRectConstraint constraint) override |
|
void | drawImageNine (const sk_sp< flutter::DlImage > image, const SkIRect ¢er, const SkRect &dst, flutter::DlFilterMode filter, bool render_with_attributes) override |
|
void | drawAtlas (const sk_sp< flutter::DlImage > atlas, const SkRSXform xform[], const SkRect tex[], const flutter::DlColor colors[], int count, flutter::DlBlendMode mode, flutter::DlImageSampling sampling, const SkRect *cull_rect, bool render_with_attributes) override |
|
void | drawDisplayList (const sk_sp< flutter::DisplayList > display_list, SkScalar opacity) override |
|
void | drawTextBlob (const sk_sp< SkTextBlob > blob, SkScalar x, SkScalar y) override |
|
void | drawTextFrame (const std::shared_ptr< impeller::TextFrame > &text_frame, SkScalar x, SkScalar y) override |
|
void | drawShadow (const SkPath &path, const flutter::DlColor color, const SkScalar elevation, bool transparent_occluder, SkScalar dpr) override |
|
void | drawShadow (const CacheablePath &cache, const flutter::DlColor color, const SkScalar elevation, bool transparent_occluder, SkScalar dpr) override |
|
Definition at line 14 of file dl_dispatcher.h.
◆ DlDispatcher() [1/3]
impeller::DlDispatcher::DlDispatcher |
( |
| ) |
|
|
default |
◆ DlDispatcher() [2/3]
impeller::DlDispatcher::DlDispatcher |
( |
Rect |
cull_rect | ) |
|
|
explicit |
◆ DlDispatcher() [3/3]
impeller::DlDispatcher::DlDispatcher |
( |
IRect |
cull_rect | ) |
|
|
explicit |
◆ ~DlDispatcher()
impeller::DlDispatcher::~DlDispatcher |
( |
| ) |
|
|
default |
◆ clipPath() [1/2]
void impeller::DlDispatcher::clipPath |
( |
const CacheablePath & |
cache, |
|
|
ClipOp |
clip_op, |
|
|
bool |
is_aa |
|
) |
| |
|
override |
◆ clipPath() [2/2]
void impeller::DlDispatcher::clipPath |
( |
const SkPath & |
path, |
|
|
ClipOp |
clip_op, |
|
|
bool |
is_aa |
|
) |
| |
|
override |
◆ clipRect()
void impeller::DlDispatcher::clipRect |
( |
const SkRect & |
rect, |
|
|
ClipOp |
clip_op, |
|
|
bool |
is_aa |
|
) |
| |
|
override |
◆ clipRRect()
void impeller::DlDispatcher::clipRRect |
( |
const SkRRect & |
rrect, |
|
|
ClipOp |
clip_op, |
|
|
bool |
is_aa |
|
) |
| |
|
override |
◆ drawArc()
void impeller::DlDispatcher::drawArc |
( |
const SkRect & |
oval_bounds, |
|
|
SkScalar |
start_degrees, |
|
|
SkScalar |
sweep_degrees, |
|
|
bool |
use_center |
|
) |
| |
|
override |
◆ drawAtlas()
void impeller::DlDispatcher::drawAtlas |
( |
const sk_sp< flutter::DlImage > |
atlas, |
|
|
const SkRSXform |
xform[], |
|
|
const SkRect |
tex[], |
|
|
const flutter::DlColor |
colors[], |
|
|
int |
count, |
|
|
flutter::DlBlendMode |
mode, |
|
|
flutter::DlImageSampling |
sampling, |
|
|
const SkRect * |
cull_rect, |
|
|
bool |
render_with_attributes |
|
) |
| |
|
override |
◆ drawCircle()
void impeller::DlDispatcher::drawCircle |
( |
const SkPoint & |
center, |
|
|
SkScalar |
radius |
|
) |
| |
|
override |
◆ drawColor()
void impeller::DlDispatcher::drawColor |
( |
flutter::DlColor |
color, |
|
|
flutter::DlBlendMode |
mode |
|
) |
| |
|
override |
◆ drawDisplayList()
void impeller::DlDispatcher::drawDisplayList |
( |
const sk_sp< flutter::DisplayList > |
display_list, |
|
|
SkScalar |
opacity |
|
) |
| |
|
override |
Definition at line 1005 of file dl_dispatcher.cc.
1009 Paint saved_paint = paint_;
1010 Matrix saved_initial_matrix = initial_matrix_;
1029 if (opacity < SK_Scalar1) {
1031 save_paint.color = Color(0, 0, 0, opacity);
1037 if (display_list->has_rtree() && !initial_matrix_.
HasPerspective()) {
1044 if (cull_bounds.has_value()) {
1045 Rect cull_rect = cull_bounds.value();
1046 display_list->Dispatch(
1047 *
this, SkRect::MakeLTRB(cull_rect.GetLeft(), cull_rect.GetTop(),
1048 cull_rect.GetRight(), cull_rect.GetBottom()));
1050 display_list->Dispatch(*
this);
1053 display_list->Dispatch(*
this);
1059 initial_matrix_ = saved_initial_matrix;
1060 paint_ = saved_paint;
References impeller::Paint::color, impeller::TRect< T >::GetBottom(), impeller::Canvas::GetCurrentLocalCullingBounds(), impeller::Canvas::GetCurrentTransform(), impeller::TRect< T >::GetLeft(), impeller::TRect< T >::GetRight(), impeller::Canvas::GetSaveCount(), impeller::TRect< T >::GetTop(), impeller::Matrix::HasPerspective(), impeller::Canvas::RestoreToCount(), impeller::Canvas::Save(), and impeller::Canvas::SaveLayer().
Referenced by impeller::testing::TEST_P().
◆ drawDRRect()
void impeller::DlDispatcher::drawDRRect |
( |
const SkRRect & |
outer, |
|
|
const SkRRect & |
inner |
|
) |
| |
|
override |
◆ drawImage()
void impeller::DlDispatcher::drawImage |
( |
const sk_sp< flutter::DlImage > |
image, |
|
|
const SkPoint |
point, |
|
|
flutter::DlImageSampling |
sampling, |
|
|
bool |
render_with_attributes |
|
) |
| |
|
override |
Definition at line 928 of file dl_dispatcher.cc.
936 auto texture = image->impeller_texture();
941 const auto size = texture->GetSize();
942 const auto src = SkRect::MakeWH(size.width, size.height);
944 SkRect::MakeXYWH(point.fX, point.fY, size.width, size.height);
950 render_with_attributes,
951 SrcRectConstraint::kStrict
References drawImageRect().
◆ drawImageNine()
void impeller::DlDispatcher::drawImageNine |
( |
const sk_sp< flutter::DlImage > |
image, |
|
|
const SkIRect & |
center, |
|
|
const SkRect & |
dst, |
|
|
flutter::DlFilterMode |
filter, |
|
|
bool |
render_with_attributes |
|
) |
| |
|
override |
◆ drawImageRect()
void impeller::DlDispatcher::drawImageRect |
( |
const sk_sp< flutter::DlImage > |
image, |
|
|
const SkRect & |
src, |
|
|
const SkRect & |
dst, |
|
|
flutter::DlImageSampling |
sampling, |
|
|
bool |
render_with_attributes, |
|
|
SrcRectConstraint |
constraint = SrcRectConstraint::kFast |
|
) |
| |
|
override |
◆ drawLine()
void impeller::DlDispatcher::drawLine |
( |
const SkPoint & |
p0, |
|
|
const SkPoint & |
p1 |
|
) |
| |
|
override |
◆ drawOval()
void impeller::DlDispatcher::drawOval |
( |
const SkRect & |
bounds | ) |
|
|
override |
◆ drawPaint()
void impeller::DlDispatcher::drawPaint |
( |
| ) |
|
|
override |
◆ drawPath() [1/2]
void impeller::DlDispatcher::drawPath |
( |
const CacheablePath & |
cache | ) |
|
|
override |
Definition at line 840 of file dl_dispatcher.cc.
841 SimplifyOrDrawPath(canvas_, cache, paint_);
◆ drawPath() [2/2]
void impeller::DlDispatcher::drawPath |
( |
const SkPath & |
path | ) |
|
|
override |
◆ drawPoints()
void impeller::DlDispatcher::drawPoints |
( |
PointMode |
mode, |
|
|
uint32_t |
count, |
|
|
const SkPoint |
points[] |
|
) |
| |
|
override |
◆ drawRect()
void impeller::DlDispatcher::drawRect |
( |
const SkRect & |
rect | ) |
|
|
override |
◆ drawRRect()
void impeller::DlDispatcher::drawRRect |
( |
const SkRRect & |
rrect | ) |
|
|
override |
◆ drawShadow() [1/2]
void impeller::DlDispatcher::drawShadow |
( |
const CacheablePath & |
cache, |
|
|
const flutter::DlColor |
color, |
|
|
const SkScalar |
elevation, |
|
|
bool |
transparent_occluder, |
|
|
SkScalar |
dpr |
|
) |
| |
|
override |
Definition at line 1091 of file dl_dispatcher.cc.
1097 spot_color.alpha *= 0.25;
1102 std::max(std::max(spot_color.red, spot_color.green), spot_color.blue);
1104 std::min(std::min(spot_color.red, spot_color.green), spot_color.blue);
1105 Scalar luminance = (min + max) * 0.5;
1108 (2.6f + (-2.66667f + 1.06667f * spot_color.alpha) * spot_color.alpha) *
1111 (3.544762f + (-4.891428f + 2.3466f * luminance) * luminance) *
1113 color_alpha = std::clamp(alpha_adjust * color_alpha, 0.0f, 1.0f);
1116 std::clamp(spot_color.alpha * (1 - 0.4f * luminance), 0.0f, 1.0f);
1118 Scalar color_scale = color_alpha * (1 - greyscale_alpha);
1119 Scalar tonal_alpha = color_scale + greyscale_alpha;
1120 Scalar unpremul_scale = tonal_alpha != 0 ? color_scale / tonal_alpha : 0;
1121 spot_color = Color(unpremul_scale * spot_color.red,
1122 unpremul_scale * spot_color.green,
1123 unpremul_scale * spot_color.blue, tonal_alpha);
1126 Vector3 light_position(0, -1, 1);
1127 Scalar occluder_z = dpr * elevation;
1129 constexpr
Scalar kLightRadius = 800 / 600;
1133 paint.color = spot_color;
1134 paint.mask_blur_descriptor = Paint::MaskBlurDescriptor{
1136 .sigma = Radius{kLightRadius * occluder_z /
1144 SimplifyOrDrawPath(canvas_, cache, paint);
References impeller::Color::alpha, impeller::Color::blue, impeller::Paint::color, impeller::Canvas::GetCurrentTransform(), impeller::Matrix::GetScale(), impeller::Color::green, impeller::Paint::kFill, impeller::FilterContents::kNormal, impeller::Matrix::MakeTranslation(), impeller::Paint::mask_blur_descriptor, impeller::Canvas::PreConcat(), impeller::Color::red, impeller::Canvas::Restore(), impeller::Canvas::Save(), impeller::Paint::MaskBlurDescriptor::style, impeller::Paint::style, impeller::skia_conversions::ToColor(), and impeller::Vector3::y.
◆ drawShadow() [2/2]
void impeller::DlDispatcher::drawShadow |
( |
const SkPath & |
path, |
|
|
const flutter::DlColor |
color, |
|
|
const SkScalar |
elevation, |
|
|
bool |
transparent_occluder, |
|
|
SkScalar |
dpr |
|
) |
| |
|
override |
◆ drawTextBlob()
void impeller::DlDispatcher::drawTextBlob |
( |
const sk_sp< SkTextBlob > |
blob, |
|
|
SkScalar |
x, |
|
|
SkScalar |
y |
|
) |
| |
|
override |
◆ drawTextFrame()
void impeller::DlDispatcher::drawTextFrame |
( |
const std::shared_ptr< impeller::TextFrame > & |
text_frame, |
|
|
SkScalar |
x, |
|
|
SkScalar |
y |
|
) |
| |
|
override |
◆ drawVertices()
void impeller::DlDispatcher::drawVertices |
( |
const flutter::DlVertices * |
vertices, |
|
|
flutter::DlBlendMode |
dl_mode |
|
) |
| |
|
override |
◆ EndRecordingAsPicture()
Picture impeller::DlDispatcher::EndRecordingAsPicture |
( |
| ) |
|
◆ PrefersImpellerPaths()
bool impeller::DlDispatcher::PrefersImpellerPaths |
( |
| ) |
const |
|
inlineoverride |
◆ restore()
void impeller::DlDispatcher::restore |
( |
| ) |
|
|
override |
◆ rotate()
void impeller::DlDispatcher::rotate |
( |
SkScalar |
degrees | ) |
|
|
override |
◆ save()
void impeller::DlDispatcher::save |
( |
| ) |
|
|
override |
◆ saveLayer()
void impeller::DlDispatcher::saveLayer |
( |
const SkRect & |
bounds, |
|
|
const flutter::SaveLayerOptions |
options, |
|
|
const flutter::DlImageFilter * |
backdrop |
|
) |
| |
|
override |
◆ scale()
void impeller::DlDispatcher::scale |
( |
SkScalar |
sx, |
|
|
SkScalar |
sy |
|
) |
| |
|
override |
◆ setAntiAlias()
void impeller::DlDispatcher::setAntiAlias |
( |
bool |
aa | ) |
|
|
override |
◆ setBlendMode()
void impeller::DlDispatcher::setBlendMode |
( |
flutter::DlBlendMode |
mode | ) |
|
|
override |
◆ setColor()
void impeller::DlDispatcher::setColor |
( |
flutter::DlColor |
color | ) |
|
|
override |
◆ setColorFilter()
void impeller::DlDispatcher::setColorFilter |
( |
const flutter::DlColorFilter * |
filter | ) |
|
|
override |
◆ setColorSource()
void impeller::DlDispatcher::setColorSource |
( |
const flutter::DlColorSource * |
source | ) |
|
|
override |
Definition at line 286 of file dl_dispatcher.cc.
294 if (!type.has_value()) {
295 FML_LOG(ERROR) <<
"Requested ColorSourceType::kUnknown";
300 switch (type.value()) {
302 const flutter::DlColorColorSource* color = source->asColor();
310 const flutter::DlLinearGradientColorSource* linear =
311 source->asLinearGradient();
315 std::vector<Color> colors;
316 std::vector<float> stops;
319 auto tile_mode =
ToTileMode(linear->tile_mode());
320 auto matrix =
ToMatrix(linear->matrix());
323 start_point, end_point, std::move(colors), std::move(stops),
328 const flutter::DlConicalGradientColorSource* conical_gradient =
329 source->asConicalGradient();
330 FML_DCHECK(conical_gradient);
332 SkScalar radius = conical_gradient->end_radius();
335 SkScalar focus_radius = conical_gradient->start_radius();
336 std::vector<Color> colors;
337 std::vector<float> stops;
340 auto tile_mode =
ToTileMode(conical_gradient->tile_mode());
341 auto matrix =
ToMatrix(conical_gradient->matrix());
344 center, radius, std::move(colors), std::move(stops), focus_center,
345 focus_radius, tile_mode, matrix);
349 const flutter::DlRadialGradientColorSource* radialGradient =
350 source->asRadialGradient();
351 FML_DCHECK(radialGradient);
353 auto radius = radialGradient->radius();
354 std::vector<Color> colors;
355 std::vector<float> stops;
358 auto tile_mode =
ToTileMode(radialGradient->tile_mode());
359 auto matrix =
ToMatrix(radialGradient->matrix());
362 std::move(stops), tile_mode, matrix);
366 const flutter::DlSweepGradientColorSource* sweepGradient =
367 source->asSweepGradient();
368 FML_DCHECK(sweepGradient);
371 auto start_angle = Degrees(sweepGradient->start());
372 auto end_angle = Degrees(sweepGradient->end());
373 std::vector<Color> colors;
374 std::vector<float> stops;
377 auto tile_mode =
ToTileMode(sweepGradient->tile_mode());
378 auto matrix =
ToMatrix(sweepGradient->matrix());
380 center, start_angle, end_angle, std::move(colors), std::move(stops),
385 const flutter::DlImageColorSource* image_color_source = source->asImage();
386 FML_DCHECK(image_color_source &&
387 image_color_source->image()->impeller_texture());
388 auto texture = image_color_source->image()->impeller_texture();
389 auto x_tile_mode =
ToTileMode(image_color_source->horizontal_tile_mode());
390 auto y_tile_mode =
ToTileMode(image_color_source->vertical_tile_mode());
392 auto matrix =
ToMatrix(image_color_source->matrix());
394 y_tile_mode, desc, matrix);
398 const flutter::DlRuntimeEffectColorSource* runtime_effect_color_source =
399 source->asRuntimeEffect();
401 runtime_effect_color_source->runtime_effect()->runtime_stage();
402 auto uniform_data = runtime_effect_color_source->uniform_data();
403 auto samplers = runtime_effect_color_source->samplers();
405 std::vector<RuntimeEffectContents::TextureInput> texture_inputs;
407 for (
auto& sampler : samplers) {
408 if (sampler ==
nullptr) {
411 auto* image = sampler->asImage();
412 if (!sampler->asImage()) {
416 FML_DCHECK(image->image()->impeller_texture());
417 texture_inputs.push_back({
419 .texture = image->image()->impeller_texture(),
424 runtime_stage, uniform_data, texture_inputs);
428 #ifdef IMPELLER_ENABLE_3D
429 const flutter::DlSceneColorSource* scene_color_source = source->asScene();
430 std::shared_ptr<scene::Node> scene_node =
431 scene_color_source->scene_node();
432 Matrix camera_transform = scene_color_source->camera_matrix();
435 ColorSource::MakeScene(scene_node, camera_transform);
436 #else // IMPELLER_ENABLE_3D
437 FML_LOG(ERROR) <<
"ColorSourceType::kScene can only be used if Impeller "
439 #endif // IMPELLER_ENABLE_3D
References impeller::Paint::color_source, impeller::skia_conversions::ConvertStops(), impeller::ColorSource::kColor, impeller::ColorSource::kConicalGradient, impeller::ColorSource::kImage, impeller::ColorSource::kLinearGradient, impeller::ColorSource::kRadialGradient, impeller::ColorSource::kRuntimeEffect, impeller::ColorSource::kScene, impeller::ColorSource::kSweepGradient, impeller::ColorSource::MakeColor(), impeller::ColorSource::MakeConicalGradient(), impeller::ColorSource::MakeImage(), impeller::ColorSource::MakeLinearGradient(), impeller::ColorSource::MakeRadialGradient(), impeller::ColorSource::MakeRuntimeEffect(), impeller::ColorSource::MakeSweepGradient(), setColor(), impeller::ToColorSourceType(), impeller::ToMatrix(), impeller::skia_conversions::ToPoint(), impeller::ToSamplerDescriptor(), impeller::ToTileMode(), and UNIMPLEMENTED.
◆ setDrawStyle()
void impeller::DlDispatcher::setDrawStyle |
( |
flutter::DlDrawStyle |
style | ) |
|
|
override |
◆ setImageFilter()
void impeller::DlDispatcher::setImageFilter |
( |
const flutter::DlImageFilter * |
filter | ) |
|
|
override |
◆ setInvertColors()
void impeller::DlDispatcher::setInvertColors |
( |
bool |
invert | ) |
|
|
override |
◆ setMaskFilter()
void impeller::DlDispatcher::setMaskFilter |
( |
const flutter::DlMaskFilter * |
filter | ) |
|
|
override |
◆ setPathEffect()
void impeller::DlDispatcher::setPathEffect |
( |
const flutter::DlPathEffect * |
effect | ) |
|
|
override |
◆ setStrokeCap()
void impeller::DlDispatcher::setStrokeCap |
( |
flutter::DlStrokeCap |
cap | ) |
|
|
override |
◆ setStrokeJoin()
void impeller::DlDispatcher::setStrokeJoin |
( |
flutter::DlStrokeJoin |
join | ) |
|
|
override |
◆ setStrokeMiter()
void impeller::DlDispatcher::setStrokeMiter |
( |
SkScalar |
limit | ) |
|
|
override |
◆ setStrokeWidth()
void impeller::DlDispatcher::setStrokeWidth |
( |
SkScalar |
width | ) |
|
|
override |
◆ skew()
void impeller::DlDispatcher::skew |
( |
SkScalar |
sx, |
|
|
SkScalar |
sy |
|
) |
| |
|
override |
◆ transform2DAffine()
void impeller::DlDispatcher::transform2DAffine |
( |
SkScalar |
mxx, |
|
|
SkScalar |
mxy, |
|
|
SkScalar |
mxt, |
|
|
SkScalar |
myx, |
|
|
SkScalar |
myy, |
|
|
SkScalar |
myt |
|
) |
| |
|
override |
◆ transformFullPerspective()
void impeller::DlDispatcher::transformFullPerspective |
( |
SkScalar |
mxx, |
|
|
SkScalar |
mxy, |
|
|
SkScalar |
mxz, |
|
|
SkScalar |
mxt, |
|
|
SkScalar |
myx, |
|
|
SkScalar |
myy, |
|
|
SkScalar |
myz, |
|
|
SkScalar |
myt, |
|
|
SkScalar |
mzx, |
|
|
SkScalar |
mzy, |
|
|
SkScalar |
mzz, |
|
|
SkScalar |
mzt, |
|
|
SkScalar |
mwx, |
|
|
SkScalar |
mwy, |
|
|
SkScalar |
mwz, |
|
|
SkScalar |
mwt |
|
) |
| |
|
override |
◆ transformReset()
void impeller::DlDispatcher::transformReset |
( |
| ) |
|
|
override |
◆ translate()
void impeller::DlDispatcher::translate |
( |
SkScalar |
tx, |
|
|
SkScalar |
ty |
|
) |
| |
|
override |
The documentation for this class was generated from the following files:
constexpr bool HasPerspective() const
void DrawPoints(std::vector< Point > points, Scalar radius, const Paint &paint, PointStyle point_style)
Picture EndRecordingAsPicture()
void ClipOval(const Rect &bounds, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
static Entity::ClipOperation ToClipOperation(flutter::DlCanvas::ClipOp clip_op)
void DrawRRect(const Rect &rect, const Size &corner_radii, const Paint &paint)
void drawImageRect(const sk_sp< flutter::DlImage > image, const SkRect &src, const SkRect &dst, flutter::DlImageSampling sampling, bool render_with_attributes, SrcRectConstraint constraint) override
std::vector< Point > ToPoints(const SkPoint points[], int count)
void RestoreToCount(size_t count)
void DrawImageRect(const std::shared_ptr< Image > &image, Rect source, Rect dest, const Paint &paint, SamplerDescriptor sampler={}, SourceRectConstraint src_rect_constraint=SourceRectConstraint::kFast)
@ kMayClipContents
The caller claims the bounds are a subset of an estimate of the reasonably tight bounds but likely cl...
void ConvertStops(const flutter::DlGradientColorSourceBase *gradient, std::vector< Color > &colors, std::vector< float > &stops)
Convert display list colors + stops into impeller colors and stops, taking care to ensure that the st...
static ColorSource MakeLinearGradient(Point start_point, Point end_point, std::vector< Color > colors, std::vector< Scalar > stops, Entity::TileMode tile_mode, Matrix effect_transform)
Size ToSize(const SkPoint &point)
void Skew(Scalar sx, Scalar sy)
static std::shared_ptr< ImageFilter > ToImageFilter(const flutter::DlImageFilter *filter)
void DrawTextFrame(const std::shared_ptr< TextFrame > &text_frame, Point position, const Paint &paint)
@ kRound
Points are drawn as squares.
void DrawVertices(const std::shared_ptr< VerticesGeometry > &vertices, BlendMode blend_mode, const Paint &paint)
void transformFullPerspective(SkScalar mxx, SkScalar mxy, SkScalar mxz, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myz, SkScalar myt, SkScalar mzx, SkScalar mzy, SkScalar mzz, SkScalar mzt, SkScalar mwx, SkScalar mwy, SkScalar mwz, SkScalar mwt) override
std::vector< Rect > ToRects(const SkRect tex[], int count)
std::shared_ptr< impeller::VerticesGeometry > MakeVertices(const flutter::DlVertices *vertices)
Color ToColor(const flutter::DlColor &color)
static ColorSource MakeSweepGradient(Point center, Degrees start_angle, Degrees end_angle, std::vector< Color > colors, std::vector< Scalar > stops, Entity::TileMode tile_mode, Matrix effect_transform)
static ColorSource MakeColor()
static ColorSource MakeImage(std::shared_ptr< Texture > texture, Entity::TileMode x_tile_mode, Entity::TileMode y_tile_mode, SamplerDescriptor sampler_descriptor, Matrix effect_transform)
@ kNormal
Blurred inside and outside.
static constexpr Matrix MakeTranslation(const Vector3 &t)
void DrawLine(const Point &p0, const Point &p1, const Paint &paint)
void DrawRect(const Rect &rect, const Paint &paint)
const Matrix & GetCurrentTransform() const
static Entity::TileMode ToTileMode(flutter::DlTileMode tile_mode)
void SaveLayer(const Paint &paint, std::optional< Rect > bounds=std::nullopt, const std::shared_ptr< ImageFilter > &backdrop_filter=nullptr, ContentBoundsPromise bounds_promise=ContentBoundsPromise::kUnknown)
static Matrix ToMatrix(const SkMatrix &m)
static std::vector< Color > ToColors(const flutter::DlColor colors[], int count)
Rect ToRect(const SkRect &rect)
std::shared_ptr< ColorFilter > color_filter
@ kSquare
Points are drawn as circles.
void Scale(const Vector2 &scale)
constexpr Vector3 GetScale() const
static ColorSource MakeConicalGradient(Point center, Scalar radius, std::vector< Color > colors, std::vector< Scalar > stops, Point focus_center, Scalar focus_radius, Entity::TileMode tile_mode, Matrix effect_transform)
static std::optional< ColorSource::Type > ToColorSourceType(flutter::DlColorSourceType type)
void DrawCircle(const Point ¢er, Scalar radius, const Paint &paint)
static Paint::Style ToStyle(flutter::DlDrawStyle style)
void DrawAtlas(const std::shared_ptr< Image > &atlas, std::vector< Matrix > transforms, std::vector< Rect > texture_coordinates, std::vector< Color > colors, BlendMode blend_mode, SamplerDescriptor sampler, std::optional< Rect > cull_rect, const Paint &paint)
void DrawPath(const Path &path, const Paint &paint)
void DrawPaint(const Paint &paint)
static FilterContents::BlurStyle ToBlurStyle(flutter::DlBlurStyle blur_style)
size_t GetSaveCount() const
Point ToPoint(const SkPoint &point)
static ColorSource MakeRadialGradient(Point center, Scalar radius, std::vector< Color > colors, std::vector< Scalar > stops, Entity::TileMode tile_mode, Matrix effect_transform)
void ClipRRect(const Rect &rect, const Size &corner_radii, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
void PreConcat(const Matrix &transform)
static ColorSource MakeRuntimeEffect(std::shared_ptr< RuntimeStage > runtime_stage, std::shared_ptr< std::vector< uint8_t >> uniform_data, std::vector< RuntimeEffectContents::TextureInput > texture_inputs)
void DrawOval(const Rect &rect, const Paint &paint)
void Rotate(Radians radians)
void Transform(const Matrix &transform)
std::vector< Matrix > ToRSXForms(const SkRSXform xform[], int count)
void setColor(flutter::DlColor color) override
const std::optional< Rect > GetCurrentLocalCullingBounds() const
static BlendMode ToBlendMode(flutter::DlBlendMode mode)
void ClipRect(const Rect &rect, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
static impeller::SamplerDescriptor ToSamplerDescriptor(const flutter::DlImageSampling options)
constexpr static TRect MakeLTRB(Type left, Type top, Type right, Type bottom)
static std::shared_ptr< ColorFilter > ToColorFilter(const flutter::DlColorFilter *filter)
@ kContainsContents
The caller claims the bounds are a reasonably tight estimate of the coverage of the contents and shou...
std::optional< MaskBlurDescriptor > mask_blur_descriptor
Path ToPath(const SkPath &path, Point shift)
std::shared_ptr< ImageFilter > image_filter
void Translate(const Vector3 &offset)
void ClipPath(const Path &path, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)