Rename outputView->writeView and outputSwizzle->writeSwizzle
Change-Id: Ib09550201bc1556e04555fc7dc9408ab469684a0 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280964 Commit-Queue: Greg Daniel <egdaniel@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
c3ce54a8a7
commit
8afde5f395
@ -173,14 +173,14 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
GrGeometryProcessor* gp = GP::Make(arena, fMode, fColorSpaceXform);
|
||||
|
||||
fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps,
|
||||
arena,
|
||||
outputView,
|
||||
writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView,
|
||||
gp,
|
||||
|
@ -93,7 +93,7 @@ protected:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
auto gp = this->makeGP(*caps, arena);
|
||||
@ -103,7 +103,7 @@ protected:
|
||||
|
||||
GrPipeline::InputFlags flags = GrPipeline::InputFlags::kNone;
|
||||
|
||||
fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps, arena, outputView,
|
||||
fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps, arena, writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView, gp,
|
||||
std::move(fProcessorSet),
|
||||
|
@ -163,12 +163,12 @@ private:
|
||||
|
||||
GrProgramInfo* createProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) const {
|
||||
GrGeometryProcessor* geomProc = ClockwiseTestProcessor::Make(arena, fReadSkFragCoord);
|
||||
|
||||
return sk_gpu_test::CreateProgramInfo(caps, arena, outputView,
|
||||
return sk_gpu_test::CreateProgramInfo(caps, arena, writeView,
|
||||
std::move(appliedClip), dstProxyView,
|
||||
geomProc, SkBlendMode::kPlus,
|
||||
GrPrimitiveType::kTriangleStrip);
|
||||
@ -177,13 +177,13 @@ private:
|
||||
GrProgramInfo* createProgramInfo(GrOpFlushState* flushState) const {
|
||||
return this->createProgramInfo(&flushState->caps(),
|
||||
flushState->allocator(),
|
||||
flushState->outputView(),
|
||||
flushState->writeView(),
|
||||
flushState->detachAppliedClip(),
|
||||
flushState->dstProxyView());
|
||||
}
|
||||
|
||||
void onPrePrepare(GrRecordingContext* context,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip* clip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) final {
|
||||
SkArenaAlloc* arena = context->priv().recordTimeAllocator();
|
||||
@ -191,7 +191,7 @@ private:
|
||||
// This is equivalent to a GrOpFlushState::detachAppliedClip
|
||||
GrAppliedClip appliedClip = clip ? std::move(*clip) : GrAppliedClip();
|
||||
|
||||
fProgramInfo = this->createProgramInfo(context->priv().caps(), arena, outputView,
|
||||
fProgramInfo = this->createProgramInfo(context->priv().caps(), arena, writeView,
|
||||
std::move(appliedClip), dstProxyView);
|
||||
|
||||
context->priv().recordProgramInfo(fProgramInfo);
|
||||
|
@ -171,12 +171,12 @@ private:
|
||||
|
||||
GrProgramInfo* createProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) const {
|
||||
GrGeometryProcessor* geomProc = FwidthSquircleTestProcessor::Make(arena, fViewMatrix);
|
||||
|
||||
return sk_gpu_test::CreateProgramInfo(caps, arena, outputView,
|
||||
return sk_gpu_test::CreateProgramInfo(caps, arena, writeView,
|
||||
std::move(appliedClip), dstProxyView,
|
||||
geomProc, SkBlendMode::kSrcOver,
|
||||
GrPrimitiveType::kTriangleStrip);
|
||||
@ -185,13 +185,13 @@ private:
|
||||
GrProgramInfo* createProgramInfo(GrOpFlushState* flushState) const {
|
||||
return this->createProgramInfo(&flushState->caps(),
|
||||
flushState->allocator(),
|
||||
flushState->outputView(),
|
||||
flushState->writeView(),
|
||||
flushState->detachAppliedClip(),
|
||||
flushState->dstProxyView());
|
||||
}
|
||||
|
||||
void onPrePrepare(GrRecordingContext* context,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip* clip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) final {
|
||||
SkArenaAlloc* arena = context->priv().recordTimeAllocator();
|
||||
@ -199,7 +199,7 @@ private:
|
||||
// This is equivalent to a GrOpFlushState::detachAppliedClip
|
||||
GrAppliedClip appliedClip = clip ? std::move(*clip) : GrAppliedClip();
|
||||
|
||||
fProgramInfo = this->createProgramInfo(context->priv().caps(), arena, outputView,
|
||||
fProgramInfo = this->createProgramInfo(context->priv().caps(), arena, writeView,
|
||||
std::move(appliedClip), dstProxyView);
|
||||
|
||||
context->priv().recordProgramInfo(fProgramInfo);
|
||||
|
@ -244,14 +244,14 @@ private:
|
||||
|
||||
GrProgramInfo* createProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) const {
|
||||
GrGeometryProcessor* geomProc = SampleLocationsTestProcessor::Make(arena, fGradType);
|
||||
|
||||
GrPipeline::InputFlags flags = GrPipeline::InputFlags::kHWAntialias;
|
||||
|
||||
return sk_gpu_test::CreateProgramInfo(caps, arena, outputView,
|
||||
return sk_gpu_test::CreateProgramInfo(caps, arena, writeView,
|
||||
std::move(appliedClip), dstProxyView,
|
||||
geomProc, SkBlendMode::kSrcOver,
|
||||
GrPrimitiveType::kTriangleStrip,
|
||||
@ -261,13 +261,13 @@ private:
|
||||
GrProgramInfo* createProgramInfo(GrOpFlushState* flushState) const {
|
||||
return this->createProgramInfo(&flushState->caps(),
|
||||
flushState->allocator(),
|
||||
flushState->outputView(),
|
||||
flushState->writeView(),
|
||||
flushState->detachAppliedClip(),
|
||||
flushState->dstProxyView());
|
||||
}
|
||||
|
||||
void onPrePrepare(GrRecordingContext* context,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip* clip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) final {
|
||||
// We're going to create the GrProgramInfo (and the GrPipeline and geometry processor
|
||||
@ -277,7 +277,7 @@ private:
|
||||
// This is equivalent to a GrOpFlushState::detachAppliedClip
|
||||
GrAppliedClip appliedClip = clip ? std::move(*clip) : GrAppliedClip();
|
||||
|
||||
fProgramInfo = this->createProgramInfo(context->priv().caps(), arena, outputView,
|
||||
fProgramInfo = this->createProgramInfo(context->priv().caps(), arena, writeView,
|
||||
std::move(appliedClip), dstProxyView);
|
||||
|
||||
context->priv().recordProgramInfo(fProgramInfo);
|
||||
|
@ -299,7 +299,7 @@ private:
|
||||
}
|
||||
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
|
||||
@ -331,7 +331,7 @@ private:
|
||||
}
|
||||
|
||||
GrProgramInfo programInfo(state->proxy()->numSamples(), state->proxy()->numStencilSamples(),
|
||||
state->proxy()->backendFormat(), state->outputView()->origin(),
|
||||
state->proxy()->backendFormat(), state->writeView()->origin(),
|
||||
&pipeline, shader.get(), GrPrimitiveType::kPatches,
|
||||
tessellationPatchVertexCount);
|
||||
|
||||
|
@ -99,7 +99,7 @@ private:
|
||||
return GrProcessorSet::EmptySetAnalysis();
|
||||
}
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
void onPrepare(GrOpFlushState*) override {}
|
||||
|
@ -179,10 +179,10 @@ bool SkDeferredDisplayListRecorder::init() {
|
||||
GrSwizzle writeSwizzle = caps->getWriteSwizzle(fCharacterization.backendFormat(), grColorType);
|
||||
|
||||
GrSurfaceProxyView readView(proxy, fCharacterization.origin(), readSwizzle);
|
||||
GrSurfaceProxyView outputView(std::move(proxy), fCharacterization.origin(), writeSwizzle);
|
||||
GrSurfaceProxyView writeView(std::move(proxy), fCharacterization.origin(), writeSwizzle);
|
||||
|
||||
auto rtc = std::make_unique<GrRenderTargetContext>(fContext.get(), std::move(readView),
|
||||
std::move(outputView), grColorType,
|
||||
std::move(writeView), grColorType,
|
||||
fCharacterization.refColorSpace(),
|
||||
&fCharacterization.surfaceProps());
|
||||
fSurface = SkSurface_Gpu::MakeWrappedRenderTarget(fContext.get(), std::move(rtc));
|
||||
|
@ -46,7 +46,7 @@ void GrOpFlushState::executeDrawsAndUploadsForMeshDrawOp(
|
||||
GrProgramInfo programInfo(this->proxy()->numSamples(),
|
||||
this->proxy()->numStencilSamples(),
|
||||
this->proxy()->backendFormat(),
|
||||
this->outputView()->origin(),
|
||||
this->writeView()->origin(),
|
||||
pipeline,
|
||||
fCurrDraw->fGeometryProcessor,
|
||||
fCurrDraw->fPrimitiveType);
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
GrSwizzle writeSwizzle() const { return fSurfaceView->swizzle(); }
|
||||
|
||||
GrOp* op() { return fOp; }
|
||||
const GrSurfaceProxyView* outputView() const { return fSurfaceView; }
|
||||
const GrSurfaceProxyView* writeView() const { return fSurfaceView; }
|
||||
GrRenderTargetProxy* proxy() const { return fRenderTargetProxy; }
|
||||
GrAppliedClip* appliedClip() { return fAppliedClip; }
|
||||
const GrAppliedClip* appliedClip() const { return fAppliedClip; }
|
||||
@ -132,7 +132,7 @@ public:
|
||||
int* actualIndexCount) final;
|
||||
void putBackIndices(int indexCount) final;
|
||||
void putBackVertices(int vertices, size_t vertexStride) final;
|
||||
const GrSurfaceProxyView* outputView() const final { return this->drawOpArgs().outputView(); }
|
||||
const GrSurfaceProxyView* writeView() const final { return this->drawOpArgs().writeView(); }
|
||||
GrRenderTargetProxy* proxy() const final { return this->drawOpArgs().proxy(); }
|
||||
const GrAppliedClip* appliedClip() const final { return this->drawOpArgs().appliedClip(); }
|
||||
const GrAppliedHardClip& appliedHardClip() const {
|
||||
|
@ -151,13 +151,13 @@ std::unique_ptr<GrRenderTargetContext> GrRenderTargetContext::Make(
|
||||
|
||||
const GrBackendFormat& format = proxy->backendFormat();
|
||||
GrSwizzle readSwizzle = context->priv().caps()->getReadSwizzle(format, colorType);
|
||||
GrSwizzle outSwizzle = context->priv().caps()->getWriteSwizzle(format, colorType);
|
||||
GrSwizzle writeSwizzle = context->priv().caps()->getWriteSwizzle(format, colorType);
|
||||
|
||||
GrSurfaceProxyView readView(proxy, origin, readSwizzle);
|
||||
GrSurfaceProxyView outputView(std::move(proxy), origin, outSwizzle);
|
||||
GrSurfaceProxyView writeView(std::move(proxy), origin, writeSwizzle);
|
||||
|
||||
return std::make_unique<GrRenderTargetContext>(context, std::move(readView),
|
||||
std::move(outputView), colorType,
|
||||
std::move(writeView), colorType,
|
||||
std::move(colorSpace), surfaceProps, managedOps);
|
||||
}
|
||||
|
||||
@ -346,19 +346,19 @@ std::unique_ptr<GrRenderTargetContext> GrRenderTargetContext::MakeFromVulkanSeco
|
||||
// when the renderTargetContext attempts to use it (via getOpsTask).
|
||||
GrRenderTargetContext::GrRenderTargetContext(GrRecordingContext* context,
|
||||
GrSurfaceProxyView readView,
|
||||
GrSurfaceProxyView outputView,
|
||||
GrSurfaceProxyView writeView,
|
||||
GrColorType colorType,
|
||||
sk_sp<SkColorSpace> colorSpace,
|
||||
const SkSurfaceProps* surfaceProps,
|
||||
bool managedOpsTask)
|
||||
: GrSurfaceContext(context, std::move(readView), colorType, kPremul_SkAlphaType,
|
||||
std::move(colorSpace))
|
||||
, fOutputView(std::move(outputView))
|
||||
, fWriteView(std::move(writeView))
|
||||
, fOpsTask(sk_ref_sp(this->asSurfaceProxy()->getLastOpsTask()))
|
||||
, fSurfaceProps(SkSurfacePropsCopyOrDefault(surfaceProps))
|
||||
, fManagedOpsTask(managedOpsTask) {
|
||||
SkASSERT(this->asSurfaceProxy() == fOutputView.proxy());
|
||||
SkASSERT(this->origin() == fOutputView.origin());
|
||||
SkASSERT(this->asSurfaceProxy() == fWriteView.proxy());
|
||||
SkASSERT(this->origin() == fWriteView.origin());
|
||||
|
||||
fTextTarget.reset(new TextTarget(this));
|
||||
SkDEBUGCODE(this->validate();)
|
||||
@ -367,7 +367,7 @@ GrRenderTargetContext::GrRenderTargetContext(GrRecordingContext* context,
|
||||
#ifdef SK_DEBUG
|
||||
void GrRenderTargetContext::onValidate() const {
|
||||
if (fOpsTask && !fOpsTask->isClosed()) {
|
||||
SkASSERT(fOutputView.proxy()->getLastRenderTask() == fOpsTask.get());
|
||||
SkASSERT(fWriteView.proxy()->getLastRenderTask() == fOpsTask.get());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -401,7 +401,7 @@ GrOpsTask* GrRenderTargetContext::getOpsTask() {
|
||||
|
||||
if (!fOpsTask || fOpsTask->isClosed()) {
|
||||
sk_sp<GrOpsTask> newOpsTask =
|
||||
this->drawingManager()->newOpsTask(this->outputSurfaceView(), fManagedOpsTask);
|
||||
this->drawingManager()->newOpsTask(this->writeSurfaceView(), fManagedOpsTask);
|
||||
if (fOpsTask && fNumStencilSamples > 0) {
|
||||
// Store the stencil values in memory upon completion of fOpsTask.
|
||||
fOpsTask->setMustPreserveStencil();
|
||||
|
@ -130,7 +130,7 @@ public:
|
||||
const SkSurfaceProps*);
|
||||
|
||||
GrRenderTargetContext(GrRecordingContext*, GrSurfaceProxyView readView,
|
||||
GrSurfaceProxyView outputView, GrColorType, sk_sp<SkColorSpace>,
|
||||
GrSurfaceProxyView writeView, GrColorType, sk_sp<SkColorSpace>,
|
||||
const SkSurfaceProps*, bool managedOpsTask = true);
|
||||
|
||||
~GrRenderTargetContext() override;
|
||||
@ -561,7 +561,7 @@ public:
|
||||
|
||||
// TODO: See if it makes sense for this to return a const& instead and require the callers to
|
||||
// make a copy (which refs the proxy) if needed.
|
||||
GrSurfaceProxyView outputSurfaceView() { return fOutputView; }
|
||||
GrSurfaceProxyView writeSurfaceView() { return fWriteView; }
|
||||
|
||||
// This entry point should only be called if the backing GPU object is known to be
|
||||
// instantiated.
|
||||
@ -694,7 +694,7 @@ private:
|
||||
|
||||
std::unique_ptr<GrTextTarget> fTextTarget;
|
||||
|
||||
GrSurfaceProxyView fOutputView;
|
||||
GrSurfaceProxyView fWriteView;
|
||||
|
||||
// In MDB-mode the GrOpsTask can be closed by some other renderTargetContext that has picked
|
||||
// it up. For this reason, the GrOpsTask should only ever be accessed via 'getOpsTask'.
|
||||
|
@ -45,13 +45,13 @@ std::unique_ptr<GrSurfaceContext> GrSurfaceContext::Make(GrRecordingContext* con
|
||||
std::unique_ptr<GrSurfaceContext> surfaceContext;
|
||||
if (proxy->asRenderTargetProxy()) {
|
||||
SkASSERT(kPremul_SkAlphaType == alphaType || kOpaque_SkAlphaType == alphaType);
|
||||
// Will we ever want a swizzle that is not the default output swizzle for the format and
|
||||
// Will we ever want a swizzle that is not the default write swizzle for the format and
|
||||
// colorType here? If so we will need to manually pass that in.
|
||||
GrSwizzle outSwizzle =
|
||||
GrSwizzle writeSwizzle =
|
||||
context->priv().caps()->getWriteSwizzle(proxy->backendFormat(), colorType);
|
||||
GrSurfaceProxyView outputView(readView.refProxy(), readView.origin(), outSwizzle);
|
||||
GrSurfaceProxyView writeView(readView.refProxy(), readView.origin(), writeSwizzle);
|
||||
surfaceContext.reset(new GrRenderTargetContext(context, std::move(readView),
|
||||
std::move(outputView), colorType,
|
||||
std::move(writeView), colorType,
|
||||
std::move(colorSpace), nullptr));
|
||||
} else {
|
||||
surfaceContext.reset(new GrSurfaceContext(context, std::move(readView), colorType,
|
||||
|
@ -200,7 +200,7 @@ void GrCCCoverageProcessor::bindPipeline(GrOpFlushState* flushState, const GrPip
|
||||
GrProgramInfo programInfo(flushState->proxy()->numSamples(),
|
||||
flushState->proxy()->numStencilSamples(),
|
||||
flushState->proxy()->backendFormat(),
|
||||
flushState->outputView()->origin(), &pipeline, this,
|
||||
flushState->writeView()->origin(), &pipeline, this,
|
||||
this->primType());
|
||||
flushState->bindPipeline(programInfo, drawBounds);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
|
||||
private:
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
|
||||
|
@ -137,7 +137,7 @@ void GrCCPathProcessor::drawPaths(GrOpFlushState* flushState, const GrPipeline&
|
||||
|
||||
GrRenderTargetProxy* rtProxy = flushState->proxy();
|
||||
GrProgramInfo programInfo(rtProxy->numSamples(), rtProxy->numStencilSamples(),
|
||||
rtProxy->backendFormat(), flushState->outputView()->origin(),
|
||||
rtProxy->backendFormat(), flushState->writeView()->origin(),
|
||||
&pipeline, this, primitiveType);
|
||||
|
||||
flushState->bindPipelineAndScissorClip(programInfo, bounds);
|
||||
|
@ -59,7 +59,7 @@ protected:
|
||||
|
||||
private:
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) final {}
|
||||
void onPrepare(GrOpFlushState*) final {}
|
||||
|
@ -735,7 +735,7 @@ void GrCCStroker::drawLog2Strokes(int numSegmentsLog2, GrOpFlushState* flushStat
|
||||
GrProgramInfo programInfo(flushState->proxy()->numSamples(),
|
||||
flushState->proxy()->numStencilSamples(),
|
||||
flushState->proxy()->backendFormat(),
|
||||
flushState->outputView()->origin(), &pipeline, &processor,
|
||||
flushState->writeView()->origin(), &pipeline, &processor,
|
||||
GrPrimitiveType::kTriangleStrip);
|
||||
|
||||
flushState->bindPipeline(programInfo, SkRect::Make(drawBounds));
|
||||
|
@ -151,7 +151,7 @@ void GrStencilAtlasOp::onExecute(GrOpFlushState* flushState, const SkRect& chain
|
||||
GrProgramInfo programInfo(flushState->proxy()->numSamples(),
|
||||
flushState->proxy()->numStencilSamples(),
|
||||
flushState->proxy()->backendFormat(),
|
||||
flushState->outputView()->origin(), &resolvePipeline, &primProc,
|
||||
flushState->writeView()->origin(), &resolvePipeline, &primProc,
|
||||
GrPrimitiveType::kTriangleStrip);
|
||||
|
||||
flushState->bindPipeline(programInfo, SkRect::Make(drawBoundsRect));
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
|
||||
private:
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
void onPrepare(GrOpFlushState*) override {}
|
||||
|
@ -743,7 +743,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
SkMatrix invert;
|
||||
@ -755,7 +755,7 @@ private:
|
||||
fHelper.usesLocalCoords(),
|
||||
fWideColor);
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, outputView,
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView, quadProcessor,
|
||||
GrPrimitiveType::kTriangles);
|
||||
|
@ -867,15 +867,15 @@ public:
|
||||
|
||||
private:
|
||||
void makeLineProgramInfo(const GrCaps&, SkArenaAlloc*, const GrPipeline*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
const SkMatrix* geometryProcessorViewM,
|
||||
const SkMatrix* geometryProcessorLocalM);
|
||||
void makeQuadProgramInfo(const GrCaps&, SkArenaAlloc*, const GrPipeline*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
const SkMatrix* geometryProcessorViewM,
|
||||
const SkMatrix* geometryProcessorLocalM);
|
||||
void makeConicProgramInfo(const GrCaps&, SkArenaAlloc*, const GrPipeline*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
const SkMatrix* geometryProcessorViewM,
|
||||
const SkMatrix* geometryProcessorLocalM);
|
||||
|
||||
@ -890,12 +890,12 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&) override;
|
||||
|
||||
void onPrePrepareDraws(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override;
|
||||
|
||||
@ -971,7 +971,7 @@ GR_MAKE_BITFIELD_OPS(AAHairlineOp::Program)
|
||||
|
||||
void AAHairlineOp::makeLineProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
|
||||
const GrPipeline* pipeline,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
const SkMatrix* geometryProcessorViewM,
|
||||
const SkMatrix* geometryProcessorLocalM) {
|
||||
if (fProgramInfos[0]) {
|
||||
@ -995,14 +995,13 @@ void AAHairlineOp::makeLineProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
|
||||
SkASSERT(sizeof(LineVertex) == lineGP->vertexStride());
|
||||
}
|
||||
|
||||
fProgramInfos[0] = GrSimpleMeshDrawOpHelper::CreateProgramInfo(arena, pipeline,
|
||||
outputView, lineGP,
|
||||
fProgramInfos[0] = GrSimpleMeshDrawOpHelper::CreateProgramInfo(arena, pipeline, writeView, lineGP,
|
||||
GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
void AAHairlineOp::makeQuadProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
|
||||
const GrPipeline* pipeline,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
const SkMatrix* geometryProcessorViewM,
|
||||
const SkMatrix* geometryProcessorLocalM) {
|
||||
if (fProgramInfos[1]) {
|
||||
@ -1019,14 +1018,13 @@ void AAHairlineOp::makeQuadProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
|
||||
this->coverage());
|
||||
SkASSERT(sizeof(BezierVertex) == quadGP->vertexStride());
|
||||
|
||||
fProgramInfos[1] = GrSimpleMeshDrawOpHelper::CreateProgramInfo(arena, pipeline,
|
||||
outputView, quadGP,
|
||||
fProgramInfos[1] = GrSimpleMeshDrawOpHelper::CreateProgramInfo(arena, pipeline, writeView, quadGP,
|
||||
GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
void AAHairlineOp::makeConicProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
|
||||
const GrPipeline* pipeline,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
const SkMatrix* geometryProcessorViewM,
|
||||
const SkMatrix* geometryProcessorLocalM) {
|
||||
if (fProgramInfos[2]) {
|
||||
@ -1043,8 +1041,7 @@ void AAHairlineOp::makeConicProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
|
||||
this->coverage());
|
||||
SkASSERT(sizeof(BezierVertex) == conicGP->vertexStride());
|
||||
|
||||
fProgramInfos[2] = GrSimpleMeshDrawOpHelper::CreateProgramInfo(arena, pipeline,
|
||||
outputView, conicGP,
|
||||
fProgramInfos[2] = GrSimpleMeshDrawOpHelper::CreateProgramInfo(arena, pipeline, writeView, conicGP,
|
||||
GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
@ -1076,7 +1073,7 @@ AAHairlineOp::Program AAHairlineOp::predictPrograms(const GrCaps* caps) const {
|
||||
|
||||
void AAHairlineOp::onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) {
|
||||
// Setup the viewmatrix and localmatrix for the GrGeometryProcessor.
|
||||
@ -1094,26 +1091,26 @@ void AAHairlineOp::onCreateProgramInfo(const GrCaps* caps,
|
||||
geometryProcessorLocalM = &SkMatrix::I();
|
||||
}
|
||||
|
||||
auto pipeline = fHelper.createPipelineWithStencil(caps, arena, outputView->swizzle(),
|
||||
auto pipeline = fHelper.createPipelineWithStencil(caps, arena, writeView->swizzle(),
|
||||
std::move(appliedClip), dstProxyView);
|
||||
|
||||
if (fCharacterization & kLine_Program) {
|
||||
this->makeLineProgramInfo(*caps, arena, pipeline, outputView,
|
||||
this->makeLineProgramInfo(*caps, arena, pipeline, writeView,
|
||||
geometryProcessorViewM, geometryProcessorLocalM);
|
||||
}
|
||||
if (fCharacterization & kQuad_Program) {
|
||||
this->makeQuadProgramInfo(*caps, arena, pipeline, outputView,
|
||||
this->makeQuadProgramInfo(*caps, arena, pipeline, writeView,
|
||||
geometryProcessorViewM, geometryProcessorLocalM);
|
||||
}
|
||||
if (fCharacterization & kConic_Program) {
|
||||
this->makeConicProgramInfo(*caps, arena, pipeline, outputView,
|
||||
this->makeConicProgramInfo(*caps, arena, pipeline, writeView,
|
||||
geometryProcessorViewM, geometryProcessorLocalM);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void AAHairlineOp::onPrePrepareDraws(GrRecordingContext* context,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip* clip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) {
|
||||
SkArenaAlloc* arena = context->priv().recordTimeAllocator();
|
||||
@ -1125,7 +1122,7 @@ void AAHairlineOp::onPrePrepareDraws(GrRecordingContext* context,
|
||||
// Conservatively predict which programs will be required
|
||||
fCharacterization = this->predictPrograms(caps);
|
||||
|
||||
this->createProgramInfo(caps, arena, outputView, std::move(appliedClip), dstProxyView);
|
||||
this->createProgramInfo(caps, arena, writeView, std::move(appliedClip), dstProxyView);
|
||||
|
||||
context->priv().recordProgramInfo(fProgramInfos[0]);
|
||||
context->priv().recordProgramInfo(fProgramInfos[1]);
|
||||
|
@ -208,7 +208,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
GrGeometryProcessor* gp = create_lines_only_gp(arena,
|
||||
@ -221,7 +221,7 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, outputView,
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, writeView,
|
||||
std::move(appliedClip), dstProxyView,
|
||||
gp, GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
@ -116,14 +116,14 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&) override {
|
||||
// TODO [PI]: implement
|
||||
}
|
||||
|
||||
void onPrePrepareDraws(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {
|
||||
// TODO [PI]: implement
|
||||
|
@ -92,7 +92,7 @@ private:
|
||||
}
|
||||
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
|
||||
|
@ -55,7 +55,7 @@ private:
|
||||
}
|
||||
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
|
||||
|
@ -330,7 +330,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
|
||||
@ -365,7 +365,7 @@ private:
|
||||
|
||||
fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps,
|
||||
arena,
|
||||
outputView,
|
||||
writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView,
|
||||
gp,
|
||||
|
@ -430,7 +430,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
GrGeometryProcessor* gp;
|
||||
@ -449,7 +449,7 @@ private:
|
||||
|
||||
SkASSERT(gp->vertexStride() == sizeof(SkPoint));
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, outputView,
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView, gp, this->primType());
|
||||
|
||||
|
@ -57,7 +57,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&) override;
|
||||
|
||||
@ -200,7 +200,7 @@ SkString DrawAtlasOp::dumpInfo() const {
|
||||
|
||||
void DrawAtlasOp::onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) {
|
||||
// Setup geometry processor
|
||||
@ -209,7 +209,7 @@ void DrawAtlasOp::onCreateProgramInfo(const GrCaps* caps,
|
||||
this->color(),
|
||||
this->viewMatrix());
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, outputView, std::move(appliedClip),
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, writeView, std::move(appliedClip),
|
||||
dstProxyView, gp, GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ void GrDrawPathOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBoun
|
||||
GrProgramInfo programInfo(proxy->numSamples(),
|
||||
proxy->numStencilSamples(),
|
||||
proxy->backendFormat(),
|
||||
flushState->outputView()->origin(),
|
||||
flushState->writeView()->origin(),
|
||||
pipeline,
|
||||
pathProc.get(),
|
||||
GrPrimitiveType::kPath);
|
||||
|
@ -55,7 +55,7 @@ protected:
|
||||
|
||||
private:
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) final {}
|
||||
|
||||
|
@ -295,7 +295,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&) override;
|
||||
|
||||
@ -453,11 +453,11 @@ GrGeometryProcessor* DrawVerticesOp::makeGP(SkArenaAlloc* arena) {
|
||||
|
||||
void DrawVerticesOp::onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) {
|
||||
GrGeometryProcessor* gp = this->makeGP(arena);
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, outputView, std::move(appliedClip),
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, writeView, std::move(appliedClip),
|
||||
dstProxyView, gp, this->primitiveType());
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ private:
|
||||
}
|
||||
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
|
||||
|
@ -102,7 +102,7 @@ private:
|
||||
// Create a GrProgramInfo object in the provided arena
|
||||
void onCreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&) final;
|
||||
|
||||
@ -863,13 +863,13 @@ GrGLSLPrimitiveProcessor* FillRRectOp::Processor::createGLSLInstance(
|
||||
|
||||
void FillRRectOp::onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) {
|
||||
GrGeometryProcessor* gp = Processor::Make(arena, fHelper.aaType(), fProcessorFlags);
|
||||
SkASSERT(gp->instanceStride() == (size_t)fInstanceStride);
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, outputView, std::move(appliedClip),
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, writeView, std::move(appliedClip),
|
||||
dstProxyView, gp, GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
const VertexSpec vertexSpec = this->vertexSpec();
|
||||
@ -233,14 +233,14 @@ private:
|
||||
GrGeometryProcessor* gp = GrQuadPerEdgeAA::MakeProcessor(arena, vertexSpec);
|
||||
SkASSERT(gp->vertexStride() == vertexSpec.vertexSize());
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, outputView,
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView, gp,
|
||||
vertexSpec.primitiveType());
|
||||
}
|
||||
|
||||
void onPrePrepareDraws(GrRecordingContext* context,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip* clip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
|
||||
@ -252,7 +252,7 @@ private:
|
||||
// This is equivalent to a GrOpFlushState::detachAppliedClip
|
||||
GrAppliedClip appliedClip = clip ? std::move(*clip) : GrAppliedClip();
|
||||
|
||||
this->createProgramInfo(context->priv().caps(), arena, outputView,
|
||||
this->createProgramInfo(context->priv().caps(), arena, writeView,
|
||||
std::move(appliedClip), dstProxyView);
|
||||
|
||||
context->priv().recordProgramInfo(fProgramInfo);
|
||||
|
@ -216,7 +216,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
|
||||
@ -225,7 +225,7 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps, arena, outputView,
|
||||
fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps, arena, writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView, gp,
|
||||
fHelper.detachProcessorSet(),
|
||||
|
@ -19,7 +19,7 @@ void GrMeshDrawOp::onPrepare(GrOpFlushState* state) { this->onPrepareDraws(state
|
||||
void GrMeshDrawOp::createProgramInfo(Target* target) {
|
||||
this->createProgramInfo(&target->caps(),
|
||||
target->allocator(),
|
||||
target->outputView(),
|
||||
target->writeView(),
|
||||
target->detachAppliedClip(),
|
||||
target->dstProxyView());
|
||||
}
|
||||
@ -27,7 +27,7 @@ void GrMeshDrawOp::createProgramInfo(Target* target) {
|
||||
// This onPrepareDraws implementation assumes the derived Op only has a single programInfo -
|
||||
// which is the majority of the cases.
|
||||
void GrMeshDrawOp::onPrePrepareDraws(GrRecordingContext* context,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip* clip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) {
|
||||
SkArenaAlloc* arena = context->priv().recordTimeAllocator();
|
||||
@ -35,7 +35,7 @@ void GrMeshDrawOp::onPrePrepareDraws(GrRecordingContext* context,
|
||||
// This is equivalent to a GrOpFlushState::detachAppliedClip
|
||||
GrAppliedClip appliedClip = clip ? std::move(*clip) : GrAppliedClip();
|
||||
|
||||
this->createProgramInfo(context->priv().caps(), arena, outputView,
|
||||
this->createProgramInfo(context->priv().caps(), arena, writeView,
|
||||
std::move(appliedClip), dstProxyView);
|
||||
|
||||
// TODO: at this point we've created both the program info and desc in the recording context's
|
||||
|
@ -38,10 +38,10 @@ protected:
|
||||
|
||||
void createProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) {
|
||||
this->onCreateProgramInfo(caps, arena, outputView, std::move(appliedClip), dstProxyView);
|
||||
this->onCreateProgramInfo(caps, arena, writeView, std::move(appliedClip), dstProxyView);
|
||||
}
|
||||
|
||||
void createProgramInfo(Target* target);
|
||||
@ -100,7 +100,7 @@ protected:
|
||||
}
|
||||
|
||||
virtual void onPrePrepareDraws(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&);
|
||||
|
||||
@ -110,15 +110,15 @@ private:
|
||||
// by this op.
|
||||
virtual void onCreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&) = 0;
|
||||
|
||||
void onPrePrepare(GrRecordingContext* context,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip* clip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) final {
|
||||
this->onPrePrepareDraws(context, outputView, clip, dstProxyView);
|
||||
this->onPrePrepareDraws(context, writeView, clip, dstProxyView);
|
||||
}
|
||||
void onPrepare(GrOpFlushState* state) final;
|
||||
|
||||
@ -195,7 +195,7 @@ public:
|
||||
}
|
||||
|
||||
virtual GrRenderTargetProxy* proxy() const = 0;
|
||||
virtual const GrSurfaceProxyView* outputView() const = 0;
|
||||
virtual const GrSurfaceProxyView* writeView() const = 0;
|
||||
|
||||
virtual const GrAppliedClip* appliedClip() const = 0;
|
||||
virtual GrAppliedClip detachAppliedClip() = 0;
|
||||
|
@ -297,7 +297,7 @@ private:
|
||||
|
||||
// TODO: the parameters to onPrePrepare mirror GrOpFlushState::OpArgs - fuse the two?
|
||||
virtual void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) = 0;
|
||||
virtual void onPrepare(GrOpFlushState*) = 0;
|
||||
|
@ -1274,7 +1274,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
SkMatrix localMatrix;
|
||||
@ -1287,7 +1287,7 @@ private:
|
||||
fRoundCaps, fWideColor,
|
||||
localMatrix);
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, outputView, std::move(appliedClip),
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, writeView, std::move(appliedClip),
|
||||
dstProxyView, gp, GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
@ -1638,7 +1638,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
SkMatrix localMatrix;
|
||||
@ -1651,7 +1651,7 @@ private:
|
||||
fWideColor,
|
||||
localMatrix);
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, outputView, std::move(appliedClip),
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, writeView, std::move(appliedClip),
|
||||
dstProxyView, gp, GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
@ -1969,7 +1969,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
SkMatrix localMatrix;
|
||||
@ -1980,7 +1980,7 @@ private:
|
||||
GrGeometryProcessor* gp = EllipseGeometryProcessor::Make(arena, fStroked, fWideColor,
|
||||
fUseScale, localMatrix);
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, outputView, std::move(appliedClip),
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, writeView, std::move(appliedClip),
|
||||
dstProxyView, gp, GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
@ -2246,14 +2246,14 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
GrGeometryProcessor* gp = DIEllipseGeometryProcessor::Make(arena, fWideColor, fUseScale,
|
||||
this->viewMatrix(),
|
||||
this->style());
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, outputView, std::move(appliedClip),
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, writeView, std::move(appliedClip),
|
||||
dstProxyView, gp, GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
@ -2644,7 +2644,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
// Invert the view matrix as a local matrix (if any other processors require coords).
|
||||
@ -2657,7 +2657,7 @@ private:
|
||||
false, false, false, false,
|
||||
fWideColor, localMatrix);
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, outputView, std::move(appliedClip),
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, writeView, std::move(appliedClip),
|
||||
dstProxyView, gp, GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
@ -2967,7 +2967,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
SkMatrix localMatrix;
|
||||
@ -2978,7 +2978,7 @@ private:
|
||||
GrGeometryProcessor* gp = EllipseGeometryProcessor::Make(arena, fStroked, fWideColor,
|
||||
fUseScale, localMatrix);
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, outputView, std::move(appliedClip),
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, writeView, std::move(appliedClip),
|
||||
dstProxyView, gp, GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
GrGeometryProcessor* gp = make_gp(arena, fViewMatrix, fWideColor);
|
||||
@ -111,7 +111,7 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, outputView,
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, writeView,
|
||||
std::move(appliedClip), dstProxyView,
|
||||
gp, GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
@ -544,13 +544,13 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
GrGeometryProcessor* gp = GrRRectShadowGeoProc::Make(arena, fFalloffView);
|
||||
SkASSERT(sizeof(CircleVertex) == gp->vertexStride());
|
||||
|
||||
fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps, arena, outputView,
|
||||
fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps, arena, writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView, gp,
|
||||
GrProcessorSet::MakeEmptySet(),
|
||||
|
@ -111,7 +111,7 @@ GrProcessorSet::Analysis GrSimpleMeshDrawOpHelper::finalizeProcessors(
|
||||
const GrPipeline* GrSimpleMeshDrawOpHelper::CreatePipeline(
|
||||
const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
GrSwizzle outputViewSwizzle,
|
||||
GrSwizzle writeViewSwizzle,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView,
|
||||
GrProcessorSet&& processorSet,
|
||||
@ -123,7 +123,7 @@ const GrPipeline* GrSimpleMeshDrawOpHelper::CreatePipeline(
|
||||
pipelineArgs.fUserStencil = stencilSettings;
|
||||
pipelineArgs.fCaps = caps;
|
||||
pipelineArgs.fDstProxyView = dstProxyView;
|
||||
pipelineArgs.fWriteSwizzle = outputViewSwizzle;
|
||||
pipelineArgs.fWriteSwizzle = writeViewSwizzle;
|
||||
|
||||
return arena->make<GrPipeline>(pipelineArgs,
|
||||
std::move(processorSet),
|
||||
@ -137,7 +137,7 @@ const GrPipeline* GrSimpleMeshDrawOpHelper::CreatePipeline(
|
||||
const GrUserStencilSettings* stencilSettings) {
|
||||
return CreatePipeline(&flushState->caps(),
|
||||
flushState->allocator(),
|
||||
flushState->outputView()->swizzle(),
|
||||
flushState->writeView()->swizzle(),
|
||||
flushState->detachAppliedClip(),
|
||||
flushState->dstProxyView(),
|
||||
std::move(processorSet),
|
||||
@ -148,7 +148,7 @@ const GrPipeline* GrSimpleMeshDrawOpHelper::CreatePipeline(
|
||||
const GrPipeline* GrSimpleMeshDrawOpHelper::createPipeline(GrOpFlushState* flushState) {
|
||||
return CreatePipeline(&flushState->caps(),
|
||||
flushState->allocator(),
|
||||
flushState->outputView()->swizzle(),
|
||||
flushState->writeView()->swizzle(),
|
||||
flushState->detachAppliedClip(),
|
||||
flushState->dstProxyView(),
|
||||
this->detachProcessorSet(),
|
||||
@ -158,7 +158,7 @@ const GrPipeline* GrSimpleMeshDrawOpHelper::createPipeline(GrOpFlushState* flush
|
||||
GrProgramInfo* GrSimpleMeshDrawOpHelper::CreateProgramInfo(
|
||||
const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView,
|
||||
GrGeometryProcessor* geometryProcessor,
|
||||
@ -168,27 +168,27 @@ GrProgramInfo* GrSimpleMeshDrawOpHelper::CreateProgramInfo(
|
||||
const GrUserStencilSettings* stencilSettings) {
|
||||
auto pipeline = CreatePipeline(caps,
|
||||
arena,
|
||||
outputView->swizzle(),
|
||||
writeView->swizzle(),
|
||||
std::move(appliedClip),
|
||||
dstProxyView,
|
||||
std::move(processorSet),
|
||||
pipelineFlags,
|
||||
stencilSettings);
|
||||
|
||||
return CreateProgramInfo(arena, pipeline, outputView, geometryProcessor, primitiveType);
|
||||
return CreateProgramInfo(arena, pipeline, writeView, geometryProcessor, primitiveType);
|
||||
}
|
||||
|
||||
GrProgramInfo* GrSimpleMeshDrawOpHelper::CreateProgramInfo(SkArenaAlloc* arena,
|
||||
const GrPipeline* pipeline,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrGeometryProcessor* geometryProcessor,
|
||||
GrPrimitiveType primitiveType) {
|
||||
GrRenderTargetProxy* outputProxy = outputView->asRenderTargetProxy();
|
||||
GrRenderTargetProxy* outputProxy = writeView->asRenderTargetProxy();
|
||||
|
||||
auto tmp = arena->make<GrProgramInfo>(outputProxy->numSamples(),
|
||||
outputProxy->numStencilSamples(),
|
||||
outputProxy->backendFormat(),
|
||||
outputView->origin(),
|
||||
writeView->origin(),
|
||||
pipeline,
|
||||
geometryProcessor,
|
||||
primitiveType);
|
||||
@ -198,14 +198,14 @@ GrProgramInfo* GrSimpleMeshDrawOpHelper::CreateProgramInfo(SkArenaAlloc* arena,
|
||||
GrProgramInfo* GrSimpleMeshDrawOpHelper::createProgramInfo(
|
||||
const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView,
|
||||
GrGeometryProcessor* gp,
|
||||
GrPrimitiveType primType) {
|
||||
return CreateProgramInfo(caps,
|
||||
arena,
|
||||
outputView,
|
||||
writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView,
|
||||
gp,
|
||||
|
@ -126,7 +126,7 @@ public:
|
||||
static const GrPipeline* CreatePipeline(
|
||||
const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
GrSwizzle outputViewSwizzle,
|
||||
GrSwizzle writeViewSwizzle,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&,
|
||||
GrProcessorSet&&,
|
||||
@ -142,7 +142,7 @@ public:
|
||||
|
||||
static GrProgramInfo* CreateProgramInfo(SkArenaAlloc*,
|
||||
const GrPipeline*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrGeometryProcessor*,
|
||||
GrPrimitiveType);
|
||||
|
||||
@ -151,7 +151,7 @@ public:
|
||||
// it has no dynamic state besides the scissor clip
|
||||
static GrProgramInfo* CreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&,
|
||||
GrGeometryProcessor*,
|
||||
@ -164,7 +164,7 @@ public:
|
||||
|
||||
GrProgramInfo* createProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&,
|
||||
GrGeometryProcessor*,
|
||||
|
@ -10,12 +10,12 @@
|
||||
const GrPipeline* GrSimpleMeshDrawOpHelperWithStencil::createPipelineWithStencil(
|
||||
const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
GrSwizzle outputViewSwizzle,
|
||||
GrSwizzle writeViewSwizzle,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) {
|
||||
return GrSimpleMeshDrawOpHelper::CreatePipeline(caps,
|
||||
arena,
|
||||
outputViewSwizzle,
|
||||
writeViewSwizzle,
|
||||
std::move(appliedClip),
|
||||
dstProxyView,
|
||||
this->detachProcessorSet(),
|
||||
@ -27,7 +27,7 @@ const GrPipeline* GrSimpleMeshDrawOpHelperWithStencil::createPipelineWithStencil
|
||||
GrOpFlushState* flushState) {
|
||||
return this->createPipelineWithStencil(&flushState->caps(),
|
||||
flushState->allocator(),
|
||||
flushState->outputView()->swizzle(),
|
||||
flushState->writeView()->swizzle(),
|
||||
flushState->detachAppliedClip(),
|
||||
flushState->dstProxyView());
|
||||
}
|
||||
@ -72,14 +72,14 @@ bool GrSimpleMeshDrawOpHelperWithStencil::isCompatible(
|
||||
GrProgramInfo* GrSimpleMeshDrawOpHelperWithStencil::createProgramInfoWithStencil(
|
||||
const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeViewSwizzle,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView,
|
||||
GrGeometryProcessor* gp,
|
||||
GrPrimitiveType primType) {
|
||||
return CreateProgramInfo(caps,
|
||||
arena,
|
||||
outputView,
|
||||
writeViewSwizzle,
|
||||
std::move(appliedClip),
|
||||
dstProxyView,
|
||||
gp,
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
|
||||
const GrPipeline* createPipelineWithStencil(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
GrSwizzle outputViewSwizzle,
|
||||
GrSwizzle writeViewSwizzle,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&);
|
||||
|
||||
@ -32,7 +32,7 @@ public:
|
||||
|
||||
GrProgramInfo* createProgramInfoWithStencil(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeViewSwizzle,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&,
|
||||
GrGeometryProcessor*,
|
||||
|
@ -318,14 +318,14 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&) override {
|
||||
// TODO [PI]: implement
|
||||
}
|
||||
|
||||
void onPrePrepareDraws(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {
|
||||
// TODO [PI]: implement
|
||||
|
@ -57,7 +57,7 @@ private:
|
||||
}
|
||||
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
|
||||
|
@ -185,7 +185,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& clip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
GrGeometryProcessor* gp;
|
||||
@ -202,7 +202,7 @@ private:
|
||||
GrPrimitiveType primType = (fStrokeWidth > 0) ? GrPrimitiveType::kTriangleStrip
|
||||
: GrPrimitiveType::kLineStrip;
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, outputView, std::move(clip),
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, writeView, std::move(clip),
|
||||
dstProxyView, gp, primType);
|
||||
}
|
||||
|
||||
@ -462,7 +462,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&) override;
|
||||
|
||||
@ -518,7 +518,7 @@ private:
|
||||
|
||||
void AAStrokeRectOp::onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) {
|
||||
|
||||
@ -534,7 +534,7 @@ void AAStrokeRectOp::onCreateProgramInfo(const GrCaps* caps,
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfo(caps,
|
||||
arena,
|
||||
outputView,
|
||||
writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView,
|
||||
gp,
|
||||
|
@ -625,7 +625,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
SkASSERT(fDesc);
|
||||
@ -650,13 +650,13 @@ private:
|
||||
GrPipeline::InputFlags::kHWAntialias : GrPipeline::InputFlags::kNone;
|
||||
|
||||
fDesc->fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(
|
||||
caps, arena, outputView, std::move(appliedClip), dstProxyView, gp,
|
||||
caps, arena, writeView, std::move(appliedClip), dstProxyView, gp,
|
||||
GrProcessorSet::MakeEmptySet(), fDesc->fVertexSpec.primitiveType(),
|
||||
pipelineFlags);
|
||||
}
|
||||
|
||||
void onPrePrepareDraws(GrRecordingContext* context,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip* clip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
|
||||
@ -672,7 +672,7 @@ private:
|
||||
FillInVertices(*context->priv().caps(), this, fDesc, fDesc->fPrePreparedVertices);
|
||||
|
||||
// This will call onCreateProgramInfo and register the created program with the DDL.
|
||||
this->INHERITED::onPrePrepareDraws(context, outputView, clip, dstProxyView);
|
||||
this->INHERITED::onPrePrepareDraws(context, writeView, clip, dstProxyView);
|
||||
}
|
||||
|
||||
static void FillInVertices(const GrCaps& caps, TextureOp* texOp, Desc* desc, char* vertexData) {
|
||||
|
@ -325,7 +325,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
GrGeometryProcessor* gp;
|
||||
@ -367,7 +367,7 @@ private:
|
||||
GrPrimitiveType primitiveType = TRIANGULATOR_WIREFRAME ? GrPrimitiveType::kLines
|
||||
: GrPrimitiveType::kTriangles;
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, outputView,
|
||||
fProgramInfo = fHelper.createProgramInfoWithStencil(caps, arena, writeView,
|
||||
std::move(appliedClip), dstProxyView,
|
||||
gp, primitiveType);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ GrOp::CombineResult GrDrawAtlasPathOp::onCombineIfPossible(
|
||||
}
|
||||
|
||||
void GrDrawAtlasPathOp::onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) {
|
||||
}
|
||||
@ -178,7 +178,7 @@ void GrDrawAtlasPathOp::onExecute(GrOpFlushState* state, const SkRect& chainBoun
|
||||
SkASSERT(shader.instanceStride() == Instance::Stride(fUsesLocalCoords));
|
||||
|
||||
GrProgramInfo programInfo(state->proxy()->numSamples(), state->proxy()->numStencilSamples(),
|
||||
state->proxy()->backendFormat(), state->outputView()->origin(),
|
||||
state->proxy()->backendFormat(), state->writeView()->origin(),
|
||||
&pipeline, &shader, GrPrimitiveType::kTriangleStrip);
|
||||
|
||||
state->bindPipelineAndScissorClip(programInfo, this->bounds());
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
|
||||
private:
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override;
|
||||
|
||||
|
@ -24,7 +24,7 @@ GrTessellatePathOp::FixedFunctionFlags GrTessellatePathOp::fixedFunctionFlags()
|
||||
}
|
||||
|
||||
void GrTessellatePathOp::onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) {
|
||||
}
|
||||
@ -140,7 +140,7 @@ void GrTessellatePathOp::drawStencilPass(GrOpFlushState* state) {
|
||||
|
||||
if (fStencilPathShader) {
|
||||
SkASSERT(fPathVertexBuffer);
|
||||
GrPathShader::ProgramInfo programInfo(state->outputView(), &pipeline, fStencilPathShader);
|
||||
GrPathShader::ProgramInfo programInfo(state->writeView(), &pipeline, fStencilPathShader);
|
||||
state->bindPipelineAndScissorClip(programInfo, this->bounds());
|
||||
state->bindBuffers(nullptr, nullptr, fPathVertexBuffer.get());
|
||||
state->draw(fPathVertexCount, fBasePathVertex);
|
||||
@ -149,7 +149,7 @@ void GrTessellatePathOp::drawStencilPass(GrOpFlushState* state) {
|
||||
if (fCubicInstanceBuffer) {
|
||||
// Here we treat the cubic instance buffer as tessellation patches to stencil the curves.
|
||||
GrStencilCubicShader shader(fViewMatrix);
|
||||
GrPathShader::ProgramInfo programInfo(state->outputView(), &pipeline, &shader);
|
||||
GrPathShader::ProgramInfo programInfo(state->writeView(), &pipeline, &shader);
|
||||
state->bindPipelineAndScissorClip(programInfo, this->bounds());
|
||||
// Bind instancedBuff as vertex.
|
||||
state->bindBuffers(nullptr, nullptr, fCubicInstanceBuffer.get());
|
||||
@ -236,7 +236,7 @@ void GrTessellatePathOp::drawCoverPass(GrOpFlushState* state) {
|
||||
SkASSERT(!pipeline.hasStencilClip());
|
||||
pipeline.setUserStencil(&kFillOrInvertStencil);
|
||||
}
|
||||
GrPathShader::ProgramInfo programInfo(state->outputView(), &pipeline, fFillPathShader);
|
||||
GrPathShader::ProgramInfo programInfo(state->writeView(), &pipeline, fFillPathShader);
|
||||
state->bindPipelineAndScissorClip(programInfo, this->bounds());
|
||||
state->bindTextures(*fFillPathShader, nullptr, pipeline);
|
||||
state->bindBuffers(nullptr, nullptr, fPathVertexBuffer.get());
|
||||
@ -248,7 +248,7 @@ void GrTessellatePathOp::drawCoverPass(GrOpFlushState* state) {
|
||||
// remaining samples and reset the stencil buffer.
|
||||
pipeline.setUserStencil(&kTestAndResetStencil);
|
||||
GrFillCubicHullShader shader(fViewMatrix, fColor);
|
||||
GrPathShader::ProgramInfo programInfo(state->outputView(), &pipeline, &shader);
|
||||
GrPathShader::ProgramInfo programInfo(state->writeView(), &pipeline, &shader);
|
||||
state->bindPipelineAndScissorClip(programInfo, this->bounds());
|
||||
state->bindTextures(shader, nullptr, pipeline);
|
||||
state->bindBuffers(nullptr, fCubicInstanceBuffer.get(), nullptr);
|
||||
@ -258,7 +258,7 @@ void GrTessellatePathOp::drawCoverPass(GrOpFlushState* state) {
|
||||
// There is not a fill shader for the path. Just draw a bounding box.
|
||||
pipeline.setUserStencil(&kTestAndResetStencil);
|
||||
GrFillBoundingBoxShader shader(fViewMatrix, fColor, fPath.getBounds());
|
||||
GrPathShader::ProgramInfo programInfo(state->outputView(), &pipeline, &shader);
|
||||
GrPathShader::ProgramInfo programInfo(state->writeView(), &pipeline, &shader);
|
||||
state->bindPipelineAndScissorClip(programInfo, this->bounds());
|
||||
state->bindTextures(shader, nullptr, pipeline);
|
||||
state->bindBuffers(nullptr, nullptr, nullptr);
|
||||
|
@ -54,7 +54,7 @@ private:
|
||||
|
||||
FixedFunctionFlags fixedFunctionFlags() const override;
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override;
|
||||
void onPrepare(GrOpFlushState* state) override;
|
||||
|
@ -220,7 +220,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrAtlasTextOpPreparation, reporter, ctxInfo)
|
||||
|
||||
GrOpFlushState flushState(gpu, resourceProvider, uploadTarget.writeableTokenTracker());
|
||||
|
||||
GrSurfaceProxyView surfaceView = rtc->outputSurfaceView();
|
||||
GrSurfaceProxyView surfaceView = rtc->writeSurfaceView();
|
||||
GrOpFlushState::OpArgs opArgs(op.get(),
|
||||
&surfaceView,
|
||||
nullptr,
|
||||
|
@ -322,7 +322,7 @@ private:
|
||||
}
|
||||
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
void onPrepare(GrOpFlushState* state) override {
|
||||
@ -465,7 +465,7 @@ GrOpsRenderPass* DrawMeshHelper::bindPipeline(GrPrimitiveType primitiveType, boo
|
||||
hasVertexBuffer);
|
||||
|
||||
GrProgramInfo programInfo(fState->proxy()->numSamples(), fState->proxy()->numStencilSamples(),
|
||||
fState->proxy()->backendFormat(), fState->outputView()->origin(),
|
||||
fState->proxy()->backendFormat(), fState->writeView()->origin(),
|
||||
pipeline, mtp, primitiveType);
|
||||
|
||||
fState->opsRenderPass()->bindPipeline(programInfo, SkRect::MakeIWH(kImageWidth, kImageHeight));
|
||||
|
@ -146,7 +146,7 @@ private:
|
||||
return GrProcessorSet::EmptySetAnalysis();
|
||||
}
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
void onPrepare(GrOpFlushState*) override {}
|
||||
@ -164,7 +164,7 @@ private:
|
||||
GrProgramInfo programInfo(flushState->proxy()->numSamples(),
|
||||
flushState->proxy()->numStencilSamples(),
|
||||
flushState->proxy()->backendFormat(),
|
||||
flushState->outputView()->origin(),
|
||||
flushState->writeView()->origin(),
|
||||
&pipeline,
|
||||
geomProc,
|
||||
GrPrimitiveType::kTriangleStrip);
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
return GrProcessorSet::EmptySetAnalysis();
|
||||
}
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
|
||||
@ -363,7 +363,7 @@ private:
|
||||
return GrProcessorSet::EmptySetAnalysis();
|
||||
}
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
void onPrepare(GrOpFlushState*) override {}
|
||||
|
@ -101,7 +101,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
using namespace GrDefaultGeoProcFactory;
|
||||
@ -118,7 +118,7 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, outputView, std::move(appliedClip),
|
||||
fProgramInfo = fHelper.createProgramInfo(caps, arena, writeView, std::move(appliedClip),
|
||||
dstProxyView, gp, GrPrimitiveType::kTriangles);
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ private:
|
||||
}
|
||||
|
||||
void onPrePrepare(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override {}
|
||||
|
||||
@ -184,7 +184,7 @@ DEF_GPUTEST(OpChainTest, reporter, /*ctxInfo*/) {
|
||||
SkASSERT(proxy);
|
||||
proxy->instantiate(context->priv().resourceProvider());
|
||||
|
||||
GrSwizzle outSwizzle = context->priv().caps()->getWriteSwizzle(format, GrColorType::kRGBA_8888);
|
||||
GrSwizzle writeSwizzle = context->priv().caps()->getWriteSwizzle(format, GrColorType::kRGBA_8888);
|
||||
|
||||
int result[result_width()];
|
||||
int validResult[result_width()];
|
||||
@ -216,7 +216,7 @@ DEF_GPUTEST(OpChainTest, reporter, /*ctxInfo*/) {
|
||||
context->priv().resourceProvider(),
|
||||
&tracker);
|
||||
GrOpsTask opsTask(context->priv().arenas(),
|
||||
GrSurfaceProxyView(proxy, kOrigin, outSwizzle),
|
||||
GrSurfaceProxyView(proxy, kOrigin, writeSwizzle),
|
||||
context->priv().auditTrail());
|
||||
// This assumes the particular values of kRanges.
|
||||
std::fill_n(result, result_width(), -1);
|
||||
|
@ -60,7 +60,7 @@ private:
|
||||
|
||||
void onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) override {
|
||||
class GP : public GrGeometryProcessor {
|
||||
@ -127,7 +127,7 @@ private:
|
||||
|
||||
fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps,
|
||||
arena,
|
||||
outputView,
|
||||
writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView,
|
||||
gp,
|
||||
|
@ -67,11 +67,11 @@ private:
|
||||
GrProgramInfo* programInfo() override { return nullptr; }
|
||||
void onCreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&) override { return; }
|
||||
void onPrePrepareDraws(GrRecordingContext*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&) override { return; }
|
||||
void onPrepareDraws(Target* target) override { return; }
|
||||
|
@ -58,7 +58,7 @@ sk_sp<GrTextureProxy> MakeTextureProxyFromData(GrContext* context,
|
||||
|
||||
GrProgramInfo* CreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView,
|
||||
GrGeometryProcessor* geomProc,
|
||||
@ -77,7 +77,7 @@ GrProgramInfo* CreateProgramInfo(const GrCaps* caps,
|
||||
*caps, GrClampType::kAuto, &analysisColor);
|
||||
SkASSERT(!analysis.requiresDstTexture());
|
||||
|
||||
return GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps, arena, outputView,
|
||||
return GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps, arena, writeView,
|
||||
std::move(appliedClip), dstProxyView,
|
||||
geomProc, std::move(processors),
|
||||
primitiveType, flags, stencilSettings);
|
||||
|
@ -27,7 +27,7 @@ sk_sp<GrTextureProxy> MakeTextureProxyFromData(GrContext*,
|
||||
|
||||
GrProgramInfo* CreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&,
|
||||
GrGeometryProcessor*,
|
||||
|
@ -110,7 +110,7 @@ private:
|
||||
GrProgramInfo* programInfo() override { return fProgramInfo; }
|
||||
void onCreateProgramInfo(const GrCaps*,
|
||||
SkArenaAlloc*,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&) override;
|
||||
|
||||
@ -170,12 +170,12 @@ TestRectOp::TestRectOp(const GrCaps* caps,
|
||||
|
||||
void TestRectOp::onCreateProgramInfo(const GrCaps* caps,
|
||||
SkArenaAlloc* arena,
|
||||
const GrSurfaceProxyView* outputView,
|
||||
const GrSurfaceProxyView* writeView,
|
||||
GrAppliedClip&& appliedClip,
|
||||
const GrXferProcessor::DstProxyView& dstProxyView) {
|
||||
fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps,
|
||||
arena,
|
||||
outputView,
|
||||
writeView,
|
||||
std::move(appliedClip),
|
||||
dstProxyView,
|
||||
&fGP,
|
||||
|
Loading…
Reference in New Issue
Block a user