5#ifndef FLUTTER_DISPLAY_LIST_BENCHMARKING_DL_COMPLEXITY_HELPER_H_
6#define FLUTTER_DISPLAY_LIST_BENCHMARKING_DL_COMPLEXITY_HELPER_H_
101 : ceiling_(ceiling) {}
148 const sk_sp<DlImage>
image,
152 bool render_with_attributes,
158 render_with_attributes,
170 bool render_with_attributes)
override {
176 for (
int i = 0;
i < count;
i++) {
178 render_with_attributes,
true);
194 if (
Ceiling() - complexity_score_ < batched_complexity) {
198 return complexity_score_ + batched_complexity;
204 if (ceiling_ - complexity_score_ < complexity) {
209 complexity_score_ += complexity;
216 inline unsigned int Ceiling() {
return ceiling_; }
220 unsigned int line_verb_cost,
221 unsigned int quad_verb_cost,
222 unsigned int conic_verb_cost,
223 unsigned int cubic_verb_cost);
227 bool render_with_attributes,
228 bool enforce_src_edges) = 0;
241 bool is_complex_ =
false;
242 unsigned int ceiling_;
244 unsigned int complexity_score_ = 0;
void setAntiAlias(bool aa) override
void setInvertColors(bool invert) override
virtual void ImageRect(const DlISize &size, bool texture_backed, bool render_with_attributes, bool enforce_src_edges)=0
void setColorSource(const DlColorSource *source) override
void drawPaint() override
void setStrokeWidth(DlScalar width) override
void setColor(DlColor color) override
virtual ~ComplexityCalculatorHelper()=default
unsigned int CurrentComplexityScore()
void AccumulateComplexity(unsigned int complexity)
void drawImageRect(const sk_sp< DlImage > image, const DlRect &src, const DlRect &dst, DlImageSampling sampling, bool render_with_attributes, DlSrcRectConstraint constraint=DlSrcRectConstraint::kFast) override
ComplexityCalculatorHelper(unsigned int ceiling)
void setMaskFilter(const DlMaskFilter *filter) override
void drawColor(DlColor color, DlBlendMode mode) override
void setStrokeCap(DlStrokeCap cap) override
void setColorFilter(const DlColorFilter *filter) override
void setStrokeJoin(DlStrokeJoin join) override
virtual unsigned int BatchedComplexity()=0
void setImageFilter(const DlImageFilter *filter) override
void drawAtlas(const sk_sp< DlImage > atlas, const DlRSTransform xform[], const DlRect tex[], const DlColor colors[], int count, DlBlendMode mode, DlImageSampling sampling, const DlRect *cull_rect, bool render_with_attributes) override
unsigned int CalculatePathComplexity(const DlPath &dl_path, unsigned int line_verb_cost, unsigned int quad_verb_cost, unsigned int conic_verb_cost, unsigned int cubic_verb_cost)
void setBlendMode(DlBlendMode mode) override
void setStrokeMiter(DlScalar limit) override
void setDrawStyle(DlDrawStyle style) override
unsigned int ComplexityScore()
Internal API for rendering recorded display lists to backends.
DlPaint & setAntiAlias(bool isAntiAlias)
DlPaint & setStrokeWidth(float width)
DlDrawStyle getDrawStyle() const
float getStrokeWidth() const
DlPaint & setDrawStyle(DlDrawStyle style)
FlutterVulkanImage * image
impeller::Scalar DlScalar
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all 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 keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
RoundOut(const TRect< U > &r)