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/tests/PDFJpegEmbedTest.cpp b/tests/PDFJpegEmbedTest.cpp
index b62b166..aaac2b9 100644
--- a/tests/PDFJpegEmbedTest.cpp
+++ b/tests/PDFJpegEmbedTest.cpp
@@ -32,8 +32,7 @@
static sk_sp<SkData> load_resource(
skiatest::Reporter* r, const char* test, const char* filename) {
- SkString path(GetResourcePath(filename));
- sk_sp<SkData> data(SkData::MakeFromFileName(path.c_str()));
+ sk_sp<SkData> data = GetResourceAsData(filename);
if (!data) {
INFOF(r, "\n%s: Resource '%s' can not be found.\n",
test, filename);