Remove GrResourceProvider & GrGpu pointers from GrRenderTargetOpList

Additional shrinking of GrRenderTargetOpList since there will soon be more of them.

Change-Id: Ib3e68fdf3462838baf7a5a2644e418be066cf79c
Reviewed-on: https://skia-review.googlesource.com/14363
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h
index 88bb6fd..4b3f0d0 100644
--- a/src/gpu/GrRenderTargetOpList.h
+++ b/src/gpu/GrRenderTargetOpList.h
@@ -33,19 +33,19 @@
     using DstTexture = GrXferProcessor::DstTexture;
 
 public:
-    GrRenderTargetOpList(sk_sp<GrRenderTargetProxy>, GrGpu*, GrResourceProvider*, GrAuditTrail*);
+    GrRenderTargetOpList(sk_sp<GrRenderTargetProxy>, GrGpu*, GrAuditTrail*);
 
     ~GrRenderTargetOpList() override;
 
-    void makeClosed() override {
+    void makeClosed(const GrCaps& caps) override {
         if (this->isClosed()) {
             return;
         }
 
         fLastFullClearOp = nullptr;
-        this->forwardCombine();
+        this->forwardCombine(caps);
 
-        INHERITED::makeClosed();
+        INHERITED::makeClosed(caps);
     }
 
     bool isEmpty() const { return fRecordedOps.empty(); }
@@ -65,11 +65,6 @@
     void prepareOps(GrOpFlushState* flushState) override;
     bool executeOps(GrOpFlushState* flushState) override;
 
-    /**
-     * Gets the capabilities of the draw target.
-     */
-    const GrCaps* caps() const { return fGpu->caps(); }
-
     uint32_t addOp(std::unique_ptr<GrOp> op, GrRenderTargetContext* renderTargetContext) {
         this->recordOp(std::move(op), renderTargetContext, nullptr, nullptr);
         return this->uniqueID();
@@ -138,19 +133,16 @@
     GrOp* recordOp(std::unique_ptr<GrOp>, GrRenderTargetContext*, GrAppliedClip* = nullptr,
                    const DstTexture* = nullptr);
 
-    void forwardCombine();
+    void forwardCombine(const GrCaps&);
 
     // If this returns true then b has been merged into a's op.
     bool combineIfPossible(const RecordedOp& a, GrOp* b, const GrAppliedClip* bClip,
-                           const DstTexture* bDstTexture);
+                           const DstTexture* bDstTexture, const GrCaps&);
 
     GrClearOp* fLastFullClearOp = nullptr;
     GrGpuResource::UniqueID fLastFullClearResourceID = GrGpuResource::UniqueID::InvalidID();
     GrSurfaceProxy::UniqueID fLastFullClearProxyID = GrSurfaceProxy::UniqueID::InvalidID();
 
-    GrGpu* fGpu;
-    GrResourceProvider* fResourceProvider;
-
     std::unique_ptr<gr_instanced::InstancedRendering> fInstancedRendering;
 
     int32_t fLastClipStackGenID;