Index: content/renderer/gpu/gpu_benchmarking_extension.cc |
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc |
index b4aadc1821371c8c2cb537cb04af6c68f50f3049..e0739877cc169741e1d6714df2a4ace722b35b62 100644 |
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc |
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc |
@@ -51,6 +51,7 @@ |
// Note that headers in third_party/skia/src are fragile. This is |
// an experimental, fragile, and diagnostic-only document type. |
#include "third_party/skia/src/utils/SkMultiPictureDocument.h" |
+#include "ui/gfx/codec/install_skia_codec.h" |
#include "ui/gfx/codec/png_codec.h" |
#include "v8/include/v8.h" |
@@ -594,8 +595,10 @@ void GpuBenchmarking::PrintPagesToSkPictures(v8::Isolate* isolate, |
void GpuBenchmarking::PrintPagesToXPS(v8::Isolate* isolate, |
const std::string& filename) { |
- PrintDocumentTofile(isolate, filename, |
- [](SkWStream* s) { return SkDocument::MakeXPS(s); }); |
+ // SkXPS requires an image encoder be set up. |
+ gfx::InstallCodecsIntoSkia(); |
+ PrintDocumentTofile(isolate, filename, |
+ [](SkWStream* s) { return SkDocument::MakeXPS(s); }); |
} |
void GpuBenchmarking::PrintToSkPicture(v8::Isolate* isolate, |