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

Unified Diff: printing/pdf_metafile_cg_mac.h

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 | « printing/metafile.h ('k') | printing/pdf_metafile_cg_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/pdf_metafile_cg_mac.h
diff --git a/printing/pdf_metafile_cg_mac.h b/printing/pdf_metafile_cg_mac.h
index 8992a8c668336072139b64523751011ecfa042c0..f68ac4fa3a065839df71960b96dd16c9008289f1 100644
--- a/printing/pdf_metafile_cg_mac.h
+++ b/printing/pdf_metafile_cg_mac.h
@@ -45,38 +45,10 @@
// the data returned from GetData will not be valid PDF data.
CGContextRef context() const override;
- // |shrink_to_fit| specifies whether the output should be shrunk to fit a
- // destination page if the source PDF is bigger than the destination page in
- // any dimension. If this is false, parts of the source PDF page that lie
- // outside the bounds will be clipped.
- //
- // |stretch_to_fit| specifies whether the output should be stretched to fit
- // the destination page if the source page size is smaller in all dimensions.
- //
- // |center_horizontally| specifies whether the output (after any scaling is
- // done) should be centered horizontally within the destination page.
- //
- // |center_vertically| specifies whether the output (after any scaling is
- // done) should be centered vertically within the destination page.
- // Note that all scaling preserves the original aspect ratio of the page.
- //
- // |autorotate| specifies whether the source PDF should be autorotated to fit
- // on the destination page.
- struct RenderPageParams {
- bool shrink_to_fit = false;
- bool stretch_to_fit = false;
- bool center_horizontally = false;
- bool center_vertically = false;
- bool autorotate = false;
- };
- // Renders the given page from |src_buffer| into |rect| in the given context.
- // Pages use a 1-based index. The rendering uses the arguments in
- // |params| to determine scaling, translation, and rotation.
- static bool RenderPage(const std::vector<char>& src_buffer,
- unsigned int page_number,
- CGContextRef context,
- const CGRect rect,
- const RenderPageParams& params);
+ bool RenderPage(unsigned int page_number,
+ skia::NativeDrawingContext context,
+ const CGRect rect,
+ const MacRenderPageParams& params) const override;
private:
// Returns a CGPDFDocumentRef version of |pdf_data_|.
« no previous file with comments | « printing/metafile.h ('k') | printing/pdf_metafile_cg_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698