Add genIDs from all contributing elements to GrReducedClip's mask key.

Change-Id: I3fed124ba3fefd1ef82acdb4ace9531d0c89ad8b
Reviewed-on: https://skia-review.googlesource.com/138586
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h
index 8629a7c..0c7d983 100644
--- a/src/gpu/GrRenderTargetOpList.h
+++ b/src/gpu/GrRenderTargetOpList.h
@@ -120,9 +120,10 @@
     SkDEBUGCODE(int numClips() const override { return fNumClips; })
     SkDEBUGCODE(void visitProxies_debugOnly(const GrOp::VisitProxyFunc&) const;)
 
-private:
-    friend class GrRenderTargetContextPriv; // for stencil clip state. TODO: this is invasive
+    const GrUniqueKey& lastStencilClipKey() const { return fLastStencilClipKey; }
+    void setLastStencilClipKey(const GrUniqueKey& key) { fLastStencilClipKey = key; }
 
+private:
     void deleteOps();
 
     struct RecordedOp {
@@ -172,9 +173,7 @@
     bool combineIfPossible(const RecordedOp& a, GrOp* b, const GrAppliedClip* bClip,
                            const DstProxy* bDstTexture, const GrCaps&);
 
-    uint32_t                       fLastClipStackGenID;
-    SkIRect                        fLastDevClipBounds;
-    int                            fLastClipNumAnalyticFPs;
+    GrUniqueKey                    fLastStencilClipKey;
 
     // For ops/opList we have mean: 5 stdDev: 28
     SkSTArray<5, RecordedOp, true> fRecordedOps;