41 name->append(
"normal");
48 {100,100},{150,50},{250,150}, {300,100},
52 {300,300},{250,250},{150,350},{100,300},
68 {0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f,1.0f}, {0.0f, 1.0f}
79 const SkPoint pts[] = { { 200.f / 4.f, 0.f }, { 3.f * 200.f / 4, 200.f } };
90 vertexMode.
set(
"meshlines");
93 vertexMode.
set(
"colors");
96 vertexMode.
set(
"texs");
99 vertexMode.
set(
"colors_texs");
129 for (
int i = 0;
i < loops;
i++) {
166 name->append(
"square");
172 {100,100},{150,100},{250,100}, {300,100},
174 {300, 150},{300,250},
176 {300,300},{250,300},{150,300},{100,300},
192 name->append(
"LOD_Diff");
198 {100,175},{150,100},{250,100}, {300,0},
200 {300, 150},{300,250},
202 {300,400},{250,300},{150,300},{100,225},
218 name->append(
"loop");
224 {100,100},{300,200},{100,200}, {300,100},
228 {300,300},{250,250},{30,200},{100,300},
329#include
"src/utils/SkPatchUtils.h"
333 const bool fLinearInterp;
336 fName.printf(
"patchutils_%s", linearInterp ?
"linear" :
"legacy");
342 return backend == Backend::kNonRendering;
346 const SkColor colors[] = { 0xFF000000, 0xFF00FF00, 0xFF0000FF, 0xFFFF0000 };
348 { 0, 0 }, { 10, 0 }, { 20, 0 }, { 30, 0 },
349 { 30,10}, { 30,20 }, { 30,30 }, { 20,30 },
350 { 10,30}, { 0, 30 }, { 0, 20 }, { 0, 10 },
353 { 0, 0 }, { 10, 0 }, { 10, 10 }, { 0, 10 },
357 for (
int i = 0;
i < 100*loops; ++
i) {
static const int points[]
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
virtual void setupPaint(SkPaint *paint)
void appendName(SkString *name) override
void setCubics() override
LODDiffPatchBench(SkPoint scale, VertexMode vertexMode)
void appendName(SkString *name) override
void setCubics() override
LoopPatchBench(SkPoint scale, VertexMode vertexMode)
virtual sk_sp< SkShader > createShader()
const char * onGetName() override
virtual void setTexCoords()
void onDelayedSetup() override
PatchBench(SkPoint scale, VertexMode vertexMode)
virtual void appendName(SkString *name)
void onDraw(int loops, SkCanvas *canvas) override
void onDraw(int loops, SkCanvas *) override
const char * onGetName() override
PatchUtilsBench(bool linearInterp)
bool isSuitableFor(Backend backend) override
void drawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode mode, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
static sk_sp< SkColorSpace > MakeSRGBLinear()
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
void setShader(sk_sp< SkShader > shader)
static sk_sp< SkVertices > MakeVertices(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], int lodX, int lodY, SkColorSpace *colorSpace=nullptr)
void printf(const char format[],...) SK_PRINTF_LIKE(2
void set(const SkString &src)
const char * c_str() const
SquarePatchBench(SkPoint scale, VertexMode vertexMode)
void appendName(SkString *name) override
void setCubics() override
PODArray< SkColor > colors
DEF_SWITCHES_START aot vmservice shared library name
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 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
static constexpr SkPoint Make(float x, float y)
constexpr float y() const
constexpr float x() const