5#include "flutter/lib/ui/painting/paint.h"
7#include "flutter/display_list/dl_builder.h"
8#include "flutter/fml/logging.h"
9#include "flutter/lib/ui/floating_point.h"
10#include "flutter/lib/ui/painting/color_filter.h"
11#include "flutter/lib/ui/painting/image_filter.h"
12#include "flutter/lib/ui/painting/shader.h"
39 "kDataByteCount must match the size of the data array.");
62 : paint_objects_(paint_objects), paint_data_(paint_data) {}
72 const uint32_t* uint_data =
static_cast<const uint32_t*
>(byte_data.
data());
73 const float* float_data =
static_cast<const float*
>(byte_data.
data());
77 if (
flags.applies_shader()) {
80 if (
flags.applies_color_filter()) {
83 if (
flags.applies_image_filter()) {
97 if (
flags.applies_shader()) {
112 if (
flags.applies_color_filter()) {
123 if (
flags.applies_image_filter()) {
135 if (
flags.applies_anti_alias()) {
139 if (
flags.applies_alpha_or_color()) {
144 if (
flags.applies_blend()) {
150 if (
flags.applies_style()) {
169 if (
flags.applies_color_filter()) {
173 if (
flags.applies_mask_filter()) {
200 const uint32_t* uint_data =
static_cast<const uint32_t*
>(byte_data.
data());
201 const float* float_data =
static_cast<const float*
>(byte_data.
data());
@ kSrcOver
r = s + (1-sa)*d
static sk_sp< SkImage > color_filter(const SkImage *image, SkColorFilter *colorFilter)
const std::shared_ptr< const DlColorFilter > filter() const
static std::shared_ptr< DlMaskFilter > Make(DlBlurStyle style, SkScalar sigma, bool respect_ctm=true)
DlPaint & setColor(DlColor color)
DlPaint & setAntiAlias(bool isAntiAlias)
DlPaint & setInvertColors(bool isInvertColors)
DlPaint & setColorFilter(const std::shared_ptr< const DlColorFilter > &filter)
DlPaint & setMaskFilter(const std::shared_ptr< DlMaskFilter > &filter)
DlPaint & setStrokeCap(DlStrokeCap cap)
DlPaint & setStrokeWidth(float width)
DlPaint & setStrokeMiter(float miter)
DlPaint & setBlendMode(DlBlendMode mode)
DlDrawStyle getDrawStyle() const
DlPaint & setImageFilter(const std::shared_ptr< const DlImageFilter > &filter)
DlPaint & setDrawStyle(DlDrawStyle style)
DlPaint & setStrokeJoin(DlStrokeJoin join)
DlPaint & setColorSource(std::shared_ptr< const DlColorSource > source)
const std::shared_ptr< const DlImageFilter > filter() const
static DlImageSampling SamplingFromIndex(int filterQualityIndex)
void toDlPaint(DlPaint &paint) const
const DlPaint * paint(DlPaint &paint, const DisplayListAttributeFlags &flags) const
const void * data() const
size_t length_in_bytes() const
DART_EXPORT Dart_Handle Dart_ListGetRange(Dart_Handle list, intptr_t offset, intptr_t length, Dart_Handle *result)
struct _Dart_Handle * Dart_Handle
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
struct _Dart_NativeArguments * Dart_NativeArguments
DART_EXPORT Dart_Handle Dart_ListLength(Dart_Handle list, intptr_t *length)
DART_EXPORT bool Dart_IsNull(Dart_Handle object)
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
DART_EXPORT bool Dart_IsList(Dart_Handle object)
FlutterSemanticsFlag flags
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
#define FML_CHECK(condition)
#define FML_DCHECK(condition)
SkSamplingOptions sampling
constexpr int kStrokeJoinIndex
constexpr int kMaskFilterIndex
constexpr int kShaderIndex
constexpr uint32_t kColorDefault
constexpr int kInvertColorIndex
constexpr int kBlendModeIndex
constexpr int kStyleIndex
constexpr int kMaskFilterSigmaIndex
constexpr int kStrokeCapIndex
constexpr int kObjectCount
constexpr uint32_t kBlendModeDefault
static float SafeNarrow(double value)
constexpr int kColorFilterIndex
constexpr int kStrokeMiterLimitIndex
constexpr int kImageFilterIndex
constexpr int kIsAntiAliasIndex
constexpr int kStrokeWidthIndex
constexpr float kStrokeMiterLimitDefault
constexpr int kFilterQualityIndex
constexpr int kColorIndex
constexpr int kMaskFilterBlurStyleIndex
constexpr size_t kDataByteCount
bool CheckAndHandleError(Dart_Handle handle)
const Scalar stroke_width