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

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

Issue 7200040: Pass through PDFs from the plugin when using Skia on the Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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
« no previous file with comments | « no previous file | 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 9809fdf71978968d89bc5cf8bcd0059e0bf196f7..986d72445455577d027b66c4362b7dd46106002e 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -1062,7 +1062,7 @@ bool PluginInstance::PrintPDFOutput(PP_Resource print_output,
#endif // defined(OS_WIN)
bool ret = false;
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || (defined(OS_MACOSX) && defined(USE_SKIA))
// On Linux we just set the final bits in the native metafile
// (NativeMetafile and PreviewMetafile must have compatible formats,
// i.e. both PDF for this to work).
@@ -1075,13 +1075,8 @@ bool PluginInstance::PrintPDFOutput(PP_Resource print_output,
printing::NativeMetafile metafile;
// Create a PDF metafile and render from there into the passed in context.
if (metafile.InitFromData(mapper.data(), mapper.size())) {
- // Flip the transform.
-#if defined(USE_SKIA)
- gfx::SkiaBitLocker bit_locker(canvas);
- CGContextRef cgContext = bit_locker.cgContext();
-#else
+ // Flip the transform.
CGContextRef cgContext = canvas;
-#endif
CGContextSaveGState(cgContext);
CGContextTranslateCTM(cgContext, 0,
current_print_settings_.printable_area.size.height);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698