if (FLAGS_cpu) {
SINK("565", RasterSink, kRGB_565_SkColorType);
SINK("8888", RasterSink, kN32_SkColorType);
- SINK("pdf", PDFSink);
+ SINK("pdf", PDFSink, "Pdfium");
+ SINK("pdf_poppler", PDFSink, "Poppler");
SINK("skp", SKPSink);
SINK("svg", SVGSink);
SINK("null", NullSink);
return "";
}
-PDFSink::PDFSink() {}
+PDFSink::PDFSink(const char* rasterizer) : fRasterizer(rasterizer) {}
Error PDFSink::draw(const Src& src, SkBitmap*, SkWStream* dst, SkString*) const {
SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(dst));
info.emplace_back(SkString("Subject"),
SkString("rendering correctness test"));
info.emplace_back(SkString("Creator"), SkString("Skia/DM"));
+
+ info.emplace_back(SkString("Keywords"),
+ SkStringPrintf("Rasterizer:%s;", fRasterizer));
doc->setMetadata(info, nullptr, nullptr);
return draw_skdocument(src, doc.get(), dst);
}
class PDFSink : public Sink {
public:
- PDFSink();
+ PDFSink(const char* rasterizer);
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return kAnyThread_Enclave; }
const char* fileExtension() const override { return "pdf"; }
SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, SinkFlags::kDirect }; }
+private:
+ const char* fRasterizer;
};
class XPSSink : public Sink {
"upright-matrix-8888",
"upright-matrix-gpu",
"pdf",
+ "pdf_poppler",
"serialize-8888",
"tiles_rt-8888",
"pipe-8888",
"sp-8888",
"msaa16",
"pdf",
+ "pdf_poppler",
"serialize-8888",
"tiles_rt-8888",
"pipe-8888",
"sp-8888",
"msaa16",
"pdf",
+ "pdf_poppler",
"serialize-8888",
"tiles_rt-8888",
"pipe-8888",
"nvprmsaa16",
"msaa16",
"pdf",
+ "pdf_poppler",
"serialize-8888",
"tiles_rt-8888",
"pipe-8888",
"upright-matrix-gpu",
"msaa16",
"pdf",
+ "pdf_poppler",
"serialize-8888",
"tiles_rt-8888",
"pipe-8888",
# Runs out of memory on Android bots and Daisy. Everyone else seems fine.
if 'Android' not in bot and 'Daisy' not in bot:
configs.append('pdf')
+ configs.append('pdf_poppler')
# NP is running out of RAM when we run all these modes. skia:3255
if 'NexusPlayer' not in bot: