Go to the source code of this file.
◆ count_xml_escape_size()
static int count_xml_escape_size |
( |
const SkString & |
input | ) |
|
|
static |
Definition at line 182 of file SkPDFMetadata.cpp.
182 {
183 int extra = 0;
184 for (
size_t i = 0;
i < input.
size(); ++
i) {
185 if (input[
i] ==
'&') {
186 extra += 4;
187 }
else if (input[
i] ==
'<') {
188 extra += 3;
189 }
190 }
191 return extra;
192}
◆ escape_xml()
SkString escape_xml |
( |
const SkString & |
input, |
|
|
const char * |
before = nullptr , |
|
|
const char * |
after = nullptr |
|
) |
| |
Definition at line 194 of file SkPDFMetadata.cpp.
196 {
197 if (input.
size() == 0) {
198 return input;
199 }
200
201
202
203 size_t beforeLen = before ? strlen(before) : 0;
204 size_t afterLen = after ? strlen(after) : 0;
208 if (before) {
209 strncpy(
out, before, beforeLen);
211 }
212 static const char kAmp[] = "&";
213 static const char kLt[] = "<";
214 for (
size_t i = 0;
i < input.
size(); ++
i) {
215 if (input[
i] ==
'&') {
216 memcpy(
out, kAmp, strlen(kAmp));
218 }
else if (input[
i] ==
'<') {
219 memcpy(
out, kLt, strlen(kLt));
221 } else {
223 }
224 }
225 if (after) {
226 strncpy(
out, after, afterLen);
228 }
229
233}
◆ hexify()
static void hexify |
( |
const uint8_t ** |
inputPtr, |
|
|
char ** |
outputPtr, |
|
|
int |
count |
|
) |
| |
|
static |
◆ operator!=()
◆ pdf_date()
Definition at line 40 of file SkPDFMetadata.cpp.
40 {
42 char timezoneSign = timeZoneMinutes >= 0 ? '+' : '-';
43 int timeZoneHours =
SkTAbs(timeZoneMinutes) / 60;
44 timeZoneMinutes =
SkTAbs(timeZoneMinutes) % 60;
46 "D:%04u%02u%02u%02u%02u%02u%c%02d'%02d'",
47 static_cast<unsigned>(dt.
fYear),
static_cast<unsigned>(dt.
fMonth),
48 static_cast<unsigned>(dt.
fDay),
static_cast<unsigned>(dt.
fHour),
49 static_cast<unsigned>(dt.
fMinute),
50 static_cast<unsigned>(dt.
fSecond), timezoneSign, timeZoneHours,
51 timeZoneMinutes);
52}
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
constexpr int SkToInt(S x)
◆ uuid_to_string()
Definition at line 139 of file SkPDFMetadata.cpp.
139 {
140
145 *ptr++ = '-';
147 *ptr++ = '-';
149 *ptr++ = '-';
151 *ptr++ = '-';
156}
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 to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
std::shared_ptr< const fml::Mapping > data
◆ kZeroTime