#include "include/core/SkData.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkString.h"
#include <memory>
#include <string>
Go to the source code of this file.
◆ GetResourceAsData() [1/2]
sk_sp< SkData > GetResourceAsData |
( |
const char * |
resource | ) |
|
Definition at line 42 of file Resources.cpp.
42 {
47 }
49 #ifdef SK_TOOLS_REQUIRE_RESOURCES
51 #endif
52 return nullptr;
53}
sk_sp< SkData >(* gResourceFactory)(const char *)
SkString GetResourcePath(const char *resource)
#define SK_ABORT(message,...)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
◆ GetResourceAsData() [2/2]
sk_sp< SkData > GetResourceAsData |
( |
const std::string & |
resource | ) |
|
|
inline |
Definition at line 26 of file Resources.h.
26 {
28}
sk_sp< SkData > GetResourceAsData(const char *resource)
◆ GetResourceAsStream()
std::unique_ptr< SkStreamAsset > GetResourceAsStream |
( |
const char * |
resource, |
|
|
bool |
useFileStream = false |
|
) |
| |
Definition at line 31 of file Resources.cpp.
31 {
32 if (useFileStream) {
35 } else {
38 : nullptr;
39 }
40}
sk_sp< SkData > GetResourceAsData(const char *resource)
static std::unique_ptr< SkFILEStream > Make(const char path[])
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
◆ GetResourcePath()
SkString GetResourcePath |
( |
const char * |
resource = "" | ) |
|
Definition at line 23 of file Resources.cpp.
23 {
25}
static SkString Join(const char *rootPath, const char *relativePath)
◆ SetResourcePath()
void SetResourcePath |
( |
const char * |
resource | ) |
|
Definition at line 27 of file Resources.cpp.
27 {
28 FLAGS_resourcePath.set(0, resource);
29}