66#include <initializer_list>
92 std::unique_ptr<GrFragmentProcessor>
fp) {
93 return GrOp::Make<TestOp>(rContext, std::move(
fp));
96 const char*
name()
const override {
return "TestOp"; }
99 fProcessors.visitProxies(func);
108 return fProcessors.finalize(
116 TestOp(std::unique_ptr<GrFragmentProcessor>
fp)
118 this->setBounds(
SkRect::MakeWH(100, 100), HasAABloat::kNo, IsHairline::kNo);
122 void onCreateProgramInfo(
const GrCaps*,
125 bool usesMSAASurface,
150 static std::unique_ptr<GrFragmentProcessor>
Make(std::unique_ptr<GrFragmentProcessor> child) {
151 return std::unique_ptr<GrFragmentProcessor>(
new TestFP(std::move(child)));
154 return std::unique_ptr<GrFragmentProcessor>(
new TestFP(views));
157 const char*
name()
const override {
return "test"; }
160 static std::atomic<int32_t> nextKey{0};
164 std::unique_ptr<GrFragmentProcessor> clone()
const override {
165 return std::unique_ptr<GrFragmentProcessor>(
new TestFP(*
this));
170 :
INHERITED(kTestFP_ClassID, kNone_OptimizationFlags) {
176 TestFP(std::unique_ptr<GrFragmentProcessor> child)
177 :
INHERITED(kTestFP_ClassID, kNone_OptimizationFlags) {
178 this->registerChild(std::move(child));
181 explicit TestFP(
const TestFP& that) :
INHERITED(that) {}
183 std::unique_ptr<ProgramImpl> onMakeProgramImpl()
const override {
186 void emitCode(EmitArgs&
args)
override {
187 args.fFragBuilder->codeAppendf(
"return half4(1);");
192 return std::make_unique<Impl>();
202 auto dContext = ctxInfo.directContext();
205 static constexpr SkISize kDims = {10, 10};
213 for (
bool makeClone : {
false,
true}) {
214 for (
int parentCnt = 0; parentCnt < 2; parentCnt++) {
238 for (
int i = 0;
i < parentCnt; ++
i) {
241 std::unique_ptr<GrFragmentProcessor> clone;
246 sdc->addDrawOp(std::move(op));
249 sdc->addDrawOp(std::move(op));
254 int expectedProxyRefs = makeClone ? 3 : 2;
258 dContext->flushAndSubmit();
268 "Use non-deterministic seed for random processor tests?");
270 "Use specific seed for processor tests. Overridden by --randomProcessorTest.");
272#if defined(GR_TEST_UTILS)
280 (uint8_t)((
x +
y) & 0xFF),
281 (uint8_t)((2 *
y -
x) & 0xFF));
286 for (
int i = 0;
i < 3;
i++) {
287 if (color4f[
i] > 0.5) {
293 return color4f.premul().toBytes_RGBA();
299 std::unique_ptr<GrFragmentProcessor>
fp,
302 std::fill_n(outBuffer, sdc->
width() * sdc->
height(), 0);
304 GrPixmap resultPM(ii, outBuffer, sdc->
width()*
sizeof(uint32_t));
310class TestFPGenerator {
312 TestFPGenerator() =
delete;
315 , fResourceProvider(resourceProvider)
316 , fInitialSeed(synthesizeInitialSeed())
317 , fRandomSeed(fInitialSeed) {}
319 uint32_t initialSeed() {
return fInitialSeed; }
324 static constexpr int kTestTextureSize = 256;
328 GrColor* rgbaData =
new GrColor[kTestTextureSize * kTestTextureSize];
329 for (
int y = 0;
y < kTestTextureSize; ++
y) {
330 for (
int x = 0;
x < kTestTextureSize; ++
x) {
331 rgbaData[kTestTextureSize *
y +
x] = input_texel_color(
332 random.nextULessThan(256), random.nextULessThan(256), 0.0f);
341 [](
void*
addr,
void* context) { delete[](GrColor*) addr; },
nullptr);
344 if (!view || !view.proxy()->instantiate(fResourceProvider)) {
345 SkDebugf(
"Unable to instantiate RGBA8888 test texture.");
354 uint8_t* alphaData =
new uint8_t[kTestTextureSize * kTestTextureSize];
355 for (
int y = 0;
y < kTestTextureSize; ++
y) {
356 for (
int x = 0;
x < kTestTextureSize; ++
x) {
357 alphaData[kTestTextureSize *
y +
x] = random.nextULessThan(256);
366 [](
void*
addr,
void* context) { delete[](uint8_t*) addr; },
nullptr);
369 if (!view || !view.proxy()->instantiate(fResourceProvider)) {
370 SkDebugf(
"Unable to instantiate A8 test texture.");
383 fRandomSeed = random.nextU();
386 std::unique_ptr<GrFragmentProcessor>
make(
int type,
int randomTreeDepth,
387 std::unique_ptr<GrFragmentProcessor> inputFP) {
391 GrProcessorTestData testData{&random,
fContext, randomTreeDepth,
392 static_cast<int>(
std::size(fTestViews)), fTestViews,
394 return GrFragmentProcessorTestFactory::MakeIdx(
type, &testData);
397 std::unique_ptr<GrFragmentProcessor>
make(
int type,
int randomTreeDepth,
404 static uint32_t synthesizeInitialSeed() {
405 if (FLAGS_randomProcessorTest) {
406 std::random_device rd;
409 return FLAGS_processorSeed;
415 const uint32_t fInitialSeed;
416 uint32_t fRandomSeed;
417 GrProcessorTestData::ViewInfo fTestViews[2];
475 for (
int i = 0;
i < 4;
i++) {
494static bool legal_modulation(
const GrColor inGr[3],
const GrColor outGr[3]) {
497 for (
int i = 0;
i < 3; ++
i) {
502 SkASSERT(inf[0].fA == inf[1].fA && inf[1].fA == inf[2].fA);
510 for (
int i = 0;
i < 4;
i++) {
512 int maxInIdx = inf[0][
i] > inf[1][
i] ? 0 : 1;
513 maxInIdx = inf[maxInIdx][
i] > inf[2][
i] ? maxInIdx : 2;
517 fpPreColorModulation[
i] =
out[
i] / in[
i];
520 fpPreAlphaModulation[
i] =
out[
i] / in[3];
528 for (
int i = 0;
i < 3; ++
i) {
529 expectedForAlphaModulation[
i] = fpPreAlphaModulation * inf[
i].
fA;
530 expectedForColorModulation[
i] = fpPreColorModulation * inf[
i];
534 if (inf[
i].fA == 0) {
535 SkASSERT(inf[
i].fR == 0 && inf[
i].fG == 0 && inf[
i].fB == 0);
536 expectedForColorModulation[
i] = expectedForAlphaModulation[
i] = {0, 0, 0, 0};
540 bool isLegalColorModulation = fuzzy_color_equals(outf[0], expectedForColorModulation[0]) &&
541 fuzzy_color_equals(outf[1], expectedForColorModulation[1]) &&
542 fuzzy_color_equals(outf[2], expectedForColorModulation[2]);
544 bool isLegalAlphaModulation = fuzzy_color_equals(outf[0], expectedForAlphaModulation[0]) &&
545 fuzzy_color_equals(outf[1], expectedForAlphaModulation[1]) &&
546 fuzzy_color_equals(outf[2], expectedForAlphaModulation[2]);
550 if (!isLegalColorModulation && !isLegalAlphaModulation) {
551 SkDebugf(
"Color modulation test\n\timplied mod color: (%.03f, %.03f, %.03f, %.03f)\n",
552 fpPreColorModulation[0],
553 fpPreColorModulation[1],
554 fpPreColorModulation[2],
555 fpPreColorModulation[3]);
556 for (
int i = 0;
i < 3; ++
i) {
557 SkDebugf(
"\t(%.03f, %.03f, %.03f, %.03f) -> "
558 "(%.03f, %.03f, %.03f, %.03f) | "
559 "(%.03f, %.03f, %.03f, %.03f), ok: %d\n",
560 inf[
i].fR, inf[
i].fG, inf[
i].fB, inf[
i].fA,
561 outf[
i].fR, outf[
i].fG, outf[
i].fB, outf[
i].fA,
562 expectedForColorModulation[
i].fR, expectedForColorModulation[
i].fG,
563 expectedForColorModulation[
i].fB, expectedForColorModulation[
i].fA,
564 fuzzy_color_equals(outf[
i], expectedForColorModulation[
i]));
566 SkDebugf(
"Alpha modulation test\n\timplied mod color: (%.03f, %.03f, %.03f, %.03f)\n",
567 fpPreAlphaModulation[0],
568 fpPreAlphaModulation[1],
569 fpPreAlphaModulation[2],
570 fpPreAlphaModulation[3]);
571 for (
int i = 0;
i < 3; ++
i) {
572 SkDebugf(
"\t(%.03f, %.03f, %.03f, %.03f) -> "
573 "(%.03f, %.03f, %.03f, %.03f) | "
574 "(%.03f, %.03f, %.03f, %.03f), ok: %d\n",
575 inf[
i].fR, inf[
i].fG, inf[
i].fB, inf[
i].fA,
576 outf[
i].fR, outf[
i].fG, outf[
i].fB, outf[
i].fA,
577 expectedForAlphaModulation[
i].fR, expectedForAlphaModulation[
i].fG,
578 expectedForAlphaModulation[
i].fB, expectedForAlphaModulation[
i].fA,
579 fuzzy_color_equals(outf[
i], expectedForAlphaModulation[
i]));
583 return isLegalColorModulation || isLegalAlphaModulation;
592 using FPFactory = GrFragmentProcessorTestFactory;
594 TestFPGenerator fpGenerator{context, resourceProvider};
595 if (!fpGenerator.init()) {
601 static constexpr int kRenderSize = 256;
606 {kRenderSize, kRenderSize},
614 static constexpr SkScalar kInputDelta = 0.2f;
615 std::vector<GrColor> inputPixels1 = make_input_pixels(kRenderSize, kRenderSize, 0.0f);
616 std::vector<GrColor> inputPixels2 =
617 make_input_pixels(kRenderSize, kRenderSize, 1 * kInputDelta);
618 std::vector<GrColor> inputPixels3 =
619 make_input_pixels(kRenderSize, kRenderSize, 2 * kInputDelta);
621 make_input_texture(context, kRenderSize, kRenderSize, inputPixels1.data());
623 make_input_texture(context, kRenderSize, kRenderSize, inputPixels2.data());
625 make_input_texture(context, kRenderSize, kRenderSize, inputPixels3.data());
629 bool loggedFirstFailure =
false;
630 bool loggedFirstWarning =
false;
634 std::vector<GrColor> readData1(kRenderSize * kRenderSize);
635 std::vector<GrColor> readData2(kRenderSize * kRenderSize);
636 std::vector<GrColor> readData3(kRenderSize * kRenderSize);
639 for (
int i = 0;
i < FPFactory::Count(); ++
i) {
640 int optimizedForOpaqueInput = 0;
641 int optimizedForCoverageAsAlpha = 0;
642 int optimizedForConstantOutputForInput = 0;
644#ifdef __MSVC_RUNTIME_CHECKS
646 static constexpr int kMinimumTrials = 1;
647 static constexpr int kMaximumTrials = 1;
648 static constexpr int kExpectedSuccesses = 1;
655 static constexpr int kMinimumTrials = 100;
656 static constexpr int kMaximumTrials = 2000;
657 static constexpr int kExpectedSuccesses = 5;
660 for (
int trial = 0;; ++trial) {
662 fpGenerator.reroll();
663 std::unique_ptr<GrFragmentProcessor>
fp =
664 fpGenerator.make(
i, 1, inputTexture1);
668 if (trial >= kMinimumTrials) {
669 bool moreTrialsNeeded = (optimizedForOpaqueInput > 0 &&
670 optimizedForOpaqueInput < kExpectedSuccesses) ||
671 (optimizedForCoverageAsAlpha > 0 &&
672 optimizedForCoverageAsAlpha < kExpectedSuccesses) ||
673 (optimizedForConstantOutputForInput > 0 &&
674 optimizedForConstantOutputForInput < kExpectedSuccesses);
675 if (!moreTrialsNeeded)
break;
677 if (trial >= kMaximumTrials) {
678 SkDebugf(
"Abandoning ProcessorOptimizationValidationTest after %d trials. "
679 "Seed: 0x%08x, processor:\n%s",
680 kMaximumTrials, fpGenerator.initialSeed(),
fp->dumpTreeInfo().c_str());
686 if (!
fp->hasConstantOutputForConstantInput() && !
fp->preservesOpaqueInput() &&
687 !
fp->compatibleWithCoverageAsAlpha()) {
692 if (
fp->compatibleWithCoverageAsAlpha()) {
696 render_fp(context, sdc.get(),
697 fpGenerator.make(
i, 1, inputTexture2),
699 render_fp(context, sdc.get(),
700 fpGenerator.make(
i, 1, inputTexture3),
702 ++optimizedForCoverageAsAlpha;
705 if (
fp->hasConstantOutputForConstantInput()) {
706 ++optimizedForConstantOutputForInput;
709 if (
fp->preservesOpaqueInput()) {
710 ++optimizedForOpaqueInput;
715 render_fp(context, sdc.get(), fpGenerator.make(
i, 1, inputTexture1),
722 static const int kMaxAcceptableFailedPixels =
728 int failedPixelCount = 0;
732 for (
int y = 0;
y < kRenderSize; ++
y) {
733 for (
int x = 0;
x < kRenderSize; ++
x) {
735 GrColor input = inputPixels1[
y * kRenderSize +
x];
738 if (
fp->compatibleWithCoverageAsAlpha()) {
741 ins[1] = inputPixels2[
y * kRenderSize +
x];
742 ins[2] = inputPixels3[
y * kRenderSize +
x];
746 outs[1] = readData2[
y * kRenderSize +
x];
747 outs[2] = readData3[
y * kRenderSize +
x];
749 if (!legal_modulation(ins, outs)) {
751 if (coverageMessage.
isEmpty()) {
753 "\"Modulating\" processor did not match alpha-modulation "
754 "nor color-modulation rules.\n"
755 "Input: 0x%08x, Output: 0x%08x, pixel (%d, %d).",
764 if (
fp->hasConstantOutputForConstantInput(input4f, &expected4f)) {
765 float rDiff = fabsf(output4f.
fR - expected4f.
fR);
766 float gDiff = fabsf(output4f.
fG - expected4f.
fG);
767 float bDiff = fabsf(output4f.
fB - expected4f.
fB);
768 float aDiff = fabsf(output4f.
fA - expected4f.
fA);
769 static constexpr float kTol = 4 / 255.f;
770 if (rDiff > kTol || gDiff > kTol || bDiff > kTol || aDiff > kTol) {
775 "Processor claimed output for const input doesn't match "
777 "Error: %f, Tolerance: %f, input: (%f, %f, %f, %f), "
778 "actual: (%f, %f, %f, %f), expected(%f, %f, %f, %f).",
780 kTol, input4f.
fR, input4f.
fG, input4f.
fB, input4f.
fA,
781 output4f.
fR, output4f.
fG, output4f.
fB, output4f.
fA,
782 expected4f.
fR, expected4f.
fG, expected4f.
fB, expected4f.
fA);
791 "Processor claimed opaqueness is preserved but "
792 "it is not. Input: 0x%08x, Output: 0x%08x.",
807 if (failedPixelCount > kMaxAcceptableFailedPixels) {
809 "Processor violated %d of %d pixels, seed: 0x%08x.\n"
810 "Processor:\n%s\nFirst failing pixel details are below:",
811 failedPixelCount, kRenderSize * kRenderSize, fpGenerator.initialSeed(),
812 fp->dumpTreeInfo().c_str());
815 if (!coverageMessage.
isEmpty()) {
821 if (!opaqueMessage.
isEmpty()) {
825 if (!loggedFirstFailure) {
828 log_texture_view(context, inputTexture1, &input);
830 log_pixels(readData1.data(), kRenderSize, &
output);
832 "===========================================================\n\n"
833 "Output image: %s\n", input.
c_str(),
output.c_str());
834 loggedFirstFailure =
true;
836 }
else if (failedPixelCount > 0) {
838 INFOF(
reporter,
"Processor violated %d of %d pixels (below error threshold), seed: "
839 "0x%08x, processor: %s", failedPixelCount, kRenderSize * kRenderSize,
840 fpGenerator.initialSeed(),
fp->dumpInfo().c_str());
841 if (!coverageMessage.
isEmpty()) {
847 if (!opaqueMessage.
isEmpty()) {
850 if (!loggedFirstWarning) {
852 log_texture_view(context, inputTexture1, &input);
854 log_pixels(readData1.data(), kRenderSize, &
output);
856 "===========================================================\n\n"
857 "Output image: %s\n", input.
c_str(),
output.c_str());
858 loggedFirstWarning =
true;
869 "\n%s",
fp.dumpTreeInfo().c_str());
872 "\n%s",
fp.dumpTreeInfo().c_str());
874 "\n%s",
fp.dumpTreeInfo().c_str());
876 "\n%s",
fp.dumpTreeInfo().c_str());
879 "\n%s",
fp.dumpTreeInfo().c_str());
881 "\n%s",
fp.dumpTreeInfo().c_str());
883 "\n%s",
fp.dumpTreeInfo().c_str());
885 "\n%s",
fp.dumpTreeInfo().c_str());
889 const char* processorType,
895 static const int maxAcceptableFailedPixels =
899 int failedPixelCount = 0;
903 for (
int y = 0;
y < renderSize; ++
y) {
904 for (
int x = 0;
x < renderSize; ++
x, ++idx) {
905 if (readData1[idx] != readData2[idx]) {
906 if (!failedPixelCount) {
912 if (failedPixelCount > maxAcceptableFailedPixels) {
913 idx = firstWrongY * renderSize + firstWrongX;
915 "%s produced different output at (%d, %d). "
916 "Input color: 0x%08x, Original Output Color: 0x%08x, "
917 "Clone Output Color: 0x%08x.",
918 processorType, firstWrongX, firstWrongY, input_texel_color(
x,
y, 0.0f),
919 readData1[idx], readData2[idx]);
933 SkString inputURL, origURL, cloneURL, regenURL;
934 if (log_texture_view(context, inputTexture, &inputURL) &&
935 log_pixels(pixelsFP, renderSize, &origURL) &&
936 log_pixels(pixelsClone, renderSize, &cloneURL) &&
937 log_pixels(pixelsRegen, renderSize, ®enURL)) {
939 "\nInput image:\n%s\n\n"
940 "==========================================================="
942 "Orig output image:\n%s\n"
943 "==========================================================="
945 "Clone output image:\n%s\n"
946 "==========================================================="
948 "Regen output image:\n%s\n",
959 TestFPGenerator fpGenerator{context, resourceProvider};
960 if (!fpGenerator.init()) {
966 static constexpr int kRenderSize = 1024;
971 {kRenderSize, kRenderSize},
975 std::vector<GrColor> inputPixels = make_input_pixels(kRenderSize, kRenderSize, 0.0f);
977 make_input_texture(context, kRenderSize, kRenderSize, inputPixels.data());
981 bool loggedFirstFailure =
false;
984 std::vector<GrColor> readDataFP(kRenderSize * kRenderSize);
985 std::vector<GrColor> readDataClone(kRenderSize * kRenderSize);
986 std::vector<GrColor> readDataRegen(kRenderSize * kRenderSize);
989 for (
int i = 0;
i < GrFragmentProcessorTestFactory::Count(); ++
i) {
990 static constexpr int kTimesToInvokeFactory = 10;
991 for (
int j = 0; j < kTimesToInvokeFactory; ++j) {
992 fpGenerator.reroll();
993 std::unique_ptr<GrFragmentProcessor>
fp =
994 fpGenerator.make(
i, 1,
nullptr);
995 std::unique_ptr<GrFragmentProcessor> regen =
996 fpGenerator.make(
i, 1,
nullptr);
997 std::unique_ptr<GrFragmentProcessor> clone =
fp->clone();
999 ERRORF(
reporter,
"Clone of processor %s failed.",
fp->dumpTreeInfo().c_str());
1002 assert_processor_equality(
reporter, *
fp, *clone);
1005 render_fp(context, sdc.get(), std::move(
fp), readDataFP.data());
1008 render_fp(context, sdc.get(), std::move(clone), readDataClone.data());
1011 if (!verify_identical_render(
reporter, kRenderSize,
"Processor clone",
1012 readDataFP.data(), readDataClone.data())) {
1015 ERRORF(
reporter,
"FP hierarchy:\n%s", regen->dumpTreeInfo().c_str());
1023 render_fp(context, sdc.get(), std::move(regen), readDataRegen.data());
1025 if (!verify_identical_render(
reporter, kRenderSize,
"Regenerated processor",
1026 readDataFP.data(), readDataRegen.data())) {
1029 ERRORF(
reporter,
"Regenerated processor output matches original results.\n");
1034 if (!loggedFirstFailure) {
1035 log_clone_failure(
reporter, kRenderSize, context, inputTexture,
1036 readDataFP.data(), readDataClone.data(),
1037 readDataRegen.data());
1038 loggedFirstFailure =
true;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
#define DEFINE_OP_CLASS_ID
static constexpr float kTolerance
std::function< void(GrSurfaceProxy *, skgpu::Mipmapped)> GrVisitProxyFunc
@ kTopLeft_GrSurfaceOrigin
static DEFINE_bool(randomProcessorTest, false, "Use non-deterministic seed for random processor tests?")
DEF_GANESH_TEST_FOR_ALL_CONTEXTS(ProcessorRefTest, reporter, ctxInfo, CtsEnforcement::kNever)
static DEFINE_int(processorSeed, 0, "Use specific seed for processor tests. Overridden by --randomProcessorTest.")
@ kUnknown_SkAlphaType
uninitialized
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
std::tuple< GrSurfaceProxyView, GrColorType > GrMakeUncachedBitmapProxyView(GrRecordingContext *rContext, const SkBitmap &bitmap, skgpu::Mipmapped mipmapped, SkBackingFit fit, skgpu::Budgeted budgeted)
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
#define INHERITED(method,...)
static bool SkScalarNearlyEqual(SkScalar x, SkScalar y, SkScalar tolerance=SK_ScalarNearlyZero)
bool CurrentTestHarnessIsSkQP()
void CheckSingleThreadedProxyRefs(skiatest::Reporter *reporter, GrSurfaceProxy *proxy, int32_t expectedProxyRefs, int32_t expectedBackingRefs)
#define REPORTER_ASSERT(r, cond,...)
#define DEF_GANESH_TEST_FOR_GL_CONTEXT(name, reporter, context_info, ctsEnforcement)
#define INFOF(REPORTER,...)
GrResourceProvider * resourceProvider()
GrDirectContextPriv priv()
bool usesSampleCoords() const
bool preservesOpaqueInput() const
bool hasConstantOutputForConstantInput(SkPMColor4f inputColor, SkPMColor4f *outputColor) const
int numChildProcessors() const
const SkSL::SampleUsage & sampleUsage() const
bool compatibleWithCoverageAsAlpha() const
std::unique_ptr< GrOp > Owner
virtual const char * name() const =0
sk_sp< GrTextureProxy > createProxy(const GrBackendFormat &, SkISize dimensions, GrRenderable, int renderTargetSampleCnt, skgpu::Mipmapped, SkBackingFit, skgpu::Budgeted, GrProtected, std::string_view label, GrInternalSurfaceFlags=GrInternalSurfaceFlags::kNone, UseAllocator useAllocator=UseAllocator::kYes)
std::unique_ptr< skgpu::ganesh::SurfaceContext > makeSC(GrSurfaceProxyView readView, const GrColorInfo &)
static std::unique_ptr< GrFragmentProcessor > Make(GrSurfaceProxyView, SkAlphaType, const SkMatrix &=SkMatrix::I(), GrSamplerState::Filter=GrSamplerState::Filter::kNearest, GrSamplerState::MipmapMode mipmapMode=GrSamplerState::MipmapMode::kNone)
bool installPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, void(*releaseProc)(void *addr, void *context), void *context)
const SkPixmap & pixmap() const
bool tryAllocPixels(const SkImageInfo &info, size_t rowBytes)
void printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
bool readPixels(GrDirectContext *dContext, GrPixmap dst, SkIPoint srcPt)
SkISize dimensions() const
static std::unique_ptr< SurfaceDrawContext > Make(GrRecordingContext *, GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &)
void fillWithFP(std::unique_ptr< GrFragmentProcessor > fp)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
uint32_t uint32_t * format
static float max(float r, float g, float b)
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
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
const myers::Point & get< 0 >(const myers::Segment &s)
static void make(SkBitmap *bitmap, SkColorType colorType, SkAlphaType alphaType, sk_sp< SkColorSpace > colorSpace)
static const GrUserStencilSettings & kUnused
const SkColorInfo & colorInfo() const
size_t minRowBytes() const
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
static SkRGBA4f FromBytes_RGBA(uint32_t color)
static constexpr SkRect MakeWH(float w, float h)