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>
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index c017c40..2c36df3 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -740,7 +740,7 @@
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrAAHairLinePathRenderer.cpp b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
index 5e8e419..ecb70e5 100644
--- a/src/gpu/ops/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
@@ -876,17 +876,17 @@
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 @@
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 @@
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::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::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 @@
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 @@
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::onPrePrepareDraws(GrRecordingContext* context,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {
diff --git a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
index 553e710..6e691a7 100644
--- a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
@@ -202,7 +202,7 @@
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrAtlasTextOp.h b/src/gpu/ops/GrAtlasTextOp.h
index 37590ab..3b9a6ba 100644
--- a/src/gpu/ops/GrAtlasTextOp.h
+++ b/src/gpu/ops/GrAtlasTextOp.h
@@ -112,7 +112,7 @@
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {
@@ -122,7 +122,7 @@
}
void onPrePrepareDraws(GrRecordingContext*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrClearOp.h b/src/gpu/ops/GrClearOp.h
index 57d081e..a706974 100644
--- a/src/gpu/ops/GrClearOp.h
+++ b/src/gpu/ops/GrClearOp.h
@@ -45,7 +45,7 @@
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 {}
diff --git a/src/gpu/ops/GrDashOp.cpp b/src/gpu/ops/GrDashOp.cpp
index f2a08b5..2cce0d9 100644
--- a/src/gpu/ops/GrDashOp.cpp
+++ b/src/gpu/ops/GrDashOp.cpp
@@ -317,7 +317,7 @@
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrDefaultPathRenderer.cpp b/src/gpu/ops/GrDefaultPathRenderer.cpp
index bdc28d4..12d46a9 100644
--- a/src/gpu/ops/GrDefaultPathRenderer.cpp
+++ b/src/gpu/ops/GrDefaultPathRenderer.cpp
@@ -418,7 +418,7 @@
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrDrawAtlasOp.cpp b/src/gpu/ops/GrDrawAtlasOp.cpp
index b67eae7..d035a50 100644
--- a/src/gpu/ops/GrDrawAtlasOp.cpp
+++ b/src/gpu/ops/GrDrawAtlasOp.cpp
@@ -54,7 +54,7 @@
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override;
@@ -200,7 +200,7 @@
void DrawAtlasOp::onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {
diff --git a/src/gpu/ops/GrDrawPathOp.cpp b/src/gpu/ops/GrDrawPathOp.cpp
index 936ef82..151ab6c 100644
--- a/src/gpu/ops/GrDrawPathOp.cpp
+++ b/src/gpu/ops/GrDrawPathOp.cpp
@@ -89,7 +89,7 @@
GrProgramInfo programInfo(proxy->numSamples(),
proxy->numStencilSamples(),
proxy->backendFormat(),
- flushState->writeView()->origin(),
+ flushState->writeView().origin(),
pipeline,
&kCoverPass,
pathProc.get(),
diff --git a/src/gpu/ops/GrDrawPathOp.h b/src/gpu/ops/GrDrawPathOp.h
index 366c99a..7fa76aa 100644
--- a/src/gpu/ops/GrDrawPathOp.h
+++ b/src/gpu/ops/GrDrawPathOp.h
@@ -55,7 +55,7 @@
private:
void onPrePrepare(GrRecordingContext*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) final {}
diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp
index 7a29937..027b718 100644
--- a/src/gpu/ops/GrDrawVerticesOp.cpp
+++ b/src/gpu/ops/GrDrawVerticesOp.cpp
@@ -465,7 +465,7 @@
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override;
@@ -633,7 +633,7 @@
void DrawVerticesOp::onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {
diff --git a/src/gpu/ops/GrDrawableOp.h b/src/gpu/ops/GrDrawableOp.h
index 61d7925..0ad6a58 100644
--- a/src/gpu/ops/GrDrawableOp.h
+++ b/src/gpu/ops/GrDrawableOp.h
@@ -36,7 +36,7 @@
}
void onPrePrepare(GrRecordingContext*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}
diff --git a/src/gpu/ops/GrFillRRectOp.cpp b/src/gpu/ops/GrFillRRectOp.cpp
index 0a78811..3131bf6 100644
--- a/src/gpu/ops/GrFillRRectOp.cpp
+++ b/src/gpu/ops/GrFillRRectOp.cpp
@@ -102,7 +102,7 @@
// 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 @@
void FillRRectOp::onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {
diff --git a/src/gpu/ops/GrFillRectOp.cpp b/src/gpu/ops/GrFillRectOp.cpp
index cfbb444..b0fa5f0 100644
--- a/src/gpu/ops/GrFillRectOp.cpp
+++ b/src/gpu/ops/GrFillRectOp.cpp
@@ -203,7 +203,7 @@
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 @@
}
void onPrePrepareDraws(GrRecordingContext* rContext,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrLatticeOp.cpp b/src/gpu/ops/GrLatticeOp.cpp
index fa75789..bc61928 100644
--- a/src/gpu/ops/GrLatticeOp.cpp
+++ b/src/gpu/ops/GrLatticeOp.cpp
@@ -195,7 +195,7 @@
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrMeshDrawOp.cpp b/src/gpu/ops/GrMeshDrawOp.cpp
index d09fa6a..05c3848 100644
--- a/src/gpu/ops/GrMeshDrawOp.cpp
+++ b/src/gpu/ops/GrMeshDrawOp.cpp
@@ -28,7 +28,7 @@
// 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) {
diff --git a/src/gpu/ops/GrMeshDrawOp.h b/src/gpu/ops/GrMeshDrawOp.h
index 26b2c1b..edde3c8 100644
--- a/src/gpu/ops/GrMeshDrawOp.h
+++ b/src/gpu/ops/GrMeshDrawOp.h
@@ -39,7 +39,7 @@
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 @@
}
virtual void onPrePrepareDraws(GrRecordingContext*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers);
@@ -114,13 +114,13 @@
// 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 @@
}
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;
diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h
index 9970426..7875a3a 100644
--- a/src/gpu/ops/GrOp.h
+++ b/src/gpu/ops/GrOp.h
@@ -208,8 +208,8 @@
* 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 @@
// 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;
diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp
index 7b013c8..edf9188 100644
--- a/src/gpu/ops/GrOvalOpFactory.cpp
+++ b/src/gpu/ops/GrOvalOpFactory.cpp
@@ -1241,7 +1241,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrRegionOp.cpp b/src/gpu/ops/GrRegionOp.cpp
index f865339..99c6fd1 100644
--- a/src/gpu/ops/GrRegionOp.cpp
+++ b/src/gpu/ops/GrRegionOp.cpp
@@ -87,7 +87,7 @@
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrShadowRRectOp.cpp b/src/gpu/ops/GrShadowRRectOp.cpp
index 0e955f5..6d335ce 100644
--- a/src/gpu/ops/GrShadowRRectOp.cpp
+++ b/src/gpu/ops/GrShadowRRectOp.cpp
@@ -528,7 +528,7 @@
void onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
index d52f51e..7f13449 100644
--- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
+++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
@@ -134,7 +134,7 @@
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(GrOpFlushState* flushState) {
return CreatePipeline(&flushState->caps(),
flushState->allocator(),
- flushState->writeView()->swizzle(),
+ flushState->writeView().swizzle(),
flushState->detachAppliedClip(),
flushState->dstProxyView(),
this->detachProcessorSet(),
@@ -169,7 +169,7 @@
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 @@
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(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(
const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrGeometryProcessor* gp,
diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h
index 181249c..220651e 100644
--- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h
+++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h
@@ -135,7 +135,7 @@
static GrProgramInfo* CreateProgramInfo(SkArenaAlloc*,
const GrPipeline*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrGeometryProcessor*,
GrPrimitiveType,
GrXferBarrierFlags renderPassXferBarriers,
@@ -147,7 +147,7 @@
// 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 @@
GrProgramInfo* createProgramInfo(const GrCaps*,
SkArenaAlloc*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrGeometryProcessor*,
diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp b/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp
index 0d3e8ed..ebaf58f 100644
--- a/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp
+++ b/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp
@@ -47,7 +47,7 @@
GrProgramInfo* GrSimpleMeshDrawOpHelperWithStencil::createProgramInfoWithStencil(
const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeViewSwizzle,
+ const GrSurfaceProxyView& writeViewSwizzle,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrGeometryProcessor* gp,
diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h b/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h
index c86ba14..1aa5b6f 100644
--- a/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h
+++ b/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h
@@ -24,7 +24,7 @@
GrProgramInfo* createProgramInfoWithStencil(const GrCaps*,
SkArenaAlloc*,
- const GrSurfaceProxyView* writeViewSwizzle,
+ const GrSurfaceProxyView& writeViewSwizzle,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrGeometryProcessor*,
diff --git a/src/gpu/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp
index 2c2438d..4cf071f 100644
--- a/src/gpu/ops/GrSmallPathRenderer.cpp
+++ b/src/gpu/ops/GrSmallPathRenderer.cpp
@@ -163,7 +163,7 @@
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {
@@ -173,7 +173,7 @@
}
void onPrePrepareDraws(GrRecordingContext*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrStencilPathOp.cpp b/src/gpu/ops/GrStencilPathOp.cpp
index 39c7c1b..fb4d29b 100644
--- a/src/gpu/ops/GrStencilPathOp.cpp
+++ b/src/gpu/ops/GrStencilPathOp.cpp
@@ -33,7 +33,7 @@
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());
}
diff --git a/src/gpu/ops/GrStencilPathOp.h b/src/gpu/ops/GrStencilPathOp.h
index b7c680f..2a22c63 100644
--- a/src/gpu/ops/GrStencilPathOp.h
+++ b/src/gpu/ops/GrStencilPathOp.h
@@ -48,7 +48,7 @@
}
void onPrePrepare(GrRecordingContext*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip*,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override {}
diff --git a/src/gpu/ops/GrStrokeRectOp.cpp b/src/gpu/ops/GrStrokeRectOp.cpp
index 1186e15..75e4f43 100644
--- a/src/gpu/ops/GrStrokeRectOp.cpp
+++ b/src/gpu/ops/GrStrokeRectOp.cpp
@@ -172,7 +172,7 @@
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 @@
void onCreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrXferBarrierFlags renderPassXferBarriers) override;
@@ -516,7 +516,7 @@
void AAStrokeRectOp::onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {
diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp
index 7bfaa7d..26d2fbf 100644
--- a/src/gpu/ops/GrTextureOp.cpp
+++ b/src/gpu/ops/GrTextureOp.cpp
@@ -646,7 +646,7 @@
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 @@
}
void onPrePrepareDraws(GrRecordingContext* context,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {
diff --git a/src/gpu/ops/GrTriangulatingPathRenderer.cpp b/src/gpu/ops/GrTriangulatingPathRenderer.cpp
index abc907e..76c2dd2 100644
--- a/src/gpu/ops/GrTriangulatingPathRenderer.cpp
+++ b/src/gpu/ops/GrTriangulatingPathRenderer.cpp
@@ -454,7 +454,7 @@
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 @@
}
void onPrePrepareDraws(GrRecordingContext* rContext,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) override {