resources: remove most uses of GetResourcePath()

Going forward, we will standardize on GetResourceAsData(), which will
make it easier to run tests in environments without access to the
filesystem.

Also: GetResourceAsData() complains when a resource is missing.
This is usually an error.

Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
Reviewed-on: https://skia-review.googlesource.com/82642
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
diff --git a/samplecode/SampleCowboy.cpp b/samplecode/SampleCowboy.cpp
index b1eec87..bd8f7c9 100644
--- a/samplecode/SampleCowboy.cpp
+++ b/samplecode/SampleCowboy.cpp
@@ -37,12 +37,13 @@
     };
 
     void onOnceBeforeDraw() override {
-        fPath = GetResourcePath("Cowboy.svg");
-        SkFILEStream svgStream(fPath.c_str());
-        if (!svgStream.isValid()) {
-            SkDebugf("file not found: \"path\"\n", fPath.c_str());
+        constexpr char path[] = "Cowboy.svg";
+        auto data = GetResourceAsData(path);
+        if (!data) {
+            SkDebugf("file not found: \"%s\"\n", path);
             return;
         }
+        SkMemoryStream svgStream(std::move(data));
 
         SkDOM xmlDom;
         if (!xmlDom.build(svgStream)) {