Pass the writeView as a const-ref instead of a pointer …

The important part is in GrOpFlushState.h were previously
we were taking a mutable pointer to the view, which should
at least be a const pointer and was making us do funky things
in some of the calling code. But I decided to go all the way
and do a const ref instead which is The Way It Should Be (tm).

Change-Id: I399d102e8b5e0a5059168cc450ae66f12ad47e13
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/336451
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
This commit is contained in:
Adlai Holler 2020-11-19 13:41:26 -05:00 committed by Skia Commit-Bot
parent a446ca15ed
commit e2296f7a70
71 changed files with 146 additions and 149 deletions

View File

@ -172,7 +172,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -91,7 +91,7 @@ protected:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -159,7 +159,7 @@ private:
GrProgramInfo* createProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) const {
@ -182,7 +182,7 @@ private:
}
void onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) final {

View File

@ -169,7 +169,7 @@ private:
GrProgramInfo* createProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) const {
@ -192,7 +192,7 @@ private:
}
void onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) final {

View File

@ -241,7 +241,7 @@ private:
GrProgramInfo* createProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) const {
@ -267,7 +267,7 @@ private:
}
void onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) final {

View File

@ -311,7 +311,7 @@ private:
}
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}
@ -327,7 +327,7 @@ private:
void onExecute(GrOpFlushState* state, const SkRect& chainBounds) override {
GrPipeline pipeline(GrScissorTest::kDisabled, SkBlendMode::kSrc,
state->drawOpArgs().writeSwizzle());
state->drawOpArgs().writeView().swizzle());
int tessellationPatchVertexCount;
std::unique_ptr<GrGeometryProcessor> shader;
if (fTriPositions) {
@ -344,7 +344,7 @@ private:
}
GrProgramInfo programInfo(state->proxy()->numSamples(), state->proxy()->numStencilSamples(),
state->proxy()->backendFormat(), state->writeView()->origin(),
state->proxy()->backendFormat(), state->writeView().origin(),
&pipeline, &GrUserStencilSettings::kUnused, shader.get(),
GrPrimitiveType::kPatches, tessellationPatchVertexCount,
state->renderPassBarriers());

View File

