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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 6733036: Make PluginInstance::PrintPDFOutput-metafile implementation agnostic on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 months 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
« printing/printing.gyp ('K') | « printing/printing.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 075630863a30d837bc124f06ff51c78a19b2d717..d6a1da05ad2c6cb996ae5e893fce7dab52190d32 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -69,7 +69,7 @@
#endif
#if defined(OS_LINUX)
-#include "printing/pdf_ps_metafile_cairo.h"
+#include "printing/native_metafile_skia_wrapper.h"
#endif
#if defined(OS_WIN)
@@ -1180,15 +1180,12 @@ bool PluginInstance::PrintPDFOutput(PP_Resource print_output,
bool ret = false;
#if defined(OS_LINUX)
- // On Linux we need to get the backing PdfPsMetafile and write the bits
- // directly.
- cairo_t* context = canvas->beginPlatformPaint();
+ // On Linux we just set the final bits in the native metafile.
printing::NativeMetafile* metafile =
- printing::PdfPsMetafile::FromCairoContext(context);
- DCHECK(metafile);
+ printing::NativeMetafileSkiaWrapper::GetMetafileFromCanvas(canvas);
+ DCHECK(metafile != NULL);
if (metafile)
ret = metafile->InitFromData(buffer->mapped_buffer(), buffer->size());
- canvas->endPlatformPaint();
#elif defined(OS_MACOSX)
scoped_ptr<printing::NativeMetafile> metafile(
printing::NativeMetafileFactory::Create());
« printing/printing.gyp ('K') | « printing/printing.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698