Auto-compare GrProcessors' texture accesses in isEqual().

R=joshualitt@google.com

Review URL: https://codereview.chromium.org/654313002
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index a0ad99e..79798b6 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -116,14 +116,20 @@
     GrProcessor_Globals::GetTLS()->release(target);
 }
 
-#ifdef SK_DEBUG
-void GrProcessor::assertTexturesEqual(const GrProcessor& other) const {
-    SkASSERT(this->numTextures() == other.numTextures());
-    for (int i = 0; i < this->numTextures(); ++i) {
-        SkASSERT(this->textureAccess(i) == other.textureAccess(i));
+bool GrProcessor::hasSameTextureAccesses(const GrProcessor& that) const {
+    if (this->numTextures() != that.numTextures()) {
+        return false;
     }
+    for (int i = 0; i < this->numTextures(); ++i) {
+        if (this->textureAccess(i) != that.textureAccess(i)) {
+            return false;
+        }
+    }
+    return true;
 }
 
+#ifdef SK_DEBUG
+
 void GrProcessor::InvariantOutput::validate() const {
     if (fIsSingleComponent) {
         SkASSERT(0 == fValidFlags || kRGBA_GrColorComponentFlags == fValidFlags);