@ -101,7 +101,7 @@ private:
return GrProcessorSet::EmptySetAnalysis();
}
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}
@ -330,7 +330,7 @@ void CCPRGeometryView::DrawCoverageCountOp::onExecute(GrOpFlushState* state,
#endif
GrPipeline pipeline(GrScissorTest::kDisabled, SkBlendMode::kPlus,
state->drawOpArgs().writeSwizzle());
state->drawOpArgs().writeView().swizzle());
std::unique_ptr<GrCCCoverageProcessor> proc;
if (state->caps().shaderCaps()->geometryShaderSupport()) {

View File

@ -54,7 +54,7 @@ void GrOpFlushState::executeDrawsAndUploadsForMeshDrawOp(
GrProgramInfo programInfo(this->proxy()->numSamples(),
this->proxy()->numStencilSamples(),
this->proxy()->backendFormat(),
this->writeView()->origin(),
this->writeView().origin(),
pipeline,
userStencilSettings,
fCurrDraw->fGeometryProcessor,

View File

@ -58,23 +58,20 @@ public:
/** Additional data required on a per-op basis when executing GrOps. */
struct OpArgs {
// TODO: why does OpArgs have the op we're going to pass it to as a member? Remove it.
explicit OpArgs(GrOp* op, GrSurfaceProxyView* surfaceView, GrAppliedClip* appliedClip,
explicit OpArgs(GrOp* op, const GrSurfaceProxyView& surfaceView, GrAppliedClip* appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers)
: fOp(op)
, fSurfaceView(surfaceView)
, fRenderTargetProxy(surfaceView->asRenderTargetProxy())
, fRenderTargetProxy(surfaceView.asRenderTargetProxy())
, fAppliedClip(appliedClip)
, fDstProxyView(dstProxyView)
, fRenderPassXferBarriers(renderPassXferBarriers) {
SkASSERT(surfaceView->asRenderTargetProxy());
SkASSERT(surfaceView.asRenderTargetProxy());
}
GrSurfaceOrigin origin() const { return fSurfaceView->origin(); }
GrSwizzle writeSwizzle() const { return fSurfaceView->swizzle(); }
GrOp* op() { return fOp; }
const GrSurfaceProxyView* writeView() const { return fSurfaceView; }
const GrSurfaceProxyView& writeView() const { return fSurfaceView; }
GrRenderTargetProxy* proxy() const { return fRenderTargetProxy; }
GrAppliedClip* appliedClip() { return fAppliedClip; }
const GrAppliedClip* appliedClip() const { return fAppliedClip; }
@ -90,7 +87,7 @@ public:
private:
GrOp* fOp;
GrSurfaceProxyView* fSurfaceView;
const GrSurfaceProxyView& fSurfaceView;
GrRenderTargetProxy* fRenderTargetProxy;
GrAppliedClip* fAppliedClip;
GrXferProcessor::DstProxyView fDstProxyView; // TODO: do we still need the dst proxy here?
@ -144,7 +141,7 @@ public:
}
void putBackIndices(int indexCount) final;
void putBackVertices(int vertices, size_t vertexStride) final;
const GrSurfaceProxyView* writeView() const final { return this->drawOpArgs().writeView(); }
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 {

View File

@ -451,7 +451,7 @@ void GrOpsTask::onPrePrepare(GrRecordingContext* context) {
for (const auto& chain : fOpChains) {
if (chain.shouldExecute()) {
chain.head()->prePrepare(context,
&fTargets[0],
this->target(0),
chain.appliedClip(),
chain.dstProxyView(),
fRenderPassXferBarriers);
@ -481,7 +481,7 @@ void GrOpsTask::onPrepare(GrOpFlushState* flushState) {
TRACE_EVENT0("skia.gpu", chain.head()->name());
#endif
GrOpFlushState::OpArgs opArgs(chain.head(),
&fTargets[0],
this->target(0),
chain.appliedClip(),
chain.dstProxyView(),
fRenderPassXferBarriers);
@ -633,7 +633,7 @@ bool GrOpsTask::onExecute(GrOpFlushState* flushState) {
#endif
GrOpFlushState::OpArgs opArgs(chain.head(),
&fTargets[0],
this->target(0),
chain.appliedClip(),
chain.dstProxyView(),
fRenderPassXferBarriers);

View File

@ -201,7 +201,7 @@ void GrCCCoverageProcessor::bindPipeline(GrOpFlushState* flushState, const GrPip
GrProgramInfo programInfo(flushState->proxy()->numSamples(),
flushState->proxy()->numStencilSamples(),
flushState->proxy()->backendFormat(),
flushState->writeView()->origin(), &pipeline, stencil, this,
flushState->writeView().origin(), &pipeline, stencil, this,
this->primType(), 0, flushState->renderPassBarriers());
flushState->bindPipeline(programInfo, drawBounds);
}

View File

@ -449,7 +449,7 @@ void GrCCDrawPathsOp::onExecute(GrOpFlushState* flushState, const SkRect& chainB
GrPipeline::InitArgs initArgs;
initArgs.fCaps = &flushState->caps();
initArgs.fDstProxyView = flushState->drawOpArgs().dstProxyView();
initArgs.fWriteSwizzle = flushState->drawOpArgs().writeSwizzle();
initArgs.fWriteSwizzle = flushState->drawOpArgs().writeView().swizzle();
auto clip = flushState->detachAppliedClip();
GrPipeline pipeline(initArgs, std::move(fProcessors), std::move(clip));

View File

@ -72,7 +72,7 @@ public:
private:
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}

View File

@ -146,7 +146,7 @@ void GrCCPathProcessor::drawPaths(GrOpFlushState* flushState, const GrPipeline&
GrRenderTargetProxy* rtProxy = flushState->proxy();
GrProgramInfo programInfo(rtProxy->numSamples(), rtProxy->numStencilSamples(),
rtProxy->backendFormat(), flushState->writeView()->origin(),
rtProxy->backendFormat(), flushState->writeView().origin(),
&pipeline, &GrUserStencilSettings::kUnused, this, primitiveType, 0,
flushState->renderPassBarriers());

View File

@ -57,7 +57,7 @@ protected:
private:
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) final {}
@ -98,7 +98,7 @@ public:
bool hasScissor = flushState->appliedClip() &&
flushState->appliedClip()->scissorState().enabled();
GrPipeline pipeline(hasScissor ? GrScissorTest::kEnabled : GrScissorTest::kDisabled,
SkBlendMode::kSrc, flushState->drawOpArgs().writeSwizzle());
SkBlendMode::kSrc, flushState->drawOpArgs().writeView().swizzle());
pathProc.drawPaths(flushState, pipeline, *fSrcProxy, *fResources, fBaseInstance,
fEndInstance, this->bounds());
@ -137,7 +137,7 @@ public:
void onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) override {
ProcessorType proc;
GrPipeline pipeline(GrScissorTest::kEnabled, SkBlendMode::kPlus,
flushState->drawOpArgs().writeSwizzle());
flushState->drawOpArgs().writeView().swizzle());
fResources->filler().drawFills(flushState, &proc, pipeline, fFillBatchID, fDrawBounds);
fResources->stroker().drawStrokes(flushState, &proc, fStrokeBatchID, fDrawBounds);
}

View File

@ -692,7 +692,7 @@ void GrCCStroker::drawStrokes(GrOpFlushState* flushState, GrCCCoverageProcessor*
? &fZeroTallies : fScissorSubBatches[startScissorSubBatch - 1].fEndInstances;
GrPipeline pipeline(GrScissorTest::kEnabled, SkBlendMode::kPlus,
flushState->drawOpArgs().writeSwizzle());
flushState->drawOpArgs().writeView().swizzle());
// Draw linear strokes.
this->drawLog2Strokes(0, flushState, LinearStrokeProcessor(), pipeline, batch, startIndices,
@ -729,7 +729,7 @@ void GrCCStroker::drawLog2Strokes(int numSegmentsLog2, GrOpFlushState* flushStat
GrProgramInfo programInfo(flushState->proxy()->numSamples(),
flushState->proxy()->numStencilSamples(),
flushState->proxy()->backendFormat(),
flushState->writeView()->origin(), &pipeline,
flushState->writeView().origin(), &pipeline,
&GrUserStencilSettings::kUnused, &processor,
GrPrimitiveType::kTriangleStrip, 0, flushState->renderPassBarriers());

View File

@ -140,7 +140,7 @@ void GrStencilAtlasOp::onExecute(GrOpFlushState* flushState, const SkRect& chain
SkIRect drawBoundsRect = SkIRect::MakeWH(fDrawBounds.width(), fDrawBounds.height());
GrPipeline pipeline(GrScissorTest::kEnabled, GrDisableColorXPFactory::MakeXferProcessor(),
flushState->drawOpArgs().writeSwizzle(),
flushState->drawOpArgs().writeView().swizzle(),
GrPipeline::InputFlags::kHWAntialias);
GrSampleMaskProcessor sampleMaskProc;
@ -153,7 +153,7 @@ void GrStencilAtlasOp::onExecute(GrOpFlushState* flushState, const SkRect& chain
constexpr auto noHWAA = GrPipeline::InputFlags::kNone;
GrPipeline resolvePipeline(GrScissorTest::kEnabled, SkBlendMode::kSrc,
flushState->drawOpArgs().writeSwizzle(), noHWAA);
flushState->drawOpArgs().writeView().swizzle(), noHWAA);
StencilResolveProcessor primProc;
if (!flushState->caps().twoSidedStencilRefsAndMasksMustMatch()) {
@ -181,7 +181,7 @@ void GrStencilAtlasOp::drawResolve(GrOpFlushState* flushState, const GrPipeline&
GrProgramInfo programInfo(flushState->proxy()->numSamples(),
flushState->proxy()->numStencilSamples(),
flushState->proxy()->backendFormat(),
flushState->writeView()->origin(), &resolvePipeline, stencil,
flushState->writeView().origin(), &resolvePipeline, stencil,
&primProc, GrPrimitiveType::kTriangleStrip, 0,
flushState->renderPassBarriers());
flushState->bindPipeline(programInfo, SkRect::Make(drawBounds));

View File

@ -53,7 +53,7 @@ public:
private:
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}

View File

@ -82,7 +82,7 @@ public:
UNIMPL(uint16_t* makeIndexSpaceAtLeast(int, int, sk_sp<const GrBuffer>*, int*, int*))
UNIMPL(void putBackIndices(int))
UNIMPL(GrRenderTargetProxy* proxy() const)
UNIMPL(const GrSurfaceProxyView* writeView() const)
UNIMPL(const GrSurfaceProxyView& writeView() const)
UNIMPL(const GrAppliedClip* appliedClip() const)
UNIMPL(GrStrikeCache* strikeCache() const)
UNIMPL(GrAtlasManager* atlasManager() const)

View File

@ -740,7 +740,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -876,17 +876,17 @@ public:
private:
void makeLineProgramInfo(const GrCaps&, SkArenaAlloc*, const GrPipeline*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers);
void makeQuadProgramInfo(const GrCaps&, SkArenaAlloc*, const GrPipeline*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers);
void makeConicProgramInfo(const GrCaps&, SkArenaAlloc*, const GrPipeline*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers);
@ -902,13 +902,13 @@ private:
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override;
void onPrePrepareDraws(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override;
@ -992,7 +992,7 @@ GR_MAKE_BITFIELD_OPS(AAHairlineOp::Program)
void AAHairlineOp::makeLineProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
const GrPipeline* pipeline,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers) {
@ -1024,7 +1024,7 @@ void AAHairlineOp::makeLineProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
void AAHairlineOp::makeQuadProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
const GrPipeline* pipeline,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers) {
@ -1048,7 +1048,7 @@ void AAHairlineOp::makeQuadProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
void AAHairlineOp::makeConicProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
const GrPipeline* pipeline,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers) {
@ -1098,7 +1098,7 @@ AAHairlineOp::Program AAHairlineOp::predictPrograms(const GrCaps* caps) const {
void AAHairlineOp::onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {
@ -1117,7 +1117,7 @@ void AAHairlineOp::onCreateProgramInfo(const GrCaps* caps,
geometryProcessorLocalM = &SkMatrix::I();
}
auto pipeline = fHelper.createPipeline(caps, arena, writeView->swizzle(),
auto pipeline = fHelper.createPipeline(caps, arena, writeView.swizzle(),
std::move(appliedClip), dstProxyView);
if (fCharacterization & kLine_Program) {
@ -1139,7 +1139,7 @@ void AAHairlineOp::onCreateProgramInfo(const GrCaps* caps,
}
void AAHairlineOp::onPrePrepareDraws(GrRecordingContext* context,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {

View File

@ -202,7 +202,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -112,7 +112,7 @@ private:
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {
@ -122,7 +122,7 @@ private:
}
void onPrePrepareDraws(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -45,7 +45,7 @@ private:
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override;
void onPrePrepare(GrRecordingContext*, const GrSurfaceProxyView* writeView, GrAppliedClip*,
void onPrePrepare(GrRecordingContext*, const GrSurfaceProxyView& writeView, GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}

View File

@ -317,7 +317,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -418,7 +418,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -54,7 +54,7 @@ private:
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override;
@ -200,7 +200,7 @@ SkString DrawAtlasOp::onDumpInfo() const {
void DrawAtlasOp::onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {

View File

@ -89,7 +89,7 @@ void GrDrawPathOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBoun
GrProgramInfo programInfo(proxy->numSamples(),
proxy->numStencilSamples(),
proxy->backendFormat(),
flushState->writeView()->origin(),
flushState->writeView().origin(),
pipeline,
&kCoverPass,
pathProc.get(),

View File

@ -55,7 +55,7 @@ protected:
private:
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) final {}

View File

@ -465,7 +465,7 @@ private:
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override;
@ -633,7 +633,7 @@ GrGeometryProcessor* DrawVerticesOp::makeGP(SkArenaAlloc* arena) {
void DrawVerticesOp::onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {

View File

@ -36,7 +36,7 @@ private:
}
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}

View File

@ -102,7 +102,7 @@ private:
// Create a GrProgramInfo object in the provided arena
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) final;
@ -852,7 +852,7 @@ GrGLSLPrimitiveProcessor* FillRRectOp::Processor::createGLSLInstance(
void FillRRectOp::onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {

View File

@ -203,7 +203,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
@ -220,7 +220,7 @@ private:
}
void onPrePrepareDraws(GrRecordingContext* rContext,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -195,7 +195,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -28,7 +28,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* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {

View File

@ -39,7 +39,7 @@ protected:
void createProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {
@ -103,7 +103,7 @@ protected:
}
virtual void onPrePrepareDraws(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers);
@ -114,13 +114,13 @@ private:
// by this op.
virtual void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) = 0;
void onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) final {
@ -216,7 +216,7 @@ public:
}
virtual GrRenderTargetProxy* proxy() const = 0;
virtual const GrSurfaceProxyView* writeView() const = 0;
virtual const GrSurfaceProxyView& writeView() const = 0;
virtual const GrAppliedClip* appliedClip() const = 0;
virtual GrAppliedClip detachAppliedClip() = 0;

View File

@ -208,8 +208,8 @@ public:
* onPrePrepare must be prepared to handle both cases (when onPrePrepare has been called
* ahead of time and when it has not been called).
*/
void prePrepare(GrRecordingContext* context, GrSurfaceProxyView* dstView, GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
void prePrepare(GrRecordingContext* context, const GrSurfaceProxyView& dstView,
GrAppliedClip* clip, const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {
this->onPrePrepare(context, dstView, clip, dstProxyView, renderPassXferBarriers);
}
@ -341,7 +341,7 @@ private:
// TODO: the parameters to onPrePrepare mirror GrOpFlushState::OpArgs - fuse the two?
virtual void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) = 0;

View File

@ -1241,7 +1241,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
@ -1603,7 +1603,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
@ -1936,7 +1936,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
@ -2212,7 +2212,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
@ -2610,7 +2610,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
@ -2933,7 +2933,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -87,7 +87,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -528,7 +528,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -134,7 +134,7 @@ const GrPipeline* GrSimpleMeshDrawOpHelper::CreatePipeline(
GrPipeline::InputFlags pipelineFlags) {
return CreatePipeline(&flushState->caps(),
flushState->allocator(),
flushState->writeView()->swizzle(),
flushState->writeView().swizzle(),
flushState->detachAppliedClip(),
flushState->dstProxyView(),
std::move(processorSet),
@ -144,7 +144,7 @@ const GrPipeline* GrSimpleMeshDrawOpHelper::CreatePipeline(
const GrPipeline* GrSimpleMeshDrawOpHelper::createPipeline(GrOpFlushState* flushState) {
return CreatePipeline(&flushState->caps(),
flushState->allocator(),
flushState->writeView()->swizzle(),
flushState->writeView().swizzle(),
flushState->detachAppliedClip(),
flushState->dstProxyView(),
this->detachProcessorSet(),
@ -169,7 +169,7 @@ const GrPipeline* GrSimpleMeshDrawOpHelper::createPipeline(
GrProgramInfo* GrSimpleMeshDrawOpHelper::CreateProgramInfo(
const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrGeometryProcessor* geometryProcessor,
@ -180,7 +180,7 @@ GrProgramInfo* GrSimpleMeshDrawOpHelper::CreateProgramInfo(
const GrUserStencilSettings* stencilSettings) {
auto pipeline = CreatePipeline(caps,
arena,
writeView->swizzle(),
writeView.swizzle(),
std::move(appliedClip),
dstProxyView,
std::move(processorSet),
@ -192,17 +192,17 @@ GrProgramInfo* GrSimpleMeshDrawOpHelper::CreateProgramInfo(
GrProgramInfo* GrSimpleMeshDrawOpHelper::CreateProgramInfo(SkArenaAlloc* arena,
const GrPipeline* pipeline,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrGeometryProcessor* geometryProcessor,
GrPrimitiveType primitiveType,
GrXferBarrierFlags xferBarrierFlags,
const GrUserStencilSettings* stencilSettings) {
GrRenderTargetProxy* outputProxy = writeView->asRenderTargetProxy();
GrRenderTargetProxy* outputProxy = writeView.asRenderTargetProxy();
auto tmp = arena->make<GrProgramInfo>(outputProxy->numSamples(),
outputProxy->numStencilSamples(),
outputProxy->backendFormat(),
writeView->origin(),
writeView.origin(),
pipeline,
stencilSettings,
geometryProcessor,
@ -215,7 +215,7 @@ GrProgramInfo* GrSimpleMeshDrawOpHelper::CreateProgramInfo(SkArenaAlloc* arena,
GrProgramInfo* GrSimpleMeshDrawOpHelper::createProgramInfo(
const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrGeometryProcessor* gp,

View File

@ -135,7 +135,7 @@ public:
static GrProgramInfo* CreateProgramInfo(SkArenaAlloc*,
const GrPipeline*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrGeometryProcessor*,
GrPrimitiveType,
GrXferBarrierFlags renderPassXferBarriers,
@ -147,7 +147,7 @@ public:
// it has no dynamic state besides the scissor clip
static GrProgramInfo* CreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrGeometryProcessor*,
@ -161,7 +161,7 @@ public:
GrProgramInfo* createProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrGeometryProcessor*,

View File

@ -47,7 +47,7 @@ bool GrSimpleMeshDrawOpHelperWithStencil::isCompatible(
GrProgramInfo* GrSimpleMeshDrawOpHelperWithStencil::createProgramInfoWithStencil(
const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeViewSwizzle,
const GrSurfaceProxyView& writeViewSwizzle,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrGeometryProcessor* gp,

View File

@ -24,7 +24,7 @@ public:
GrProgramInfo* createProgramInfoWithStencil(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeViewSwizzle,
const GrSurfaceProxyView& writeViewSwizzle,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrGeometryProcessor*,

View File

@ -163,7 +163,7 @@ private:
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {
@ -173,7 +173,7 @@ private:
}
void onPrePrepareDraws(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -33,7 +33,7 @@ void GrStencilPathOp::onExecute(GrOpFlushState* state, const SkRect& chainBounds
fHasStencilClip, numStencilBits);
GrPathRendering::StencilPathArgs args(fUseHWAA, state->drawOpArgs().proxy(),
state->drawOpArgs().origin(),
state->drawOpArgs().writeView().origin(),
&fViewMatrix, &fScissor, &stencil);
state->gpu()->pathRendering()->stencilPath(args, fPath.get());
}

View File

@ -48,7 +48,7 @@ private:
}
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}

View File

@ -172,7 +172,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
@ -440,7 +440,7 @@ private:
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override;
@ -516,7 +516,7 @@ private:
void AAStrokeRectOp::onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {

View File

@ -646,7 +646,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
@ -678,7 +678,7 @@ private:
}
void onPrePrepareDraws(GrRecordingContext* context,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -454,7 +454,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
@ -504,7 +504,7 @@ private:
}
void onPrePrepareDraws(GrRecordingContext* rContext,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -142,7 +142,7 @@ GrOp::CombineResult GrDrawAtlasPathOp::onCombineIfPossible(
}
void GrDrawAtlasPathOp::onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) {}
@ -169,7 +169,7 @@ void GrDrawAtlasPathOp::onExecute(GrOpFlushState* state, const SkRect& chainBoun
}
initArgs.fCaps = &state->caps();
initArgs.fDstProxyView = state->drawOpArgs().dstProxyView();
initArgs.fWriteSwizzle = state->drawOpArgs().writeSwizzle();
initArgs.fWriteSwizzle = state->drawOpArgs().writeView().swizzle();
GrPipeline pipeline(initArgs, std::move(fProcessors), state->detachAppliedClip());
GrSwizzle swizzle = state->caps().getReadSwizzle(fAtlasProxy->backendFormat(),
@ -179,7 +179,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->writeView()->origin(),
state->proxy()->backendFormat(), state->writeView().origin(),
&pipeline, &GrUserStencilSettings::kUnused, &shader,
GrPrimitiveType::kTriangleStrip, 0, state->renderPassBarriers());

View File

@ -43,7 +43,7 @@ public:
private:
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override;

View File

@ -34,7 +34,7 @@ public:
const SkMatrix& viewMatrix() const { return fViewMatrix; }
static GrProgramInfo* MakeProgramInfo(const GrPathShader* shader, SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrPipeline::InputFlags pipelineFlags,
GrProcessorSet&& processors, GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
@ -42,22 +42,22 @@ public:
const GrUserStencilSettings* stencil,
const GrCaps& caps) {
auto* pipeline = GrSimpleMeshDrawOpHelper::CreatePipeline(
&caps, arena, writeView->swizzle(), std::move(appliedClip), dstProxyView,
&caps, arena, writeView.swizzle(), std::move(appliedClip), dstProxyView,
std::move(processors), pipelineFlags);
return MakeProgramInfo(shader, arena, writeView, pipeline, dstProxyView,
renderPassXferBarriers, stencil, caps);
}
static GrProgramInfo* MakeProgramInfo(const GrPathShader* shader, SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
const GrPipeline* pipeline,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers,
const GrUserStencilSettings* stencil,
const GrCaps& caps) {
GrRenderTargetProxy* proxy = writeView->asRenderTargetProxy();
GrRenderTargetProxy* proxy = writeView.asRenderTargetProxy();
return arena->make<GrProgramInfo>(proxy->numSamples(), proxy->numStencilSamples(),
proxy->backendFormat(), writeView->origin(), pipeline,
proxy->backendFormat(), writeView.origin(), pipeline,
stencil, shader, shader->fPrimitiveType,
shader->fTessellationPatchVertexCount,
renderPassXferBarriers);

View File

@ -60,7 +60,7 @@ private:
}
void GrPathTessellateOp::onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView* writeView, GrAppliedClip* clip,
const GrSurfaceProxyView& writeView, GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {
SkArenaAlloc* recordTimeAllocator = context->priv().recordTimeAllocator();
@ -360,7 +360,7 @@ void GrPathTessellateOp::prePreparePipelineForFills(const PrePrepareArgs& args)
auto pipelineFlags = GrPipeline::InputFlags::kNone;
if (GrAAType::kNone != fAAType) {
if (args.fWriteView->asRenderTargetProxy()->numSamples() == 1) {
if (args.fWriteView.asRenderTargetProxy()->numSamples() == 1) {
// We are mixed sampled. We need to either enable conservative raster (preferred) or
// disable MSAA in order to avoid double blend artifacts. (Even if we disable MSAA for
// the cover geometry, the stencil test is still multisampled and will still produce
@ -377,7 +377,7 @@ void GrPathTessellateOp::prePreparePipelineForFills(const PrePrepareArgs& args)
}
fPipelineForFills = GrSimpleMeshDrawOpHelper::CreatePipeline(
args.fCaps, args.fArena, args.fWriteView->swizzle(), std::move(*args.fClip),
args.fCaps, args.fArena, args.fWriteView.swizzle(), std::move(*args.fClip),
*args.fDstProxyView, std::move(fProcessors), pipelineFlags);
}

View File

@ -49,12 +49,12 @@ private:
FixedFunctionFlags fixedFunctionFlags() const override;
void onPrePrepare(GrRecordingContext*, const GrSurfaceProxyView*, GrAppliedClip*,
void onPrePrepare(GrRecordingContext*, const GrSurfaceProxyView&, GrAppliedClip*,
const GrXferProcessor::DstProxyView&, GrXferBarrierFlags) override;
struct PrePrepareArgs {
SkArenaAlloc* fArena;
const GrSurfaceProxyView* fWriteView;
const GrSurfaceProxyView& fWriteView;
const GrAppliedHardClip* fHardClip;
GrAppliedClip* fClip;
const GrXferProcessor::DstProxyView* fDstProxyView;

View File

@ -81,7 +81,7 @@ GrOp::CombineResult GrStrokeOp::onCombineIfPossible(GrOp* grOp, SkArenaAlloc* al
void GrStrokeOp::prePrepareColorProgram(SkArenaAlloc* arena,
GrStrokeTessellateShader* strokeTessellateShader,
const GrSurfaceProxyView* writeView, GrAppliedClip&& clip,
const GrSurfaceProxyView& writeView, GrAppliedClip&& clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers,
const GrCaps& caps) {
@ -89,7 +89,7 @@ void GrStrokeOp::prePrepareColorProgram(SkArenaAlloc* arena,
auto pipelineFlags = GrPipeline::InputFlags::kNone;
if (GrAAType::kNone != fAAType) {
pipelineFlags |= GrPipeline::InputFlags::kHWAntialias;
SkASSERT(writeView->asRenderTargetProxy()->numSamples() > 1); // No mixed samples yet.
SkASSERT(writeView.asRenderTargetProxy()->numSamples() > 1); // No mixed samples yet.
SkASSERT(fAAType != GrAAType::kCoverage); // No mixed samples yet.
}
fColorProgram = GrPathShader::MakeProgramInfo(strokeTessellateShader, arena, writeView,

View File

@ -35,7 +35,7 @@ protected:
CombineResult onCombineIfPossible(GrOp*, SkArenaAlloc*, const GrCaps&) override;
void prePrepareColorProgram(SkArenaAlloc* arena, GrStrokeTessellateShader*,
const GrSurfaceProxyView*, GrAppliedClip&&, const
const GrSurfaceProxyView&, GrAppliedClip&&, const
GrXferProcessor::DstProxyView&, GrXferBarrierFlags, const GrCaps&);
static float NumCombinedSegments(float numParametricSegments, float numRadialSegments) {

View File

@ -15,7 +15,7 @@
using Patch = GrStrokeTessellateShader::Patch;
void GrStrokeTessellateOp::onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView* writeView, GrAppliedClip* clip,
const GrSurfaceProxyView& writeView, GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {
SkArenaAlloc* arena = context->priv().recordTimeAllocator();

View File

@ -30,7 +30,7 @@ private:
: GrStrokeOp(ClassID(), aaType, viewMatrix, stroke, path, std::move(paint)) {
}
void onPrePrepare(GrRecordingContext*, const GrSurfaceProxyView*, GrAppliedClip*,
void onPrePrepare(GrRecordingContext*, const GrSurfaceProxyView&, GrAppliedClip*,
const GrXferProcessor::DstProxyView&, GrXferBarrierFlags) override;
enum class JoinType {

View File

@ -226,7 +226,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrAtlasTextOpPreparation, reporter, ctxInfo)
GrSurfaceProxyView surfaceView = rtc->writeSurfaceView();
GrOpFlushState::OpArgs opArgs(op.get(),
&surfaceView,
surfaceView,
nullptr,
GrXferProcessor::DstProxyView(),
GrXferBarrierFlags::kNone);

View File

@ -431,7 +431,7 @@ private:
}
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}
@ -574,7 +574,7 @@ GrOpsRenderPass* DrawMeshHelper::bindPipeline(GrPrimitiveType primitiveType, boo
hasVertexBuffer);
GrProgramInfo programInfo(fState->proxy()->numSamples(), fState->proxy()->numStencilSamples(),
fState->proxy()->backendFormat(), fState->writeView()->origin(),
fState->proxy()->backendFormat(), fState->writeView().origin(),
pipeline, &GrUserStencilSettings::kUnused, mtp, primitiveType, 0,
fState->renderPassBarriers());

View File

@ -143,14 +143,14 @@ private:
return GrProcessorSet::EmptySetAnalysis();
}
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}
void onPrepare(GrOpFlushState*) override {}
void onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) override {
GrPipeline pipeline(fScissorTest, SkBlendMode::kSrc,
flushState->drawOpArgs().writeSwizzle());
flushState->drawOpArgs().writeView().swizzle());
SkSTArray<kNumMeshes, GrSimpleMesh> meshes;
for (int i = 0; i < kNumMeshes; ++i) {
GrSimpleMesh& mesh = meshes.push_back();
@ -162,7 +162,7 @@ private:
GrProgramInfo programInfo(flushState->proxy()->numSamples(),
flushState->proxy()->numStencilSamples(),
flushState->proxy()->backendFormat(),
flushState->writeView()->origin(),
flushState->writeView().origin(),
&pipeline,
&GrUserStencilSettings::kUnused,
geomProc,

View File

@ -453,7 +453,7 @@ private:
GrProgramInfo* createProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) const {
@ -543,7 +543,7 @@ private:
}
void onPrePrepare(GrRecordingContext* rContext,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -110,7 +110,7 @@ public:
return GrProcessorSet::EmptySetAnalysis();
}
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}
@ -357,7 +357,7 @@ private:
return GrProcessorSet::EmptySetAnalysis();
}
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}

View File

@ -101,7 +101,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -125,7 +125,7 @@ private:
}
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}

View File

@ -60,7 +60,7 @@ private:
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {

View File

@ -65,12 +65,12 @@ private:
GrProgramInfo* programInfo() override { return nullptr; }
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}
void onPrePrepareDraws(GrRecordingContext*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}

View File

@ -61,7 +61,7 @@ GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext* dContext,
GrProgramInfo* CreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrGeometryProcessor* geomProc,

View File

@ -28,7 +28,7 @@ GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext*,
GrProgramInfo* CreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrGeometryProcessor*,

View File

@ -117,7 +117,7 @@ private:
GrProgramInfo* programInfo() override { return fProgramInfo; }
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override;
@ -177,7 +177,7 @@ TestRectOp::TestRectOp(const GrCaps* caps,
void TestRectOp::onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
const GrSurfaceProxyView* writeView,
const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {