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

Unified Diff: printing/image_mac.cc

Issue 2839323002: Revert of printing::Metafile: Simplify OS_MACOSX-specific code path (Closed)
Patch Set: Created 3 years, 8 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 | printing/metafile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/image_mac.cc
diff --git a/printing/image_mac.cc b/printing/image_mac.cc
index 7edcfd7f0a07d9dbb464a90b2e8c890c6b7fcf03..423b1fcb5768e995f373c5748733ee37cf832a33 100644
--- a/printing/image_mac.cc
+++ b/printing/image_mac.cc
@@ -5,13 +5,11 @@
#include "printing/image.h"
#include <ApplicationServices/ApplicationServices.h>
-#include <CoreFoundation/CoreFoundation.h>
#include <stddef.h>
#include <stdint.h>
#include "base/mac/scoped_cftyperef.h"
#include "printing/metafile.h"
-#include "printing/pdf_metafile_cg_mac.h"
#include "ui/gfx/geometry/rect.h"
namespace printing {
@@ -41,13 +39,12 @@
kCGImageAlphaPremultipliedLast));
DCHECK(bitmap_context.get());
- PdfMetafileCg::RenderPageParams params;
+ struct Metafile::MacRenderPageParams params;
params.shrink_to_fit = true;
- CGRect cg_rect = CGRectMake(0, 0, size_.width(), size_.height());
- std::vector<char> buffer;
- return metafile.GetDataAsVector(&buffer) &&
- PdfMetafileCg::RenderPage(buffer, page_number, bitmap_context, cg_rect,
- params);
+ metafile.RenderPage(page_number, bitmap_context,
+ CGRectMake(0, 0, size_.width(), size_.height()), params);
+
+ return true;
}
} // namespace printing
« no previous file with comments | « no previous file | printing/metafile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698