Lines Matching refs:resource
24 SkString GetResourcePath(const char* resource) {
25 return SkOSPath::Join(FLAGS_resourcePath[0], resource);
28 void SetResourcePath(const char* resource) {
29 FLAGS_resourcePath.set(0, resource);
39 std::unique_ptr<SkStreamAsset> GetResourceAsStream(const char* resource) {
40 auto data = GetResourceAsData(resource);
45 sk_sp<SkData> GetResourceAsData(const char* resource) {
47 if (auto data = gResourceFactory(resource)) {
50 SkDebugf("Resource \"%s\" not found.\n", resource);
51 SK_ABORT("missing resource");
53 if (auto data = SkData::MakeFromFileName(GetResourcePath(resource).c_str())) {
56 SkDebugf("Resource \"%s\" not found.\n", resource);
60 sk_sp<SkTypeface> MakeResourceAsTypeface(const char* resource) {
61 std::unique_ptr<SkStreamAsset> stream(GetResourceAsStream(resource));