Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Enumerations | Functions
dl_op_records.h File Reference
#include "flutter/display_list/display_list.h"
#include "flutter/display_list/dl_blend_mode.h"
#include "flutter/display_list/dl_op_receiver.h"
#include "flutter/display_list/dl_sampling_options.h"
#include "flutter/display_list/effects/dl_color_source.h"
#include "flutter/fml/macros.h"
#include "flutter/impeller/geometry/path.h"
#include "flutter/impeller/typographer/text_frame.h"
#include "third_party/skia/include/core/SkRSXform.h"

Go to the source code of this file.

Classes

struct  flutter::DispatchContext
 
struct  flutter::DispatchContext::SaveInfo
 
struct  flutter::DLOp
 
struct  flutter::SetStyleOp
 
struct  flutter::SetStrokeWidthOp
 
struct  flutter::SetStrokeMiterOp
 
struct  flutter::SetColorOp
 
struct  flutter::SetBlendModeOp
 
struct  flutter::SetImageColorSourceOp
 
struct  flutter::SetRuntimeEffectColorSourceOp
 
struct  flutter::SetSharedImageFilterOp
 
struct  flutter::SaveOpBase
 
struct  flutter::SaveOp
 
struct  flutter::SaveLayerOpBase
 
struct  flutter::SaveLayerOp
 
struct  flutter::SaveLayerBackdropOp
 
struct  flutter::RestoreOp
 
struct  flutter::TransformClipOpBase
 
struct  flutter::TranslateOp
 
struct  flutter::ScaleOp
 
struct  flutter::RotateOp
 
struct  flutter::SkewOp
 
struct  flutter::Transform2DAffineOp
 
struct  flutter::TransformFullPerspectiveOp
 
struct  flutter::TransformResetOp
 
struct  flutter::DrawOpBase
 
struct  flutter::DrawPaintOp
 
struct  flutter::DrawColorOp
 
struct  flutter::DrawPathOp
 
struct  flutter::DrawDashedLineOp
 
struct  flutter::DrawArcOp
 
struct  flutter::DrawVerticesOp
 
struct  flutter::DrawImageRectOp
 
struct  flutter::DrawAtlasBaseOp
 
struct  flutter::DrawAtlasOp
 
struct  flutter::DrawAtlasCulledOp
 
struct  flutter::DrawDisplayListOp
 
struct  flutter::DrawTextBlobOp
 
struct  flutter::DrawTextFrameOp
 

Namespaces

namespace  flutter
 

Macros

#define DEFINE_SET_BOOL_OP(name)
 
#define DEFINE_SET_ENUM_OP(name)
 
#define DEFINE_SET_CLEAR_DLATTR_OP(name, sk_name, field)
 
#define DEFINE_CLIP_SHAPE_OP(shapetype, clipop)
 
#define DEFINE_CLIP_PATH_OP(clipop)
 
#define DEFINE_DRAW_1ARG_OP(op_name, arg_type, arg_name)
 
#define DEFINE_DRAW_2ARG_OP(op_name, type1, name1, type2, name2)
 
#define DEFINE_DRAW_POINTS_OP(name, mode)
 
#define DEFINE_DRAW_IMAGE_OP(name, with_attributes)
 
#define DEFINE_DRAW_IMAGE_NINE_OP(name, render_with_attributes)
 
#define DEFINE_DRAW_SHADOW_OP(name, transparent_occluder)
 

Enumerations

enum class  flutter::DisplayListCompare { flutter::kUseBulkCompare , flutter::kNotEqual , flutter::kEqual }
 

Functions

 flutter::DEFINE_DRAW_POINTS_OP (Points, kPoints)
 
 flutter::DEFINE_DRAW_POINTS_OP (Lines, kLines)
 
 flutter::DEFINE_DRAW_POINTS_OP (Polygon, kPolygon)
 

Macro Definition Documentation

◆ DEFINE_CLIP_PATH_OP

