Further unified error handling between SkSL and DSL

This eliminates the SkSL ErrorReporter class and funnels everything
through the DSL ErrorHandler. Since the DSL error handler can be
changed, this required a number of updates to ensure that things work
properly in the face of custom error handlers. There is probably more
work to be done in that area, but this at least passes all existing
tests.

Change-Id: Iaee27b79fc4ed426c484ccab257c09d28619ead5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438116
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/tests/SkDSLRuntimeEffectTest.cpp b/tests/SkDSLRuntimeEffectTest.cpp
index 838875f..cc8aa21 100644
--- a/tests/SkDSLRuntimeEffectTest.cpp
+++ b/tests/SkDSLRuntimeEffectTest.cpp
@@ -200,22 +200,22 @@
     // Test error reporting. We put this before a couple of successful tests to ensure that a
     // failure doesn't leave us in a broken state.
     {
-        class SimpleErrorHandler : public ErrorHandler {
+        class SimpleErrorReporter : public SkSL::ErrorReporter {
         public:
-            void handleError(const char* msg, PositionInfo pos) override {
-                fMsg = msg;
+            void handleError(const char* msg, SkSL::PositionInfo pos) override {
+                fMsg += msg;
             }
 
             SkSL::String fMsg;
-        } errorHandler;
+        } errorReporter;
         effect.start();
-        SetErrorHandler(&errorHandler);
+        SetErrorReporter(&errorReporter);
         Parameter p(kFloat2_Type, "p");
         Function(kHalf4_Type, "main", p).define(
             Return(1) // Error, type mismatch
         );
         effect.end(false);
-        REPORTER_ASSERT(r, errorHandler.fMsg == "error: expected 'half4', but found 'int'\n");
+        REPORTER_ASSERT(r, errorReporter.fMsg == "expected 'half4', but found 'int'");
     }
 
     // Mutating coords should work. (skbug.com/10918)