blob: 01eaa3f214d93ee78dba30f7e5a72375be065224 [file] [log] [blame]
tfarinabcbc1782014-06-18 14:32:48 -07001/*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef Resources_DEFINED
9#define Resources_DEFINED
10
reed9ce9d672016-03-17 10:51:11 -070011#include "SkRefCnt.h"
tfarinabcbc1782014-06-18 14:32:48 -070012#include "SkString.h"
13
halcanary30b83d42014-10-26 05:23:53 -070014class SkBitmap;
Mike Reed463c8482016-12-21 12:01:12 -050015class SkData;
halcanary2f0a7282015-08-21 07:47:23 -070016class SkImage;
bungeman3ffa1262015-04-30 17:12:58 -040017class SkStreamAsset;
18class SkTypeface;
halcanary30b83d42014-10-26 05:23:53 -070019
tfarinabcbc1782014-06-18 14:32:48 -070020SkString GetResourcePath(const char* resource = "");
caryclark936b7342014-07-11 12:14:51 -070021void SetResourcePath(const char* );
tfarinabcbc1782014-06-18 14:32:48 -070022
halcanary30b83d42014-10-26 05:23:53 -070023bool GetResourceAsBitmap(const char* resource, SkBitmap* dst);
reed9ce9d672016-03-17 10:51:11 -070024sk_sp<SkImage> GetResourceAsImage(const char* resource);
Mike Reed71f867c2017-07-23 13:14:10 -040025std::unique_ptr<SkStreamAsset> GetResourceAsStream(const char* resource);
Mike Reed463c8482016-12-21 12:01:12 -050026sk_sp<SkData> GetResourceAsData(const char* resource);
bungeman13b9c952016-05-12 10:09:30 -070027sk_sp<SkTypeface> MakeResourceAsTypeface(const char* resource);
halcanary30b83d42014-10-26 05:23:53 -070028
tfarinabcbc1782014-06-18 14:32:48 -070029#endif // Resources_DEFINED