Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2585)

Unified Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 2527833002: Implement SkEncodeImage() (Closed)
Patch Set: 2016-11-28 (Monday) 17:33:22 EST Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | skia/BUILD.gn » ('j') | skia/BUILD.gn » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | skia/BUILD.gn » ('j') | skia/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698