| 1 |
/* |
| 2 |
* Copyright 2016 Google Inc. |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
|
| 8 |
#include "bench/Benchmark.h" |
| 9 |
|
| 10 |
#include "include/core/SkBitmap.h" |
| 11 |
#include "include/core/SkData.h" |
| 12 |
#include "include/core/SkExecutor.h" |
| 13 |
#include "include/core/SkImage.h" |
| 14 |
#include "include/core/SkPath.h" |
| 15 |
#include "include/core/SkPathBuilder.h" |
| 16 |
#include "include/core/SkPixmap.h" |
| 17 |
#include "include/core/SkStream.h" |
| 18 |
#include "include/docs/SkPDFJpegHelpers.h" |
| 19 |
#include "include/effects/SkGradient.h" |
| 20 |
#include "include/private/base/SkTo.h" |
| 21 |
#include "src/base/SkRandom.h" |
| 22 |
#include "src/core/SkAutoPixmapStorage.h" |
| 23 |
#include "src/pdf/SkPDFUnion.h" |
| 24 |
#include "src/utils/SkFloatToDecimal.h" |
| 25 |
#include "tools/DecodeUtils.h" |
| 26 |
#include "tools/Resources.h" |
| 27 |
#include "tools/fonts/FontToolUtils.h" |
| 28 |
|
| 29 |
namespace { |
| 30 |
struct WStreamWriteTextBenchmark : public Benchmark { |
| 31 |
std::unique_ptr<SkWStream> fWStream; |
| 32 |
WStreamWriteTextBenchmark() : fWStream(new SkNullWStream) {} |
| 33 |
const char* onGetName() override { return "WStreamWriteText"; } |
| 34 |
bool isSuitableFor(Backend backend) override { |
| 35 |
return backend == Backend::kNonRendering; |
| 36 |
} |
| 37 |
void onDraw(int loops, SkCanvas*) override { |
| 38 |
while (loops-- > 0) { |
| 39 |
for (int i = 1000; i-- > 0;) { |
| 40 |
fWStream->writeText("HELLO SKIA!\n"); |
| 41 |
} |
| 42 |
} |
| 43 |
} |
| 44 |
}; |
| 45 |
} // namespace |
| 46 |
|
| 47 |
DEF_BENCH(return new WStreamWriteTextBenchmark;) |
| 48 |
|
| 49 |
// Test speed of SkFloatToDecimal for typical floats that |
| 50 |
// might be found in a PDF document. |
| 51 |
struct PDFScalarBench : public Benchmark { |
| 52 |
PDFScalarBench(const char* n, float (*f)(SkRandom*)) : fName(n), fNextFloat(f) {} |
| 53 |
const char* fName; |
| 54 |
float (*fNextFloat)(SkRandom*); |
| 55 |
bool isSuitableFor(Backend b) override { |
| 56 |
return b == Backend::kNonRendering; |
| 57 |
} |
| 58 |
const char* onGetName() override { return fName; } |
| 59 |
void onDraw(int loops, SkCanvas*) override { |
| 60 |
SkRandom random; |
| 61 |
char dst[kMaximumSkFloatToDecimalLength]; |
| 62 |
while (loops-- > 0) { |
| 63 |
auto f = fNextFloat(&random); |
| 64 |
(void)SkFloatToDecimal(f, dst); |
| 65 |
} |
| 66 |
} |
| 67 |
}; |
| 68 |
|
| 69 |
float next_common(SkRandom* random) { |
| 70 |
return random->nextRangeF(-500.0f, 1500.0f); |
| 71 |
} |
| 72 |
float next_any(SkRandom* random) { |
| 73 |
union { uint32_t u; float f; }; |
| 74 |
u = random->nextU(); |
| 75 |
static_assert(sizeof(float) == sizeof(uint32_t), ""); |
| 76 |
return f; |
| 77 |
} |
| 78 |
|
| 79 |
DEF_BENCH(return new PDFScalarBench("PDFScalar_common", next_common);) |
| 80 |
DEF_BENCH(return new PDFScalarBench("PDFScalar_random", next_any);) |
| 81 |
|
| 82 |
#ifdef SK_SUPPORT_PDF |
| 83 |
|
| 84 |
#include "src/pdf/SkPDFBitmap.h" |
| 85 |
#include "src/pdf/SkPDFDocumentPriv.h" |
| 86 |
#include "src/pdf/SkPDFShader.h" |
| 87 |
#include "src/pdf/SkPDFUtils.h" |
| 88 |
|
| 89 |
namespace { |
| 90 |
class PDFImageBench : public Benchmark { |
| 91 |
public: |
| 92 |
PDFImageBench() {} |
| 93 |
~PDFImageBench() override {} |
| 94 |
|
| 95 |
protected: |
| 96 |
const char* onGetName() override { return "PDFImage"; } |
| 97 |
bool isSuitableFor(Backend backend) override { |
| 98 |
return backend == Backend::kNonRendering; |
| 99 |
} |
| 100 |
void onDelayedSetup() override { |
| 101 |
sk_sp<SkImage> img(ToolUtils::GetResourceAsImage("images/color_wheel.png")); |
| 102 |
if (img) { |
| 103 |
// force decoding, throw away reference to encoded data. |
| 104 |
SkAutoPixmapStorage pixmap; |
| 105 |
pixmap.alloc(SkImageInfo::MakeN32Premul(img->dimensions())); |
| 106 |
if (img->readPixels(nullptr, pixmap, 0, 0)) { |
| 107 |
fImage = SkImages::RasterFromPixmapCopy(pixmap); |
| 108 |
} |
| 109 |
} |
| 110 |
} |
| 111 |
void onDraw(int loops, SkCanvas*) override { |
| 112 |
if (!fImage) { |
| 113 |
return; |
| 114 |
} |
| 115 |
while (loops-- > 0) { |
| 116 |
SkNullWStream nullStream; |
| 117 |
SkPDFDocument doc(&nullStream, SkPDF::Metadata()); |
| 118 |
doc.beginPage(256, 256); |
| 119 |
(void)SkPDFSerializeImage(fImage.get(), &doc, 101); |
| 120 |
} |
| 121 |
} |
| 122 |
|
| 123 |
private: |
| 124 |
sk_sp<SkImage> fImage; |
| 125 |
}; |
| 126 |
|
| 127 |
class PDFJpegImageBench : public Benchmark { |
| 128 |
public: |
| 129 |
PDFJpegImageBench() {} |
| 130 |
~PDFJpegImageBench() override {} |
| 131 |
|
| 132 |
protected: |
| 133 |
const char* onGetName() override { return "PDFJpegImage"; } |
| 134 |
bool isSuitableFor(Backend backend) override { |
| 135 |
return backend == Backend::kNonRendering; |
| 136 |
} |
| 137 |
void onDelayedSetup() override { |
| 138 |
sk_sp<SkImage> img(ToolUtils::GetResourceAsImage("images/mandrill_512_q075.jpg")); |
| 139 |
if (!img) { return; } |
| 140 |
auto encoded = img->refEncodedData(); |
| 141 |
SkASSERT(encoded); |
| 142 |
if (!encoded) { return; } |
| 143 |
fImage = img; |
| 144 |
} |
| 145 |
void onDraw(int loops, SkCanvas*) override { |
| 146 |
if (!fImage) { |
| 147 |
SkDEBUGFAIL(""); |
| 148 |
return; |
| 149 |
} |
| 150 |
while (loops-- > 0) { |
| 151 |
SkNullWStream nullStream; |
| 152 |
SkPDFDocument doc(&nullStream, SkPDF::Metadata()); |
| 153 |
doc.beginPage(256, 256); |
| 154 |
(void)SkPDFSerializeImage(fImage.get(), &doc, 101); |
| 155 |
} |
| 156 |
} |
| 157 |
|
| 158 |
private: |
| 159 |
sk_sp<SkImage> fImage; |
| 160 |
}; |
| 161 |
|
| 162 |
/** Test calling DEFLATE on a 78k PDF command stream. Used for measuring |
| 163 |
alternate zlib settings, usage, and library versions. */ |
| 164 |
class PDFCompressionBench : public Benchmark { |
| 165 |
public: |
| 166 |
PDFCompressionBench() {} |
| 167 |
~PDFCompressionBench() override {} |
| 168 |
|
| 169 |
protected: |
| 170 |
const char* onGetName() override { return "PDFCompression"; } |
| 171 |
bool isSuitableFor(Backend backend) override { |
| 172 |
return backend == Backend::kNonRendering; |
| 173 |
} |
| 174 |
void onDelayedSetup() override { |
| 175 |
fAsset = GetResourceAsStream("pdf_command_stream.txt"); |
| 176 |
} |
| 177 |
void onDraw(int loops, SkCanvas*) override { |
| 178 |
SkASSERT(fAsset); |
| 179 |
if (!fAsset) { return; } |
| 180 |
while (loops-- > 0) { |
| 181 |
SkNullWStream wStream; |
| 182 |
SkPDFDocument doc(&wStream, SkPDF::Metadata()); |
| 183 |
doc.beginPage(256, 256); |
| 184 |
(void)SkPDFStreamOut(nullptr, fAsset->duplicate(), |
| 185 |
&doc, SkPDFSteamCompressionEnabled::Yes); |
| 186 |
} |
| 187 |
} |
| 188 |
|
| 189 |
private: |
| 190 |
std::unique_ptr<SkStreamAsset> fAsset; |
| 191 |
}; |
| 192 |
|
| 193 |
struct PDFColorComponentBench : public Benchmark { |
| 194 |
bool isSuitableFor(Backend b) override { |
| 195 |
return b == Backend::kNonRendering; |
| 196 |
} |
| 197 |
const char* onGetName() override { return "PDFColorComponent"; } |
| 198 |
void onDraw(int loops, SkCanvas*) override { |
| 199 |
char dst[5]; |
| 200 |
while (loops-- > 0) { |
| 201 |
for (int i = 0; i < 256; ++i) { |
| 202 |
(void)SkPDFUtils::ColorToDecimal(SkToU8(i), dst); |
| 203 |
} |
| 204 |
} |
| 205 |
} |
| 206 |
}; |
| 207 |
|
| 208 |
struct PDFShaderBench : public Benchmark { |
| 209 |
sk_sp<SkShader> fShader; |
| 210 |
const char* onGetName() final { return "PDFShader"; } |
| 211 |
bool isSuitableFor(Backend b) final { return b == Backend::kNonRendering; } |
| 212 |
void onDelayedSetup() final { |
| 213 |
const SkPoint pts[2] = {{0.0f, 0.0f}, {100.0f, 100.0f}}; |
| 214 |
const SkColor4f colors[] = { |
| 215 |
SkColors::kRed, SkColors::kGreen, SkColors::kBlue, |
| 216 |
SkColors::kWhite, SkColors::kBlack, |
| 217 |
}; |
| 218 |
fShader = SkShaders::LinearGradient(pts, {{colors, {}, SkTileMode::kClamp}, {}}); |
| 219 |
} |
| 220 |
void onDraw(int loops, SkCanvas*) final { |
| 221 |
SkASSERT(fShader); |
| 222 |
while (loops-- > 0) { |
| 223 |
SkNullWStream nullStream; |
| 224 |
SkPDFDocument doc(&nullStream, SkPDF::Metadata()); |
| 225 |
doc.beginPage(256, 256); |
| 226 |
(void) SkPDFMakeShader(&doc, fShader.get(), SkMatrix::I(), |
| 227 |
{0, 0, 400, 400}, SkColors::kBlack); |
| 228 |
} |
| 229 |
} |
| 230 |
}; |
| 231 |
|
| 232 |
struct WritePDFTextBenchmark : public Benchmark { |
| 233 |
std::unique_ptr<SkWStream> fWStream; |
| 234 |
WritePDFTextBenchmark() : fWStream(new SkNullWStream) {} |
| 235 |
const char* onGetName() override { return "WritePDFText"; } |
| 236 |
bool isSuitableFor(Backend backend) override { |
| 237 |
return backend == Backend::kNonRendering; |
| 238 |
} |
| 239 |
void onDraw(int loops, SkCanvas*) override { |
| 240 |
static const char kHello[] = "HELLO SKIA!\n"; |
| 241 |
static const char kBinary[] = "\001\002\003\004\005\006"; |
| 242 |
while (loops-- > 0) { |
| 243 |
for (int i = 1000; i-- > 0;) { |
| 244 |
SkPDFWriteTextString(fWStream.get(), kHello, strlen(kHello)); |
| 245 |
SkPDFWriteByteString(fWStream.get(), kBinary, strlen(kBinary)); |
| 246 |
} |
| 247 |
} |
| 248 |
} |
| 249 |
}; |
| 250 |
|
| 251 |
// Test for regression chromium:947381 |
| 252 |
// with 5c83ae81aa : 2364.99 microsec |
| 253 |
// without 5c83ae81aa : 302821.78 microsec |
| 254 |
struct PDFClipPathBenchmark : public Benchmark { |
| 255 |
SkPath fPath; |
| 256 |
void onDelayedSetup() override { |
| 257 |
SkBitmap bitmap; |
| 258 |
bitmap.allocN32Pixels(256, 256); |
| 259 |
bitmap.eraseColor(SK_ColorWHITE); |
| 260 |
{ |
| 261 |
SkCanvas tmp(bitmap); |
| 262 |
SkPaint paint; |
| 263 |
paint.setAntiAlias(false); |
| 264 |
paint.setStyle(SkPaint::kStroke_Style); |
| 265 |
paint.setStrokeWidth(10); |
| 266 |
for (int r : {20, 40, 60, 80, 100, 120}) { |
| 267 |
tmp.drawCircle(128, 128, (float)r, paint); |
| 268 |
} |
| 269 |
} |
| 270 |
SkPathBuilder builder; |
| 271 |
for (int y = 0; y < 256; ++y) { |
| 272 |
SkColor current = bitmap.getColor(0, y); |
| 273 |
int start = 0; |
| 274 |
for (int x = 0; x < 256; ++x) { |
| 275 |
SkColor color = bitmap.getColor(x, y); |
| 276 |
if (color == current) { |
| 277 |
continue; |
| 278 |
} |
| 279 |
if (color == SK_ColorBLACK) { |
| 280 |
start = x; |
| 281 |
} else { |
| 282 |
builder.addRect(SkRect::Make(SkIRect{start, y, x, y + 1})); |
| 283 |
} |
| 284 |
current = color; |
| 285 |
} |
| 286 |
if (current == SK_ColorBLACK) { |
| 287 |
builder.addRect(SkRect::Make(SkIRect{start, y, 256, y + 1})); |
| 288 |
} |
| 289 |
} |
| 290 |
fPath = builder.detach(); |
| 291 |
} |
| 292 |
const char* onGetName() override { return "PDFClipPath"; } |
| 293 |
bool isSuitableFor(Backend backend) override { |
| 294 |
return backend == Backend::kNonRendering; |
| 295 |
} |
| 296 |
void onDraw(int loops, SkCanvas*) override { |
| 297 |
while (loops-- > 0) { |
| 298 |
SkNullWStream wStream; |
| 299 |
SkPDFDocument doc(&wStream, SkPDF::Metadata()); |
| 300 |
SkCanvas* canvas = doc.beginPage(256, 256); |
| 301 |
canvas->clipPath(fPath); |
| 302 |
canvas->translate(4.0f/3, 4.0f/3); |
| 303 |
canvas->clipPath(fPath); |
| 304 |
canvas->clear(SK_ColorRED); |
| 305 |
doc.endPage(); |
| 306 |
} |
| 307 |
} |
| 308 |
}; |
| 309 |
|
| 310 |
} // namespace |
| 311 |
DEF_BENCH(return new PDFImageBench;) |
| 312 |
DEF_BENCH(return new PDFJpegImageBench;) |
| 313 |
DEF_BENCH(return new PDFCompressionBench;) |
| 314 |
DEF_BENCH(return new PDFColorComponentBench;) |
| 315 |
DEF_BENCH(return new PDFShaderBench;) |
| 316 |
DEF_BENCH(return new WritePDFTextBenchmark;) |
| 317 |
DEF_BENCH(return new PDFClipPathBenchmark;) |
| 318 |
|
| 319 |
#ifdef SK_PDF_ENABLE_SLOW_TESTS |
| 320 |
#include "include/core/SkExecutor.h" |
| 321 |
namespace { |
| 322 |
void big_pdf_test(SkDocument* doc, const SkBitmap& background) { |
| 323 |
static const char* kText[] = { |
| 324 |
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do", |
| 325 |
"eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad", |
| 326 |
"minim veniam, quis nostrud exercitation ullamco laboris nisi ut", |
| 327 |
"aliquip ex ea commodo consequat. Duis aute irure dolor in", |
| 328 |
"reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla", |
| 329 |
"pariatur. Excepteur sint occaecat cupidatat non proident, sunt in", |
| 330 |
"culpa qui officia deserunt mollit anim id est laborum.", |
| 331 |
"", |
| 332 |
"Sed ut perspiciatis, unde omnis iste natus error sit voluptatem", |
| 333 |
"accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae", |
| 334 |
"ab illo inventore veritatis et quasi architecto beatae vitae dicta", |
| 335 |
"sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit,", |
| 336 |
"aspernatur aut odit aut fugit, sed quia consequuntur magni dolores", |
| 337 |
"eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est,", |
| 338 |
"qui dolorem ipsum, quia dolor sit amet consectetur adipiscing velit,", |
| 339 |
"sed quia non numquam do eius modi tempora incididunt, ut labore et", |
| 340 |
"dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam,", |
| 341 |
"quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi", |
| 342 |
"ut aliquid ex ea commodi consequatur? Quis autem vel eum iure", |
| 343 |
"reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae", |
| 344 |
"consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla", |
| 345 |
"pariatur?", |
| 346 |
"", |
| 347 |
"At vero eos et accusamus et iusto odio dignissimos ducimus, qui", |
| 348 |
"blanditiis praesentium voluptatum deleniti atque corrupti, quos", |
| 349 |
"dolores et quas molestias excepturi sint, obcaecati cupiditate non", |
| 350 |
"provident, similique sunt in culpa, qui officia deserunt mollitia", |
| 351 |
"animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis", |
| 352 |
"est et expedita distinctio. Nam libero tempore, cum soluta nobis est", |
| 353 |
"eligendi optio, cumque nihil impedit, quo minus id, quod maxime", |
| 354 |
"placeat, facere possimus, omnis voluptas assumenda est, omnis dolor", |
| 355 |
"repellendus. Temporibus autem quibusdam et aut officiis debitis aut", |
| 356 |
"rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint", |
| 357 |
"et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente", |
| 358 |
"delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut", |
| 359 |
"perferendis doloribus asperiores repellat", |
| 360 |
"", |
| 361 |
"Sed ut perspiciatis, unde omnis iste natus error sit voluptatem", |
| 362 |
"accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae", |
| 363 |
"ab illo inventore veritatis et quasi architecto beatae vitae dicta", |
| 364 |
"sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit,", |
| 365 |
"aspernatur aut odit aut fugit, sed quia consequuntur magni dolores", |
| 366 |
"eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est,", |
| 367 |
"qui dolorem ipsum, quia dolor sit amet consectetur adipiscing velit,", |
| 368 |
"sed quia non numquam do eius modi tempora incididunt, ut labore et", |
| 369 |
"dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam,", |
| 370 |
"quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi", |
| 371 |
"ut aliquid ex ea commodi consequatur? Quis autem vel eum iure", |
| 372 |
"reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae", |
| 373 |
"consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla", |
| 374 |
"pariatur?", |
| 375 |
"", |
| 376 |
}; |
| 377 |
SkCanvas* canvas = nullptr; |
| 378 |
float x = 36; |
| 379 |
float y = 36; |
| 380 |
constexpr size_t kLineCount = std::size(kText); |
| 381 |
constexpr int kLoopCount = 200; |
| 382 |
SkFont font = ToolUtils::DefaultFont(); |
| 383 |
SkPaint paint; |
| 384 |
for (int loop = 0; loop < kLoopCount; ++loop) { |
| 385 |
for (size_t line = 0; line < kLineCount; ++line) { |
| 386 |
y += font.getSpacing(); |
| 387 |
if (!canvas || y > 792 - 36) { |
| 388 |
y = 36 + font.getSpacing(); |
| 389 |
canvas = doc->beginPage(612, 792); |
| 390 |
background.notifyPixelsChanged(); |
| 391 |
canvas->drawBitmap(background, 0, 0); |
| 392 |
} |
| 393 |
canvas->drawString(kText[line], x, y, font, paint); |
| 394 |
} |
| 395 |
} |
| 396 |
} |
| 397 |
|
| 398 |
SkBitmap make_background() { |
| 399 |
SkBitmap background; |
| 400 |
SkBitmap bitmap; |
| 401 |
bitmap.allocN32Pixels(32, 32); |
| 402 |
bitmap.eraseColor(SK_ColorWHITE); |
| 403 |
SkCanvas tmp(bitmap); |
| 404 |
SkPaint gray; |
| 405 |
gray.setColor(SkColorSetARGB(0xFF, 0xEE, 0xEE, 0xEE)); |
| 406 |
tmp.drawRect({0,0,16,16}, gray); |
| 407 |
tmp.drawRect({16,16,32,32}, gray); |
| 408 |
SkPaint shader; |
| 409 |
shader.setShader( |
| 410 |
SkShader::MakeBitmapShader( |
| 411 |
bitmap, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode)); |
| 412 |
background.allocN32Pixels(612, 792); |
| 413 |
SkCanvas tmp2(background); |
| 414 |
tmp2.drawPaint(shader); |
| 415 |
return background; |
| 416 |
} |
| 417 |
|
| 418 |
struct PDFBigDocBench : public Benchmark { |
| 419 |
bool fFast; |
| 420 |
SkBitmap fBackground; |
| 421 |
std::unique_ptr<SkExecutor> fExecutor; |
| 422 |
PDFBigDocBench(bool fast) : fFast(fast) {} |
| 423 |
void onDelayedSetup() override { |
| 424 |
fBackground = make_background(); |
| 425 |
fExecutor = fFast ? SkExecutor::MakeFIFOThreadPool() : nullptr; |
| 426 |
} |
| 427 |
const char* onGetName() override { |
| 428 |
static const char kNameFast[] = "PDFBigDocBench_fast"; |
| 429 |
static const char kNameSlow[] = "PDFBigDocBench_slow"; |
| 430 |
return fFast ? kNameFast : kNameSlow; |
| 431 |
} |
| 432 |
bool isSuitableFor(Backend backend) override { return backend == Backend::kNonRendering; } |
| 433 |
void onDraw(int loops, SkCanvas*) override { |
| 434 |
while (loops-- > 0) { |
| 435 |
#ifdef SK_PDF_TEST_BIGDOCBENCH_OUTPUT |
| 436 |
SkFILEWStream wStream("/tmp/big_pdf.pdf"); |
| 437 |
#else |
| 438 |
SkNullWStream wStream; |
| 439 |
#endif |
| 440 |
SkPDF::Metadata metadata; |
| 441 |
metadata.fExecutor = fExecutor.get(); |
| 442 |
metadata.jpegDecoder = SkPDF::JPEG::Decode; |
| 443 |
metadata.jpegEncoder = SkPDF::JPEG::Encode; |
| 444 |
auto doc = SkPDF::MakeDocument(&wStream, metadata); |
| 445 |
big_pdf_test(doc.get(), fBackground); |
| 446 |
} |
| 447 |
} |
| 448 |
}; |
| 449 |
} // namespace |
| 450 |
DEF_BENCH(return new PDFBigDocBench(false);) |
| 451 |
DEF_BENCH(return new PDFBigDocBench(true);) |
| 452 |
#endif |
| 453 |
|
| 454 |
#endif // SK_SUPPORT_PDF |