More programInfo cleanup

This CL moves the boiler-plate implementation of onPrePrepareDraws up to GrMeshDrawOp. This, unfortunately, required the addition of a 'programInfo' virtual but that may go away in the future.


The only GrMeshDrawOp-derived classes left are:
  AAHairlineOp - which has 3 programInfos
  AAFlatteningConvexPathOp - which has >=1 mesh (but just 1 programInfo)
  GrAtlasTextOp - which has inline uploads
  SmallPathOp - which, maybe, has inline uploads
  TextureOp - which has chaining

Bug: skia:9455
Change-Id: Id10f70e764054134751545ad38b99f0a0778de76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276642
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ops/GrDefaultPathRenderer.cpp b/src/gpu/ops/GrDefaultPathRenderer.cpp
index eb57608..65a66e4 100644
--- a/src/gpu/ops/GrDefaultPathRenderer.cpp
+++ b/src/gpu/ops/GrDefaultPathRenderer.cpp
@@ -426,6 +426,8 @@
         return GrPrimitiveType::kTriangles;
     }
 
+    GrProgramInfo* programInfo() override { return fProgramInfo; }
+
     void onCreateProgramInfo(const GrCaps* caps,
                              SkArenaAlloc* arena,
                              const GrSurfaceProxyView* outputView,
@@ -453,21 +455,6 @@
 
     }
 
-    void onPrePrepareDraws(GrRecordingContext* context,
-                           const GrSurfaceProxyView* outputView,
-                           GrAppliedClip* clip,
-                           const GrXferProcessor::DstProxyView& dstProxyView) override {
-        SkArenaAlloc* arena = context->priv().recordTimeAllocator();
-
-        // This is equivalent to a GrOpFlushState::detachAppliedClip
-        GrAppliedClip appliedClip = clip ? std::move(*clip) : GrAppliedClip();
-
-        this->createProgramInfo(context->priv().caps(), arena, outputView,
-                                std::move(appliedClip), dstProxyView);
-
-        context->priv().recordProgramInfo(fProgramInfo);
-    }
-
     void onPrepareDraws(Target* target) override {
         PathGeoBuilder pathGeoBuilder(this->primType(), target, &fMeshes);