diff options
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DM.cpp | 8 | ||||
-rw-r--r-- | dm/DMSrcSink.cpp | 3 |
2 files changed, 3 insertions, 8 deletions
@@ -1357,12 +1357,8 @@ int main(int argc, char** argv) { SkTaskGroup::Enabler enabled(FLAGS_threads); gCreateTypefaceDelegate = &create_from_name; - { - SkString testResourcePath = GetResourcePath("images/color_wheel.png"); - SkFILEStream testResource(testResourcePath.c_str()); - if (!testResource.isValid()) { - info("Some resources are missing. Do you need to set --resourcePath?\n"); - } + if (nullptr == GetResourceAsData("images/color_wheel.png")) { + info("Some resources are missing. Do you need to set --resourcePath?\n"); } gather_gold(); gather_uninteresting_hashes(); diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 89a4b531e2..96817e0749 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -1066,8 +1066,7 @@ Error ColorCodecSrc::draw(SkCanvas* canvas) const { } // Load the dst ICC profile. This particular dst is fairly similar to Adobe RGB. - sk_sp<SkData> dstData = SkData::MakeFromFileName( - GetResourcePath("icc_profiles/HP_ZR30w.icc").c_str()); + sk_sp<SkData> dstData = GetResourceAsData("icc_profiles/HP_ZR30w.icc"); if (!dstData) { return "Cannot read monitor profile. Is the resource path set correctly?"; } |