26 std::unique_ptr<GrDynamicAtlas> dynamicAtlas)
28 dynamicAtlas->writeView(*rContext->
priv().caps()),
29 rContext->
priv().auditTrail(),
31 , fDynamicAtlas(
std::move(dynamicAtlas)) {
35 SkIPoint pathDevTopLeft,
int widthInAtlas,
int heightInAtlas,
36 bool transposedInAtlas,
SkIPoint16* locationInAtlas) {
39 SkASSERT(!fDynamicAtlas->isInstantiated());
41 if (!fDynamicAtlas->addRect(widthInAtlas, heightInAtlas, locationInAtlas)) {
45 SkMatrix pathToAtlasMatrix = viewMatrix;
46 if (transposedInAtlas) {
47 std::swap(pathToAtlasMatrix[0], pathToAtlasMatrix[3]);
48 std::swap(pathToAtlasMatrix[1], pathToAtlasMatrix[4]);
50 pathToAtlasMatrix.
setTranslateX(ty - pathDevTopLeft.
y() + locationInAtlas->
x());
51 pathToAtlasMatrix.
setTranslateY(tx - pathDevTopLeft.
x() + locationInAtlas->
y());
53 pathToAtlasMatrix.
postTranslate(locationInAtlas->
x() - pathDevTopLeft.
x(),
54 locationInAtlas->
y() - pathDevTopLeft.
y());
58 fWindingPathList.add(&fPathDrawAllocator, pathToAtlasMatrix,
path);
60 fEvenOddPathList.add(&fPathDrawAllocator, pathToAtlasMatrix,
path);
69 SkASSERT(!fDynamicAtlas->isInstantiated());
99 for (
const auto* pathList : {&fWindingPathList, &fEvenOddPathList}) {
100 if (pathList->pathCount() > 0) {
101 auto op = GrOp::Make<PathStencilCoverOp>(
103 pathList->pathDrawList(),
104 pathList->totalCombinedPathVerbCnt(),
105 pathList->pathCount(),
110 this->addAtlasDrawOp(std::move(op), caps);
128 stencil = &kTestStencil;
162 this->addAtlasDrawOp(std::move(op), *rContext->
priv().
caps());
168 auto drawOp =
static_cast<GrDrawOp*
>(op.get());
171 auto processorAnalysis = drawOp->finalize(caps,
nullptr,
173 SkASSERT(!processorAnalysis.requiresDstTexture());
174 SkASSERT(!processorAnalysis.usesNonCoherentHWBlending());
176 drawOp->setClippedBounds(drawOp->
bounds());
177 this->
recordOp(
std::move(op),
true, processorAnalysis,
nullptr,
nullptr, caps);
184 if (this->
target(0)->requiresManualMSAAResolve()) {
191 flushState->gpu()->resolveRenderTarget(this->
target(0)->peekRenderTarget(), nativeRect);
GrFillRule GrFillRuleForSkPath(const SkPath &path)
static constexpr GrClampType GrColorTypeClampType(GrColorType colorType)
constexpr SkPMColor4f SK_PMColor4fWHITE
constexpr SkPMColor4f SK_PMColor4fTRANSPARENT
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
void swap(sk_sp< T > &a, sk_sp< T > &b)
const GrCaps * caps() const
bool discardStencilValuesAfterRenderPass() const
bool performColorClearsAsDraws() const
bool performStencilClearsAsDraws() const
static constexpr GrSurfaceOrigin kTextureOrigin
std::unique_ptr< GrOp > Owner
GrRecordingContextPriv priv()
GrSurfaceProxy * target(int i) const
SkDEBUGCODE(~GrRenderTask() override;) void makeClosed(GrRecordingContext *)
void setLazyDimensions(SkISize dimensions)
virtual GrRenderTargetProxy * asRenderTargetProxy()
GrSurfaceProxyPriv priv()
SkRect getBoundsRect() const
static const GrXPFactory * FromBlendMode(SkBlendMode)
SkMatrix & postTranslate(SkScalar dx, SkScalar dy)
SkMatrix & setTranslateY(SkScalar v)
SkScalar getTranslateY() const
SkMatrix & setTranslateX(SkScalar v)
SkScalar getTranslateX() const
AtlasRenderTask(GrRecordingContext *, sk_sp< GrArenas >, std::unique_ptr< GrDynamicAtlas >)
bool addPath(const SkMatrix &, const SkPath &, SkIPoint pathDevTopLeft, int widthInAtlas, int heightInAtlas, bool transposedInAtlas, SkIPoint16 *locationInAtlas)
static GrOp::Owner Make(GrRecordingContext *, GrPaint &&, GrAAType, DrawQuad *, const GrUserStencilSettings *=nullptr, InputFlags=InputFlags::kNone)
void recordOp(GrOp::Owner, bool usesMSAA, GrProcessorSet::Analysis, GrAppliedClip *, const GrDstProxyView *, const GrCaps &)
void setColorLoadOp(GrLoadOp op, std::array< float, 4 > color={0, 0, 0, 0})
bool onExecute(GrOpFlushState *flushState) override
void setInitialStencilContent(StencilContent initialContent)
ExpectedOutcome onMakeClosed(GrRecordingContext *, SkIRect *targetUpdateBounds) override
FlPixelBufferTexturePrivate * priv
Optional< SkRect > bounds
sk_sp< SkBlender > blender SkRect rect
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
static constexpr GrUserStencilSettings kTestAndResetStencil(GrUserStencilSettings::StaticInit< 0x0000, GrUserStencilTest::kLessIfInClip, 0x0001, GrUserStencilOp::kZero, GrUserStencilOp::kReplace, 0xffff >())
static SkIRect MakeIRectRelativeTo(GrSurfaceOrigin origin, int rtHeight, SkIRect devRect)
static constexpr Init< Ref, Test, TestMask, PassOp, FailOp, WriteMask > StaticInit()
constexpr int32_t y() const
constexpr int32_t x() const
static constexpr SkIRect MakeSize(const SkISize &size)
void outset(float dx, float dy)