26 static const char kResourceTypePrefixes[] = {
32 SkASSERT((
unsigned)
type < std::size(kResourceTypePrefixes));
33 dst[0] = kResourceTypePrefixes[(unsigned)
type];
46 static const char* kResourceTypeNames[] = {
52 SkASSERT((
unsigned)
type < std::size(kResourceTypeNames));
53 return kResourceTypeNames[(unsigned)
type];
62static void add_subdict(
const std::vector<SkPDFIndirectReference>& resourceList,
65 if (!resourceList.empty()) {
76 static const char kProcs[][7] = {
"PDF",
"Text",
"ImageB",
"ImageC",
"ImageI"};
77 procSets->reserve(std::size(kProcs));
78 for (
const char* proc : kProcs) {
79 procSets->appendName(proc);
85 const std::vector<SkPDFIndirectReference>& graphicStateResources,
86 const std::vector<SkPDFIndirectReference>& shaderResources,
87 const std::vector<SkPDFIndirectReference>& xObjectResources,
88 const std::vector<SkPDFIndirectReference>& fontResources) {
static void add_subdict(const std::vector< SkPDFIndirectReference > &resourceList, SkPDFResourceType type, SkPDFDict *dst)
constexpr size_t kMaxResourceNameLength
void SkPDFWriteResourceName(SkWStream *dst, SkPDFResourceType type, int key)
std::unique_ptr< SkPDFDict > SkPDFMakeResourceDict(const std::vector< SkPDFIndirectReference > &graphicStateResources, const std::vector< SkPDFIndirectReference > &shaderResources, const std::vector< SkPDFIndirectReference > &xObjectResources, const std::vector< SkPDFIndirectReference > &fontResources)
static SkString resource(SkPDFResourceType type, int index)
static const char * resource_name(SkPDFResourceType type)
static std::unique_ptr< SkPDFArray > make_proc_set()
static char * get_resource_name(char dst[kMaxResourceNameLength], SkPDFResourceType type, int key)
static std::unique_ptr< SkPDFDict > SkPDFMakeDict(const char *type=nullptr)
static std::unique_ptr< SkPDFArray > SkPDFMakeArray(Args... args)
static constexpr int kSkStrAppendS32_MaxSize
char * SkStrAppendS32(char buffer[], int32_t)
Type::kYUV Type::kRGBA() int(0.7 *637)
static const uint8_t buffer[]