Remove MacRenderPageParams
Most of the five fields were unused and untested. Replace passing of
the entire struct with two boolean parameters, |autorotate| and
|fit_to_page|. |fit_to_page| is a consolidation of
|MacRenderPageParams::shrink_to_fit| and
|MacRenderPageParams::stretch_to_fit|, as the latter was unused. This
CL does not alter any existing rendering behavior.
Bug: 919596
Change-Id: Ia8e04db40033015d2df05235c04bd1af3869466f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2140831
Commit-Queue: Daniel Hosseinian <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#757316}
diff --git a/printing/metafile_skia.cc b/printing/metafile_skia.cc
index 7baa981..67d7be5 100644
--- a/printing/metafile_skia.cc
+++ b/printing/metafile_skia.cc
@@ -280,7 +280,8 @@
bool MetafileSkia::RenderPage(unsigned int page_number,
CGContextRef context,
const CGRect& rect,
- const MacRenderPageParams& params) const {
+ bool autorotate,
+ bool fit_to_page) const {
DCHECK_GT(GetDataSize(), 0U);
if (data_->pdf_cg.GetDataSize() == 0) {
if (GetDataSize() == 0)
@@ -290,7 +291,8 @@
(void)WriteAssetToBuffer(data_->data_stream.get(), &buffer[0], length);
data_->pdf_cg.InitFromData(buffer);
}
- return data_->pdf_cg.RenderPage(page_number, context, rect, params);
+ return data_->pdf_cg.RenderPage(page_number, context, rect, autorotate,
+ fit_to_page);
}
#endif