473 {
476
477 for (auto enableSortingAndReduction : {Enable::kYes, Enable::kNo}) {
484 if (!dContext) {
485 ERRORF(
reporter,
"could not create mock dContext with fReduceOpsTaskSplitting %s.",
486 (Enable::kYes == enableSortingAndReduction) ? "enabled" : "disabled");
487 continue;
488 }
489
490 SkASSERT(dContext->priv().caps()->mipmapSupport());
491
496
498
499
500
503 {4, 4},
504 GrRenderable::kYes,
505 1,
506 skgpu::Mipmapped::kYes,
509 GrProtected::kNo,
510 "ManyDependentsMipMappedTest");
511
512
513
514 mipmapProxy->markMipmapsClean();
515
518 mipmapProxy,
519 nullptr,
522
525
527 mipmapSDC->testingOnly_PeekLastOpsTask() ==
529
530
532
535
536
538 mipmapView, MipmapMode::kLinear);
539 auto sdc1Task =
sk_ref_sp(sdc1->testingOnly_PeekLastOpsTask());
540
541
542
543
544
548 initialMipmapRegenTask != mipmapSDC->testingOnly_PeekLastOpsTask());
550
551
553 mipmapView, MipmapMode::kLinear);
554 auto sdc2Task =
sk_ref_sp(sdc2->testingOnly_PeekLastOpsTask());
555
556
559 SkASSERT(!mipmapProxy->mipmapsAreDirty());
560
561
562 dContext->flushAndSubmit();
563
564
567
568
570 auto mipmapRTCTask =
sk_ref_sp(mipmapSDC->testingOnly_PeekLastOpsTask());
572
573
576
577
579
580
582 mipmapView, MipmapMode::kNone);
583
584
585
586
588
589
592
593
595 std::move(mipmapView), MipmapMode::kLinear);
596 sdc2Task =
sk_ref_sp(sdc2->testingOnly_PeekLastOpsTask());
597
598
599
603 SkASSERT(!mipmapProxy->mipmapsAreDirty());
604
605
606 dContext->flushAndSubmit();
608 }
609}
static std::unique_ptr< skgpu::ganesh::SurfaceDrawContext > draw_mipmap_into_new_render_target(GrRecordingContext *rContext, GrColorType colorType, SkAlphaType alphaType, GrSurfaceProxyView mipmapView, GrSamplerState::MipmapMode mm)
@ kTopLeft_GrSurfaceOrigin
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
sk_sp< T > sk_ref_sp(T *obj)
#define REPORTER_ASSERT(r, cond,...)
static sk_sp< GrDirectContext > MakeMock(const GrMockOptions *, const GrContextOptions &)
GrRenderTask * getLastRenderTask(const GrSurfaceProxy *) const
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)
static std::unique_ptr< SurfaceDrawContext > Make(GrRecordingContext *, GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &)
uint32_t uint32_t * format
Enable fReduceOpsTaskSplitting