#define DEFINE_CLIP_PATH_OP (   clipop)
Value:
struct Clip##clipop##PathOp final : TransformClipOpBase { \
static constexpr auto kType = DisplayListOpType::kClip##clipop##Path; \
\
Clip##clipop##PathOp(const SkPath& path, bool is_aa) \
: is_aa(is_aa), cached_path(path) {} \
\
const bool is_aa; \
const DlOpReceiver::CacheablePath cached_path; \
\
void dispatch(DispatchContext& ctx) const { \
if (op_needed(ctx)) { \
if (ctx.receiver.PrefersImpellerPaths()) { \
ctx.receiver.clipPath(cached_path, DlCanvas::ClipOp::k##clipop, \
is_aa); \
} else { \
ctx.receiver.clipPath(cached_path.sk_path, \
DlCanvas::ClipOp::k##clipop, is_aa); \
} \
} \
} \
\
DisplayListCompare equals(const Clip##clipop##PathOp* other) const { \
return is_aa == other->is_aa && cached_path == other->cached_path \
? DisplayListCompare::kEqual \
: DisplayListCompare::kNotEqual; \
} \
};
bool equals(SkDrawable *a, SkDrawable *b)
Definition: SkPath.h:59
Clip
Definition: layer.h:53
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57
CanvasPath Path
Definition: dart_ui.cc:58

Definition at line 592 of file dl_op_records.h.

◆ DEFINE_CLIP_SHAPE_OP

#define DEFINE_CLIP_SHAPE_OP (   shapetype,
  clipop 
)
Value:
struct Clip##clipop##shapetype##Op final : TransformClipOpBase { \
static constexpr auto kType = DisplayListOpType::kClip##clipop##shapetype; \
\
Clip##clipop##shapetype##Op(Sk##shapetype shape, bool is_aa) \
: is_aa(is_aa), shape(shape) {} \
\
const bool is_aa; \
const Sk##shapetype shape; \
\
void dispatch(DispatchContext& ctx) const { \
if (op_needed(ctx)) { \
ctx.receiver.clip##shapetype(shape, DlCanvas::ClipOp::k##clipop, \
is_aa); \
} \
} \
};

Definition at line 569 of file dl_op_records.h.

◆ DEFINE_DRAW_1ARG_OP

#define DEFINE_DRAW_1ARG_OP (   op_name,
  arg_type,
  arg_name 
)
Value:
struct Draw##op_name##Op final : DrawOpBase { \
static constexpr auto kType = DisplayListOpType::kDraw##op_name; \
\
explicit Draw##op_name##Op(arg_type arg_name) : arg_name(arg_name) {} \
\
const arg_type arg_name; \
\
void dispatch(DispatchContext& ctx) const { \
if (op_needed(ctx)) { \
ctx.receiver.draw##op_name(arg_name); \
} \
} \
};
static void Draw(SkCanvas *canvas, const SkRect &rect)

Definition at line 667 of file dl_op_records.h.

◆ DEFINE_DRAW_2ARG_OP

#define DEFINE_DRAW_2ARG_OP (   op_name,
  type1,
  name1,
  type2,
  name2 
)
Value:
struct Draw##op_name##Op final : DrawOpBase { \
static constexpr auto kType = DisplayListOpType::kDraw##op_name; \
\
Draw##op_name##Op(type1 name1, type2 name2) \
: name1(name1), name2(name2) {} \
\
const type1 name1; \
const type2 name2; \
\
void dispatch(DispatchContext& ctx) const { \
if (op_needed(ctx)) { \
ctx.receiver.draw##op_name(name1, name2); \
} \
} \
};

Definition at line 717 of file dl_op_records.h.

◆ DEFINE_DRAW_IMAGE_NINE_OP

#define DEFINE_DRAW_IMAGE_NINE_OP (   name,
  render_with_attributes 
)
Value:
struct name##Op final : DrawOpBase { \
static constexpr auto kType = DisplayListOpType::k##name; \
\
name##Op(const sk_sp<DlImage>& image, \
const SkIRect& center, \
const SkRect& dst, \
: center(center), dst(dst), mode(mode), image(std::move(image)) {} \
\
const SkIRect center; \
const SkRect dst; \
const DlFilterMode mode; \
\
void dispatch(DispatchContext& ctx) const { \
if (op_needed(ctx)) { \
ctx.receiver.drawImageNine(image, center, dst, mode, \
render_with_attributes); \
} \
} \
\
DisplayListCompare equals(const name##Op* other) const { \
return (center == other->center && dst == other->dst && \
mode == other->mode && image->Equals(other->image)) \
? DisplayListCompare::kEqual \
: DisplayListCompare::kNotEqual; \
} \
};
static SkScalar center(float pos0, float pos1)
sk_sp< const SkImage > image
Definition: SkRecords.h:269
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
Definition: switches.h:228
dst
Definition: cp.py:12
Definition: SkRect.h:32

