Rename 'dstView' to 'outputView' to avoid confusion w/ 'dstProxyView'

This is just a simple clean up from a CL request.

Change-Id: Ibc09e19aeb8a160e4e4e03573fcf56cb1d58525b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273983
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2020-02-28 09:11:02 -05:00 committed by Skia Commit-Bot
parent 20e7a53cd2
commit fad1e0f47b
11 changed files with 38 additions and 38 deletions

View File

@ -163,7 +163,7 @@ private:
} }
void onPrePrepare(GrRecordingContext* context, void onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip* clip, GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView) final { const GrXferProcessor::DstProxyView& dstProxyView) final {
SkArenaAlloc* arena = context->priv().recordTimeAllocator(); SkArenaAlloc* arena = context->priv().recordTimeAllocator();
@ -174,7 +174,7 @@ private:
GrGeometryProcessor* geomProc = ClockwiseTestProcessor::Make(arena, fReadSkFragCoord); GrGeometryProcessor* geomProc = ClockwiseTestProcessor::Make(arena, fReadSkFragCoord);
// TODO: need to also give this to the recording context // TODO: need to also give this to the recording context
fProgramInfo = sk_gpu_test::CreateProgramInfo(context->priv().caps(), arena, dstView, fProgramInfo = sk_gpu_test::CreateProgramInfo(context->priv().caps(), arena, outputView,
std::move(appliedClip), dstProxyView, std::move(appliedClip), dstProxyView,
geomProc, SkBlendMode::kPlus, geomProc, SkBlendMode::kPlus,
GrPrimitiveType::kTriangleStrip); GrPrimitiveType::kTriangleStrip);

View File

@ -171,7 +171,7 @@ private:
} }
void onPrePrepare(GrRecordingContext* context, void onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip* clip, GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView) final { const GrXferProcessor::DstProxyView& dstProxyView) final {
SkArenaAlloc* arena = context->priv().recordTimeAllocator(); SkArenaAlloc* arena = context->priv().recordTimeAllocator();
@ -182,7 +182,7 @@ private:
GrGeometryProcessor* geomProc = FwidthSquircleTestProcessor::Make(arena, fViewMatrix); GrGeometryProcessor* geomProc = FwidthSquircleTestProcessor::Make(arena, fViewMatrix);
// TODO: need to also give this to the recording context // TODO: need to also give this to the recording context
fProgramInfo = sk_gpu_test::CreateProgramInfo(context->priv().caps(), arena, dstView, fProgramInfo = sk_gpu_test::CreateProgramInfo(context->priv().caps(), arena, outputView,
std::move(appliedClip), dstProxyView, std::move(appliedClip), dstProxyView,
geomProc, SkBlendMode::kSrcOver, geomProc, SkBlendMode::kSrcOver,
GrPrimitiveType::kTriangleStrip); GrPrimitiveType::kTriangleStrip);

View File

@ -243,7 +243,7 @@ private:
} }
void onPrePrepare(GrRecordingContext* context, void onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip* clip, GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView) final { const GrXferProcessor::DstProxyView& dstProxyView) final {
// We're going to create the GrProgramInfo (and the GrPipeline and geometry processor // We're going to create the GrProgramInfo (and the GrPipeline and geometry processor
@ -255,7 +255,7 @@ private:
GrGeometryProcessor* geomProc = SampleLocationsTestProcessor::Make(arena, fGradType); GrGeometryProcessor* geomProc = SampleLocationsTestProcessor::Make(arena, fGradType);
fProgramInfo = sk_gpu_test::CreateProgramInfo(context->priv().caps(), arena, dstView, fProgramInfo = sk_gpu_test::CreateProgramInfo(context->priv().caps(), arena, outputView,
std::move(appliedClip), dstProxyView, std::move(appliedClip), dstProxyView,
geomProc, SkBlendMode::kSrcOver, geomProc, SkBlendMode::kSrcOver,
GrPrimitiveType::kTriangleStrip, GrPrimitiveType::kTriangleStrip,

View File

@ -51,7 +51,9 @@ public:
} }
} }
void onPrePrepare(GrRecordingContext*, const GrSurfaceProxyView*, GrAppliedClip*, void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView* outputView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&) final; const GrXferProcessor::DstProxyView&) final;
void onPrepare(GrOpFlushState*) final; void onPrepare(GrOpFlushState*) final;
@ -93,7 +95,7 @@ private:
// Create a GrProgramInfo object in the provided arena // Create a GrProgramInfo object in the provided arena
GrProgramInfo* createProgramInfo(const GrCaps*, GrProgramInfo* createProgramInfo(const GrCaps*,
SkArenaAlloc*, SkArenaAlloc*,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip&&, GrAppliedClip&&,
const GrXferProcessor::DstProxyView&); const GrXferProcessor::DstProxyView&);
@ -555,7 +557,7 @@ static constexpr uint16_t kMSAAIndexData[] = {
GR_DECLARE_STATIC_UNIQUE_KEY(gMSAAIndexBufferKey); GR_DECLARE_STATIC_UNIQUE_KEY(gMSAAIndexBufferKey);
void FillRRectOp::onPrePrepare(GrRecordingContext* context, void FillRRectOp::onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip* clip, GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView) { const GrXferProcessor::DstProxyView& dstProxyView) {
SkArenaAlloc* arena = context->priv().recordTimeAllocator(); SkArenaAlloc* arena = context->priv().recordTimeAllocator();
@ -567,7 +569,7 @@ void FillRRectOp::onPrePrepare(GrRecordingContext* context,
// in the record-time arena. Then, if the program info had already been seen, we could // in the record-time arena. Then, if the program info had already been seen, we could
// get pointers back to the prior versions and be able to return the allocated space // get pointers back to the prior versions and be able to return the allocated space
// back to the arena. // back to the arena.
fProgramInfo = this->createProgramInfo(context->priv().caps(), arena, dstView, fProgramInfo = this->createProgramInfo(context->priv().caps(), arena, outputView,
std::move(appliedClip), dstProxyView); std::move(appliedClip), dstProxyView);
context->priv().recordProgramInfo(fProgramInfo); context->priv().recordProgramInfo(fProgramInfo);
@ -863,7 +865,7 @@ GrGLSLPrimitiveProcessor* FillRRectOp::Processor::createGLSLInstance(
GrProgramInfo* FillRRectOp::createProgramInfo(const GrCaps* caps, GrProgramInfo* FillRRectOp::createProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena, SkArenaAlloc* arena,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip&& appliedClip, GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView) { const GrXferProcessor::DstProxyView& dstProxyView) {
GrGeometryProcessor* geomProc = Processor::Make(arena, fAAType, fFlags); GrGeometryProcessor* geomProc = Processor::Make(arena, fAAType, fFlags);
@ -875,7 +877,7 @@ GrProgramInfo* FillRRectOp::createProgramInfo(const GrCaps* caps,
} }
initArgs.fCaps = caps; initArgs.fCaps = caps;
initArgs.fDstProxyView = dstProxyView; initArgs.fDstProxyView = dstProxyView;
initArgs.fOutputSwizzle = dstView->swizzle(); initArgs.fOutputSwizzle = outputView->swizzle();
GrPipeline::FixedDynamicState* fixedDynamicState = nullptr; GrPipeline::FixedDynamicState* fixedDynamicState = nullptr;
@ -888,11 +890,11 @@ GrProgramInfo* FillRRectOp::createProgramInfo(const GrCaps* caps,
std::move(fProcessors), std::move(fProcessors),
std::move(appliedClip)); std::move(appliedClip));
GrRenderTargetProxy* dstProxy = dstView->asRenderTargetProxy(); GrRenderTargetProxy* outputProxy = outputView->asRenderTargetProxy();
return arena->make<GrProgramInfo>(dstProxy->numSamples(), return arena->make<GrProgramInfo>(outputProxy->numSamples(),
dstProxy->numStencilSamples(), outputProxy->numStencilSamples(),
dstProxy->backendFormat(), outputProxy->backendFormat(),
dstView->origin(), outputView->origin(),
pipeline, pipeline,
geomProc, geomProc,
fixedDynamicState, fixedDynamicState,
@ -906,11 +908,9 @@ void FillRRectOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBound
} }
if (!fProgramInfo) { if (!fProgramInfo) {
const GrSurfaceProxyView* dstView = flushState->view();
fProgramInfo = this->createProgramInfo(&flushState->caps(), fProgramInfo = this->createProgramInfo(&flushState->caps(),
flushState->allocator(), flushState->allocator(),
dstView, flushState->view(),
flushState->detachAppliedClip(), flushState->detachAppliedClip(),
flushState->dstProxyView()); flushState->dstProxyView());
} }

View File

@ -89,16 +89,16 @@ protected:
private: private:
void onPrePrepare(GrRecordingContext* context, void onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip* clip, GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView) final { const GrXferProcessor::DstProxyView& dstProxyView) final {
this->onPrePrepareDraws(context, dstView, clip, dstProxyView); this->onPrePrepareDraws(context, outputView, clip, dstProxyView);
} }
void onPrepare(GrOpFlushState* state) final; void onPrepare(GrOpFlushState* state) final;
// Only the GrTextureOp currently overrides this virtual // Only the GrTextureOp currently overrides this virtual
virtual void onPrePrepareDraws(GrRecordingContext*, virtual void onPrePrepareDraws(GrRecordingContext*,
const GrSurfaceProxyView*, const GrSurfaceProxyView* outputView,
GrAppliedClip*, GrAppliedClip*,
const GrXferProcessor::DstProxyView&) {} const GrXferProcessor::DstProxyView&) {}

View File

@ -109,7 +109,7 @@ GrProcessorSet::Analysis GrSimpleMeshDrawOpHelper::finalizeProcessors(
const GrPipeline* GrSimpleMeshDrawOpHelper::CreatePipeline( const GrPipeline* GrSimpleMeshDrawOpHelper::CreatePipeline(
const GrCaps* caps, const GrCaps* caps,
SkArenaAlloc* arena, SkArenaAlloc* arena,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip&& appliedClip, GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView, const GrXferProcessor::DstProxyView& dstProxyView,
GrProcessorSet&& processorSet, GrProcessorSet&& processorSet,
@ -121,7 +121,7 @@ const GrPipeline* GrSimpleMeshDrawOpHelper::CreatePipeline(
pipelineArgs.fDstProxyView = dstProxyView; pipelineArgs.fDstProxyView = dstProxyView;
pipelineArgs.fCaps = caps; pipelineArgs.fCaps = caps;
pipelineArgs.fUserStencil = stencilSettings; pipelineArgs.fUserStencil = stencilSettings;
pipelineArgs.fOutputSwizzle = dstView->swizzle(); pipelineArgs.fOutputSwizzle = outputView->swizzle();
return arena->make<GrPipeline>(pipelineArgs, return arena->make<GrPipeline>(pipelineArgs,
std::move(processorSet), std::move(processorSet),

View File

@ -126,7 +126,7 @@ public:
static const GrPipeline* CreatePipeline( static const GrPipeline* CreatePipeline(
const GrCaps*, const GrCaps*,
SkArenaAlloc*, SkArenaAlloc*,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip&&, GrAppliedClip&&,
const GrXferProcessor::DstProxyView&, const GrXferProcessor::DstProxyView&,
GrProcessorSet&&, GrProcessorSet&&,

View File

@ -643,7 +643,7 @@ private:
} }
void onPrePrepareDraws(GrRecordingContext* context, void onPrePrepareDraws(GrRecordingContext* context,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip* clip, GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView) override { const GrXferProcessor::DstProxyView& dstProxyView) override {
TRACE_EVENT0("skia.gpu", TRACE_FUNC); TRACE_EVENT0("skia.gpu", TRACE_FUNC);

View File

@ -57,7 +57,7 @@ sk_sp<GrTextureProxy> MakeTextureProxyFromData(GrContext* context,
GrProgramInfo* CreateProgramInfo(const GrCaps* caps, GrProgramInfo* CreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena, SkArenaAlloc* arena,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip&& appliedClip, GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView, const GrXferProcessor::DstProxyView& dstProxyView,
GrGeometryProcessor* geomProc, GrGeometryProcessor* geomProc,
@ -71,7 +71,7 @@ GrProgramInfo* CreateProgramInfo(const GrCaps* caps,
initArgs.fUserStencil = stencil; initArgs.fUserStencil = stencil;
initArgs.fCaps = caps; initArgs.fCaps = caps;
initArgs.fDstProxyView = dstProxyView; initArgs.fDstProxyView = dstProxyView;
initArgs.fOutputSwizzle = dstView->swizzle(); initArgs.fOutputSwizzle = outputView->swizzle();
GrPipeline::FixedDynamicState* fixedDynamicState = nullptr; GrPipeline::FixedDynamicState* fixedDynamicState = nullptr;
@ -94,11 +94,11 @@ GrProgramInfo* CreateProgramInfo(const GrCaps* caps,
std::move(processors), std::move(processors),
std::move(appliedClip)); std::move(appliedClip));
GrRenderTargetProxy* dstProxy = dstView->asRenderTargetProxy(); GrRenderTargetProxy* outputProxy = outputView->asRenderTargetProxy();
return arena->make<GrProgramInfo>(dstProxy->numSamples(), return arena->make<GrProgramInfo>(outputProxy->numSamples(),
dstProxy->numStencilSamples(), outputProxy->numStencilSamples(),
dstProxy->backendFormat(), outputProxy->backendFormat(),
dstView->origin(), outputView->origin(),
pipeline, pipeline,
geomProc, geomProc,
fixedDynamicState, fixedDynamicState,

View File

@ -27,7 +27,7 @@ sk_sp<GrTextureProxy> MakeTextureProxyFromData(GrContext*,
GrProgramInfo* CreateProgramInfo(const GrCaps*, GrProgramInfo* CreateProgramInfo(const GrCaps*,
SkArenaAlloc*, SkArenaAlloc*,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip&&, GrAppliedClip&&,
const GrXferProcessor::DstProxyView& dstProxyView, const GrXferProcessor::DstProxyView& dstProxyView,
GrGeometryProcessor*, SkBlendMode, GrGeometryProcessor*, SkBlendMode,

View File

@ -103,7 +103,7 @@ private:
const SkMatrix& localMatrix); const SkMatrix& localMatrix);
void onPrePrepareDraws(GrRecordingContext*, void onPrePrepareDraws(GrRecordingContext*,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip*, GrAppliedClip*,
const GrXferProcessor::DstProxyView&) final; const GrXferProcessor::DstProxyView&) final;
void onPrepareDraws(Target*) override; void onPrepareDraws(Target*) override;
@ -160,7 +160,7 @@ TestRectOp::TestRectOp(const GrCaps* caps,
} }
void TestRectOp::onPrePrepareDraws(GrRecordingContext* context, void TestRectOp::onPrePrepareDraws(GrRecordingContext* context,
const GrSurfaceProxyView* dstView, const GrSurfaceProxyView* outputView,
GrAppliedClip* clip, GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView) { const GrXferProcessor::DstProxyView& dstProxyView) {
SkArenaAlloc* arena = context->priv().recordTimeAllocator(); SkArenaAlloc* arena = context->priv().recordTimeAllocator();
@ -170,7 +170,7 @@ void TestRectOp::onPrePrepareDraws(GrRecordingContext* context,
fPipeline = GrSimpleMeshDrawOpHelper::CreatePipeline(context->priv().caps(), fPipeline = GrSimpleMeshDrawOpHelper::CreatePipeline(context->priv().caps(),
arena, arena,
dstView, outputView,
std::move(appliedClip), std::move(appliedClip),
dstProxyView, dstProxyView,
std::move(fProcessorSet), std::move(fProcessorSet),