39 const char rid[])
const override {
41 std::unique_ptr<SkCodec> codec =
nullptr;
61 DataResourceProvider() =
default;
66 static constexpr char kDataURIEncodingStr[] =
";base64,";
68 const size_t prefixLen = strlen(
prefix);
69 if (strncmp(uri,
prefix, prefixLen) != 0) {
73 const char* encoding = strstr(uri + prefixLen, kDataURIEncodingStr);
78 const char* b64Data = encoding +
std::size(kDataURIEncodingStr) - 1;
79 size_t b64DataLen = strlen(b64Data);
86 void* rawData =
data->writable_data();
98SkSVGOpenTypeSVGDecoder::SkSVGOpenTypeSVGDecoder(
sk_sp<SkSVGDOM> skSvg,
size_t approximateSize)
99 : fSkSvg(
std::move(skSvg))
100 , fApproximateSize(approximateSize)
119 return std::unique_ptr<SkOpenTypeSVGDecoder>(
125 return fApproximateSize;
137 if (!palette.
empty()) {
139 constexpr const size_t colorStringLen =
sizeof(
"color") - 1;
148 constexpr const size_t glyphStringLen =
sizeof(
"glyph") - 1;
152 fSkSvg->
renderNode(&canvas, pctx, glyphIdString);
#define SkDEBUGFAIL(message)
constexpr SkEnumerate< Iter > SkMakeEnumerate(C &c)
#define INHERITED(method,...)
static constexpr int kSkStrAppendU32_MaxSize
char * SkStrAppendU32(char buffer[], uint32_t)
skresources::ResourceProvider ResourceProvider
static sk_sp< SkData > MakeUninitialized(size_t length)
static std::unique_ptr< SkMemoryStream > MakeDirect(const void *data, size_t length)
void renderNode(SkCanvas *, SkSVGPresentationContext &, const char *id) const
void setContainerSize(const SkSize &)
~SkSVGOpenTypeSVGDecoder() override
static std::unique_ptr< SkOpenTypeSVGDecoder > Make(const uint8_t *svg, size_t svgLength)
bool render(SkCanvas &, int upem, SkGlyphID glyphId, SkColor foregroundColor, SkSpan< SkColor > palette) override
size_t approximateSize() override
void set(SkSVGPropertyState state)
constexpr bool empty() const
static sk_sp< MultiFrameImageAsset > Make(sk_sp< SkData >, ImageDecodeStrategy=ImageDecodeStrategy::kLazyDecode)
virtual sk_sp< ImageAsset > loadImageAsset(const char[], const char[], const char[]) const
SK_API bool IsJpeg(const void *, size_t)
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
SK_API bool IsPng(const void *, size_t)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
static sk_sp< SkData > decode_datauri(const char prefix[], const char uri[])
static Error Decode(const void *src, size_t srcLength, void *dst, size_t *dstLength)
SkSVGProperty< SkSVGColorType, true > fColor
SkSVGPresentationAttributes fInherited
const skia_private::THashMap< SkString, SkSVGColorType > * fNamedColors
static constexpr SkSize Make(SkScalar w, SkScalar h)
std::shared_ptr< const fml::Mapping > data