Add GrOp::wasRecorded and use in instanced rendering for tracking.

BUG=skia:

Change-Id: I4c5cdf47d42b7adae3649c7f96caabe68f45acbf
Reviewed-on: https://skia-review.googlesource.com/9308
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h
index 11198dd..c1bf7f7 100644
--- a/src/gpu/ops/GrOp.h
+++ b/src/gpu/ops/GrOp.h
@@ -126,6 +126,14 @@
     }
 
     /**
+     * This is called to notify the op that it has been recorded into a GrOpList. Ops can use this
+     * to begin preparations for the flush of the op list. Note that the op still may either be
+     * combined into another op or have another op combined into it via combineIfPossible() after
+     * this call is made.
+     */
+    virtual void wasRecorded() {}
+
+    /**
      * Called prior to executing. The op should perform any resource creation or data transfers
      * necessary before execute() is called.
      */