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/tools/gpu/ProxyUtils.cpp b/tools/gpu/ProxyUtils.cpp
index 72022e6..efd8467 100644
--- a/tools/gpu/ProxyUtils.cpp
+++ b/tools/gpu/ProxyUtils.cpp
@@ -61,7 +61,7 @@
GrProgramInfo* CreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrGeometryProcessor* geomProc,
diff --git a/tools/gpu/ProxyUtils.h b/tools/gpu/ProxyUtils.h
index 84277a4..278f0c9 100644
--- a/tools/gpu/ProxyUtils.h
+++ b/tools/gpu/ProxyUtils.h
@@ -28,7 +28,7 @@
GrProgramInfo* CreateProgramInfo(const GrCaps*,
SkArenaAlloc*,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&&,
const GrXferProcessor::DstProxyView&,
GrGeometryProcessor*,
diff --git a/tools/gpu/TestOps.cpp b/tools/gpu/TestOps.cpp
index 64c050b..a4e01d7 100644
--- a/tools/gpu/TestOps.cpp
+++ b/tools/gpu/TestOps.cpp
@@ -117,7 +117,7 @@
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 @@
void TestRectOp::onCreateProgramInfo(const GrCaps* caps,
SkArenaAlloc* arena,
- const GrSurfaceProxyView* writeView,
+ const GrSurfaceProxyView& writeView,
GrAppliedClip&& appliedClip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers) {