Change mechanism that lets GrRenderTargetContext caller get op list ID.

Previously we relied on GrRenderTargetOpList returning an ID if and only
if it did not merge the op. Upcoming changes to GrRenderTargetOpList will
make it harder to track whether the op was merged.

Only CCPR (and related unit test) requires the op list ID. Now CCPR passes
a callback that is called when the op list is deterimined but before
we know if the op merges or not.

Change-Id: Iead1c3eff8de5a4183e330dd7b57362cbffe0ebb
Reviewed-on: https://skia-review.googlesource.com/c/166624
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/GrRenderTargetContextPriv.h b/src/gpu/GrRenderTargetContextPriv.h
index 52f5497..2a29282 100644
--- a/src/gpu/GrRenderTargetContextPriv.h
+++ b/src/gpu/GrRenderTargetContextPriv.h
@@ -107,8 +107,11 @@
     }
 
     uint32_t testingOnly_getOpListID();
-    uint32_t testingOnly_addDrawOp(std::unique_ptr<GrDrawOp>);
-    uint32_t testingOnly_addDrawOp(const GrClip&, std::unique_ptr<GrDrawOp>);
+
+    using WillAddOpFn = GrRenderTargetContext::WillAddOpFn;
+    void testingOnly_addDrawOp(std::unique_ptr<GrDrawOp>);
+    void testingOnly_addDrawOp(const GrClip&, std::unique_ptr<GrDrawOp>,
+                               const std::function<WillAddOpFn>& = std::function<WillAddOpFn>());
 
     bool refsWrappedObjects() const {
         return fRenderTargetContext->fRenderTargetProxy->refsWrappedObjects();