20 const char xmpData[] =
21 "http://ns.adobe.com/xap/1.0/\0"
23 <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 6.0.0">
24 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
25 xmlns:hdrgm="http://ns.adobe.com/hdr-gain-map/1.0/">
26 <rdf:Description rdf:about="">
27 <hdrgm:Version>1.0</hdrgm:Version>
28 <hdrgm:GainMapMax>3</hdrgm:GainMapMax>
29 <hdrgm:HDRCapacityMax>4</hdrgm:HDRCapacityMax>
34 std::vector<sk_sp<SkData>> app1Params;
46DEF_TEST(SkJpegXmp_defaultValues, r) {
47 const char xmpData[] =
48 "http://ns.adobe.com/xap/1.0/\0"
50 <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 6.0.0">
51 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
52 xmlns:hdrgm="http://ns.adobe.com/hdr-gain-map/1.0/">
53 <rdf:Description rdf:about="" hdrgm:Version="1.0">
58 std::vector<sk_sp<SkData>> app1Params;
86 const char c[4] = {
static_cast<char>((v >> 24) & 0xff),
87 static_cast<char>((v >> 16) & 0xff),
88 static_cast<char>((v >> 8) & 0xff),
89 static_cast<char>(v & 0xff)};
90 return std::string(c, 4);
95 const std::string dataWithGuid = std::regex_replace(
data,
std::regex(
"\\$GUID"), guid);
96 return std::string(
"http://ns.adobe.com/xap/1.0/") +
'\0' + dataWithGuid;
102 const std::string&
data) {
103 return std::string(
"http://ns.adobe.com/xmp/extension/") +
'\0' + digest.
toHexString().
c_str() +
107DEF_TEST(SkJpegXmp_readExtendedXmp, r) {
108 const std::string standardXmpData = R
"(
109 <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 6.0.0">
110 <rdf:RDF xmlns:xmpNote="http://ns.adobe.com/xmp/note/">
111 <rdf:Description rdf:about="">
112 <xmpNote:HasExtendedXMP>$GUID</xmpNote:HasExtendedXMP>
117 const std::string extendedXmpData1 = R
"(
118 <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 6.0.0">
119 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
120 xmlns:hdrgm="http://ns.adobe.com/hdr-gain-map/1.0/">
121 <rdf:Description rdf:about="">
122 <hdrgm:Version>1.0</hdrgm:Version>
123 <hdrgm:GainMapMax>3</hdrgm:GainMapMax>
124 <hdrgm:HDRCapacityMax>4</hdrgm:HDRCapacityMax>)";
125 const std::string extendedXmpData2 = R
"(
130 const uint32_t totalExtendedXmpSize = extendedXmpData1.size() + extendedXmpData2.size();
132 md5.write(extendedXmpData1.data(), extendedXmpData1.length());
133 md5.write(extendedXmpData2.data(), extendedXmpData2.length());
138 const uint32_t offset1 = 0;
139 const std::string extendedXmpData1WithHeader =
142 const uint32_t offset2 = extendedXmpData1.size();
143 const std::string extendedXmpData2WithHeader =
146 std::vector<sk_sp<SkData>> app1Params;
148 standardXmpDataWithHeader.length()));
150 extendedXmpData1WithHeader.length()));
152 extendedXmpData2WithHeader.length()));
static SkMD5::Digest md5(const SkBitmap &bm)
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static std::string standard_xmp_with_header(const SkMD5::Digest &digest, const std::string &data)
static std::string extended_xmp_with_header(const SkMD5::Digest &digest, uint32_t size, uint32_t offset, const std::string &data)
DEF_TEST(SkJpegXmp_standardXmp, r)
static std::string uint32_to_string(uint32_t v)
std::unique_ptr< SkXmp > SkJpegMakeXmp(const std::vector< sk_sp< SkData > > &decoderApp1Params)
#define REPORTER_ASSERT(r, cond,...)
static sk_sp< SkData > MakeWithoutCopy(const void *data, size_t length)
const char * c_str() const
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
SkString toHexString() const
std::shared_ptr< const fml::Mapping > data