Convert GrOvalOpFactory from GrLegacyMeshDrawOp to GrMeshDrawOp using GrSimpleDrawOpHelper.

Change-Id: Ib9f59ddf1c2c3f2bd0004ae16f842e52f45df8c9
Reviewed-on: https://skia-review.googlesource.com/16832
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h
index 03b9b1a..427543b 100644
--- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h
+++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h
@@ -40,8 +40,10 @@
             : fProcessors(args.fProcessorSet)
             , fPipelineFlags(args.fSRGBFlags)
             , fAAType((int)aaType)
-            , fRequiresDstTexture(false) {
+            , fRequiresDstTexture(false)
+            , fUsesLocalCoords(false) {
         SkASSERT(!stencilSettings);
+        SkDEBUGCODE(fDidAnalysis = false);
         if (GrAATypeIsHW(aaType)) {
             fPipelineFlags |= GrPipeline::kHWAntialias_Flag;
         }
@@ -83,6 +85,7 @@
 
     bool xpRequiresDstTexture(const GrCaps& caps, const GrAppliedClip* clip,
                               GrProcessorAnalysisCoverage geometryCoverage, GrColor* color) {
+        SkDEBUGCODE(fDidAnalysis = true);
         if (fProcessors) {
             GrProcessorAnalysisCoverage coverage = geometryCoverage;
             if (GrProcessorAnalysisCoverage::kNone == coverage) {
@@ -94,12 +97,19 @@
             GrProcessorSet::Analysis analysis =
                     fProcessors->finalize(*color, coverage, clip, isMixedSamples, caps, color);
             fRequiresDstTexture = analysis.requiresDstTexture();
+            fUsesLocalCoords = analysis.usesLocalCoords();
             return analysis.requiresDstTexture();
         } else {
+            fUsesLocalCoords = GrProcessorSet::EmptySetAnalysis().usesLocalCoords();
             return GrProcessorSet::EmptySetAnalysis().requiresDstTexture();
         }
     }
 
+    bool usesLocalCoords() const {
+        SkASSERT(fDidAnalysis);
+        return fUsesLocalCoords;
+    }
+
     GrPipeline* makePipeline(GrMeshDrawOp::Target* target) const {
         return target->allocPipeline(this->pipelineInitArgs(target));
     }
@@ -137,6 +147,8 @@
     unsigned fPipelineFlags : 8;
     unsigned fAAType : 2;
     unsigned fRequiresDstTexture : 1;
+    unsigned fUsesLocalCoords : 1;
+    SkDEBUGCODE(unsigned fDidAnalysis : 1;)
 };
 
 /**
@@ -170,6 +182,7 @@
     }
 
     using GrSimpleMeshDrawOpHelper::xpRequiresDstTexture;
+    using GrSimpleMeshDrawOpHelper::usesLocalCoords;
 
     bool isCompatible(const GrSimpleMeshDrawOpHelperWithStencil& that, const GrCaps& caps,
                       const SkRect& aBounds, const SkRect& bBounds) const {