1 Star 0 Fork 30

huangjunjie/chromium_third_party_skia

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Resources.h 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
李想 提交于 2023-11-30 17:12 +08:00 . chromium 114 source init
/*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef Resources_DEFINED
#define Resources_DEFINED
#include "include/core/SkBitmap.h"
#include "include/core/SkData.h"
#include "include/core/SkImage.h"
#include "include/core/SkString.h"
class SkBitmap;
class SkData;
class SkStreamAsset;
class SkTypeface;
SkString GetResourcePath(const char* resource = "");
void SetResourcePath(const char* );
bool DecodeDataToBitmap(sk_sp<SkData> data, SkBitmap* dst);
sk_sp<SkData> GetResourceAsData(const char* resource);
inline bool GetResourceAsBitmap(const char* resource, SkBitmap* dst) {
return DecodeDataToBitmap(GetResourceAsData(resource), dst);
}
inline sk_sp<SkImage> GetResourceAsImage(const char* resource) {
return SkImages::DeferredFromEncodedData(GetResourceAsData(resource));
}
std::unique_ptr<SkStreamAsset> GetResourceAsStream(const char* resource,
bool useFileStream = false);
sk_sp<SkTypeface> MakeResourceAsTypeface(const char* resource, int ttcIndex = 0);
#endif // Resources_DEFINED
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/huangjunjie31/chromium_third_party_skia.git
git@gitee.com:huangjunjie31/chromium_third_party_skia.git
huangjunjie31
chromium_third_party_skia
chromium_third_party_skia
114_trunk

搜索帮助