Definition at line 903 of file dl_op_records.h.

◆ DEFINE_DRAW_IMAGE_OP

#define DEFINE_DRAW_IMAGE_OP (   name,
  with_attributes 
)
Value:
struct name##Op final : DrawOpBase { \
static constexpr auto kType = DisplayListOpType::k##name; \
\
name##Op(const sk_sp<DlImage>& image, \
const SkPoint& point, \
: point(point), sampling(sampling), image(std::move(image)) {} \
\
const SkPoint point; \
\
void dispatch(DispatchContext& ctx) const { \
if (op_needed(ctx)) { \
ctx.receiver.drawImage(image, point, sampling, with_attributes); \
} \
} \
\
DisplayListCompare equals(const name##Op* other) const { \
return (point == other->point && sampling == other->sampling && \
image->Equals(other->image)) \
? DisplayListCompare::kEqual \
: DisplayListCompare::kNotEqual; \
} \
};
SkSamplingOptions sampling
Definition: SkRecords.h:337

Definition at line 830 of file dl_op_records.h.

◆ DEFINE_DRAW_POINTS_OP

#define DEFINE_DRAW_POINTS_OP (   name,
  mode 
)
Value:
struct Draw##name##Op final : DrawOpBase { \
static constexpr auto kType = DisplayListOpType::kDraw##name; \
\
explicit Draw##name##Op(uint32_t count) : count(count) {} \
\
const uint32_t count; \
\
void dispatch(DispatchContext& ctx) const { \
if (op_needed(ctx)) { \
const SkPoint* pts = reinterpret_cast<const SkPoint*>(this + 1); \
ctx.receiver.drawPoints(DlCanvas::PointMode::mode, count, pts); \
} \
} \
};
int count
Definition: FontMgrTest.cpp:50

Definition at line 785 of file dl_op_records.h.

◆ DEFINE_DRAW_SHADOW_OP

#define DEFINE_DRAW_SHADOW_OP (   name,
  transparent_occluder 
)

Definition at line 1132 of file dl_op_records.h.

◆ DEFINE_SET_BOOL_OP

#define DEFINE_SET_BOOL_OP (   name)
Value:
struct Set##name##Op final : DLOp { \
static constexpr auto kType = DisplayListOpType::kSet##name; \
\
explicit Set##name##Op(bool value) : value(value) {} \
\
const bool value; \
\
void dispatch(DispatchContext& ctx) const { \
ctx.receiver.set##name(value); \
} \
};
uint8_t value

Definition at line 111 of file dl_op_records.h.

◆ DEFINE_SET_CLEAR_DLATTR_OP

#define DEFINE_SET_CLEAR_DLATTR_OP (   name,
  sk_name,
  field 
)
Value:
struct Clear##name##Op final : DLOp { \
static constexpr auto kType = DisplayListOpType::kClear##name; \
\
Clear##name##Op() {} \
\
void dispatch(DispatchContext& ctx) const { \
ctx.receiver.set##name(nullptr); \
} \
}; \
struct SetPod##name##Op final : DLOp { \
static constexpr auto kType = DisplayListOpType::kSetPod##name; \
\
SetPod##name##Op() {} \
\
void dispatch(DispatchContext& ctx) const { \
const Dl##name* filter = reinterpret_cast<const Dl##name*>(this + 1); \
ctx.receiver.set##name(filter); \
} \
};

Definition at line 210 of file dl_op_records.h.

◆ DEFINE_SET_ENUM_OP

#define DEFINE_SET_ENUM_OP (   name)
Value:
struct SetStroke##name##Op final : DLOp { \
static constexpr auto kType = DisplayListOpType::kSetStroke##name; \
\
explicit SetStroke##name##Op(DlStroke##name value) : value(value) {} \
\
const DlStroke##name value; \
\
void dispatch(DispatchContext& ctx) const { \
ctx.receiver.setStroke##name(value); \
} \
};

Definition at line 128 of file dl_op_records.h.