| Index: src/gpu/batches/GrStencilPathBatch.h
|
| diff --git a/src/gpu/batches/GrStencilPathBatch.h b/src/gpu/batches/GrStencilPathBatch.h
|
| index 73bec195d00b3a8c5b1f406dd3807886dc114491..79fa9e1bba9c2afa4fdc5406a40f5fe06211dda7 100644
|
| --- a/src/gpu/batches/GrStencilPathBatch.h
|
| +++ b/src/gpu/batches/GrStencilPathBatch.h
|
| @@ -25,16 +25,16 @@ public:
|
| bool hasStencilClip,
|
| int numStencilBits,
|
| const GrScissorState& scissor,
|
| - GrRenderTarget* renderTarget,
|
| + GrRenderTargetProxy* rtp,
|
| const GrPath* path) {
|
| return new GrStencilPathBatch(viewMatrix, useHWAA, fillType, hasStencilClip,
|
| - numStencilBits, scissor, renderTarget, path);
|
| + numStencilBits, scissor, rtp, path);
|
| }
|
|
|
| const char* name() const override { return "StencilPath"; }
|
|
|
| - uint32_t renderTargetUniqueID() const override { return fRenderTarget.get()->uniqueID(); }
|
| - GrRenderTarget* renderTarget() const override { return fRenderTarget.get(); }
|
| + uint32_t renderTargetUniqueID() const override { return fRenderTargetProxy.get()->uniqueID(); }
|
| + GrRenderTargetProxy* rtp() const override { return fRenderTargetProxy.get(); }
|
|
|
| SkString dumpInfo() const override {
|
| SkString string;
|
| @@ -50,14 +50,14 @@ private:
|
| bool hasStencilClip,
|
| int numStencilBits,
|
| const GrScissorState& scissor,
|
| - GrRenderTarget* renderTarget,
|
| + GrRenderTargetProxy* rtp,
|
| const GrPath* path)
|
| : INHERITED(ClassID())
|
| , fViewMatrix(viewMatrix)
|
| , fUseHWAA(useHWAA)
|
| , fStencil(GrPathRendering::GetStencilPassSettings(fillType), hasStencilClip, numStencilBits)
|
| , fScissor(scissor)
|
| - , fRenderTarget(renderTarget)
|
| + , fRenderTargetProxy(rtp)
|
| , fPath(path) {
|
| this->setBounds(path->getBounds(), HasAABloat::kNo, IsZeroArea::kNo);
|
| }
|
| @@ -67,17 +67,20 @@ private:
|
| void onPrepare(GrBatchFlushState*) override {}
|
|
|
| void onDraw(GrBatchFlushState* state, const SkRect& bounds) override {
|
| - GrPathRendering::StencilPathArgs args(fUseHWAA, fRenderTarget.get(), &fViewMatrix,
|
| + GrTextureProvider* prov = state->gpu()->getContext()->textureProvider();
|
| + GrRenderTarget* renderTarget = fRenderTargetProxy.get()->instantiate(prov);
|
| + GrPathRendering::StencilPathArgs args(fUseHWAA, renderTarget, &fViewMatrix,
|
| &fScissor, &fStencil);
|
| state->gpu()->pathRendering()->stencilPath(args, fPath.get());
|
| }
|
|
|
| - SkMatrix fViewMatrix;
|
| - bool fUseHWAA;
|
| - GrStencilSettings fStencil;
|
| - GrScissorState fScissor;
|
| - GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
|
| - GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
|
| + SkMatrix fViewMatrix;
|
| + bool fUseHWAA;
|
| + GrStencilSettings fStencil;
|
| + GrScissorState fScissor;
|
| +// GrPendingIOResource<GrRenderTargetProxy, kWrite_GrIOType> fRenderTargetProxy;
|
| + sk_sp<GrRenderTargetProxy> fRenderTargetProxy;
|
| + GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
|
|
|
| typedef GrBatch INHERITED;
|
| };
|
|
|