21#if defined(GR_TEST_UTILS)
24 bool includeNonPerspective,
25 bool includePerspective) {
27 static const int kPerspectiveCount = 1;
45 if (includeNonPerspective && includePerspective) {
47 }
else if (!includeNonPerspective) {
50 SkASSERT(includeNonPerspective && !includePerspective);
156 gRRect[0].
setRectXY(rectangle, 1.f, 1.f);
158 gRRect[1].
setRectXY(rectangle, 2.0f, 1.0f);
178 .
quadTo(10.f, 10.f, 20.f, 20.f)
182 .
conicTo(10.f, 10.f, 20.f, 20.f, 1.f)
186 .
cubicTo(10.f, 10.f, 20.f, 20.f, 30.f, 30.f)
191 .
quadTo(10.f, 10.f, 20.f, 20.f)
192 .
conicTo(10.f, 10.f, 20.f, 20.f, 1.f)
193 .
cubicTo(10.f, 10.f, 20.f, 20.f, 30.f, 30.f)
225 {-1.5f, 50.0f}},
false);
231 {-0.025f, 0.025f}},
false);
239 {-50.0f, 31.0f}},
false);
250 bool strokeAndFill = random->
nextBool();
264 randomize_stroke_rec(&rec, random);
272 randomize_stroke_rec(&
stroke, random);
276 std::unique_ptr<SkScalar[]> intervals(
new SkScalar[cnt]);
278 for (
int i = 0;
i < cnt;
i++) {
294 &fInitialDashIndex, &fIntervalLength, &
fPhase);
300 fInitialDashLength, fInitialDashIndex, fIntervalLength,
312 return kDash_DashType;
321 gColorSpaces[0] =
nullptr;
338 gXforms[0] =
nullptr;
347TestAsFPArgs::TestAsFPArgs(GrProcessorTestData*
d)
352TestAsFPArgs::~TestAsFPArgs() {}
361 kLast_ColorMode = kRandom_ColorMode
364 ColorMode colorMode = ColorMode(random->
nextULessThan(kLast_ColorMode + 1));
367 case kAllOnes_ColorMode:
370 case kAllZeros_ColorMode:
373 case kAlphaOne_ColorMode:
379 case kRandom_ColorMode: {
391uint8_t RandomCoverage(
SkRandom* random) {
394 kAllOnes_CoverageMode,
395 kRandom_CoverageMode,
396 kLast_CoverageMode = kRandom_CoverageMode
402 case kZero_CoverageMode:
405 case kAllOnes_CoverageMode:
408 case kRandom_CoverageMode:
static const int strokeWidth
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static GrColor GrColorPackRGBA(unsigned r, unsigned g, unsigned b, unsigned a)
static void test_matrix(skiatest::Reporter *reporter)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SK_INIT_TO_AVOID_WARNING
#define SkDoubleToScalar(x)
static sk_sp< SkColorSpace > MakeSRGB()
sk_sp< SkColorSpace > makeColorSpin() const
SkMatrix & postTranslate(SkScalar dx, SkScalar dy)
SkMatrix & postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
static constexpr int kMPersp1
input y perspective factor
SkMatrix & set(int index, SkScalar value)
SkMatrix & setTranslate(SkScalar dx, SkScalar dy)
SkMatrix & setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
SkMatrix & setRotate(SkScalar degrees, SkScalar px, SkScalar py)
static constexpr int kMPersp0
input x perspective factor
static constexpr int kCapCount
static constexpr int kJoinCount
SkPathBuilder & conicTo(SkPoint pt1, SkPoint pt2, SkScalar w)
SkPathBuilder & lineTo(SkPoint pt)
SkPathBuilder & cubicTo(SkPoint pt1, SkPoint pt2, SkPoint pt3)
SkPathBuilder & moveTo(SkPoint pt)
SkPathBuilder & quadTo(SkPoint pt1, SkPoint pt2)
static SkPath Polygon(const SkPoint pts[], int count, bool isClosed, SkPathFillType=SkPathFillType::kWinding, bool isVolatile=false)
void setRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
SkScalar nextRangeScalar(SkScalar min, SkScalar max)
uint32_t nextULessThan(uint32_t count)
uint32_t nextRangeU(uint32_t min, uint32_t max)
static SkRect MakeLargest()
void setStrokeStyle(SkScalar width, bool strokeAndFill=false)
void setStrokeParams(SkPaint::Cap cap, SkPaint::Join join, SkScalar miterLimit)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
bool InternalFilter(SkPath *dst, const SkPath &src, SkStrokeRec *rec, const SkRect *cullRect, const SkScalar aIntervals[], int32_t count, SkScalar initialDashLength, int32_t initialDashIndex, SkScalar intervalLength, SkScalar startPhase, StrokeRecApplication=StrokeRecApplication::kAllow)
void CalcDashParameters(SkScalar phase, const SkScalar intervals[], int32_t count, SkScalar *initialDashLength, int32_t *initialDashIndex, SkScalar *intervalLength, SkScalar *adjustedPhase=nullptr)
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
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
const myers::Point & get(const myers::Segment &)
const SkMatrix gMatrices[]
static SkString join(const CommandLineFlags::StringArray &)
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
static sk_sp< SkColorFilter > spin(sk_sp< SkColorFilter > cf)