tfarina | bcbc178 | 2014-06-18 14:32:48 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
reed | 9ce9d67 | 2016-03-17 10:51:11 -0700 | [diff] [blame] | 11 | #include "SkRefCnt.h" |
tfarina | bcbc178 | 2014-06-18 14:32:48 -0700 | [diff] [blame] | 12 | #include "SkString.h" |
| 13 | |
halcanary | 30b83d4 | 2014-10-26 05:23:53 -0700 | [diff] [blame] | 14 | class SkBitmap; |
Mike Reed | 463c848 | 2016-12-21 12:01:12 -0500 | [diff] [blame] | 15 | class SkData; |
halcanary | 2f0a728 | 2015-08-21 07:47:23 -0700 | [diff] [blame] | 16 | class SkImage; |
bungeman | 3ffa126 | 2015-04-30 17:12:58 -0400 | [diff] [blame] | 17 | class SkStreamAsset; |
| 18 | class SkTypeface; |
halcanary | 30b83d4 | 2014-10-26 05:23:53 -0700 | [diff] [blame] | 19 | |
tfarina | bcbc178 | 2014-06-18 14:32:48 -0700 | [diff] [blame] | 20 | SkString GetResourcePath(const char* resource = ""); |
caryclark | 936b734 | 2014-07-11 12:14:51 -0700 | [diff] [blame] | 21 | void SetResourcePath(const char* ); |
tfarina | bcbc178 | 2014-06-18 14:32:48 -0700 | [diff] [blame] | 22 | |
halcanary | 30b83d4 | 2014-10-26 05:23:53 -0700 | [diff] [blame] | 23 | bool GetResourceAsBitmap(const char* resource, SkBitmap* dst); |
reed | 9ce9d67 | 2016-03-17 10:51:11 -0700 | [diff] [blame] | 24 | sk_sp<SkImage> GetResourceAsImage(const char* resource); |
Mike Reed | 71f867c | 2017-07-23 13:14:10 -0400 | [diff] [blame] | 25 | std::unique_ptr<SkStreamAsset> GetResourceAsStream(const char* resource); |
Mike Reed | 463c848 | 2016-12-21 12:01:12 -0500 | [diff] [blame] | 26 | sk_sp<SkData> GetResourceAsData(const char* resource); |
bungeman | 13b9c95 | 2016-05-12 10:09:30 -0700 | [diff] [blame] | 27 | sk_sp<SkTypeface> MakeResourceAsTypeface(const char* resource); |
halcanary | 30b83d4 | 2014-10-26 05:23:53 -0700 | [diff] [blame] | 28 | |
tfarina | bcbc178 | 2014-06-18 14:32:48 -0700 | [diff] [blame] | 29 | #endif // Resources_DEFINED |