diff options
author | pkasting <pkasting@chromium.org> | 2014-10-09 14:30:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-09 21:30:15 +0000 |
commit | 46a6291e7b4e7c7367daf4e5fb1a33537f776813 (patch) | |
tree | 308d85c00a1076c0c12fcf8d306630ef39e47929 /chrome/service/cloud_print | |
parent | 7cc29ce343a235f9067545ddd19ba2d982c4595f (diff) | |
download | chromium_src-46a6291e7b4e7c7367daf4e5fb1a33537f776813.zip chromium_src-46a6291e7b4e7c7367daf4e5fb1a33537f776813.tar.gz chromium_src-46a6291e7b4e7c7367daf4e5fb1a33537f776813.tar.bz2 |
Change PDF scaling factor from double to float.
This ultimate consumers of this want a float anyway, so changing to be a float
all the way through is less misleading. This also avoids some "value possibly
truncated" warnings (currently disabled) on MSVC.
This also removes a couple of scale-related functions in metafile_skia_wrapper.*
that seem to be entirely unused.
BUG=none
TEST=none
Review URL: https://codereview.chromium.org/641923002
Cr-Commit-Position: refs/heads/master@{#298980}
Diffstat (limited to 'chrome/service/cloud_print')
-rw-r--r-- | chrome/service/cloud_print/print_system_win.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc index ca2045d7..4f9ea50 100644 --- a/chrome/service/cloud_print/print_system_win.cc +++ b/chrome/service/cloud_print/print_system_win.cc @@ -321,7 +321,7 @@ class JobSpoolerWin : public PrintSystem::JobSpooler { return true; } - void PreparePageDCForPrinting(HDC, double scale_factor) { + void PreparePageDCForPrinting(HDC, float scale_factor) { SetGraphicsMode(printer_dc_.Get(), GM_ADVANCED); // Setup the matrix to translate and scale to the right place. Take in // account the scale factor. @@ -332,13 +332,13 @@ class JobSpoolerWin : public PrintSystem::JobSpooler { XFORM xform = {0}; xform.eDx = static_cast<float>(-offset_x); xform.eDy = static_cast<float>(-offset_y); - xform.eM11 = xform.eM22 = 1.0 / scale_factor; + xform.eM11 = xform.eM22 = 1.0f / scale_factor; SetWorldTransform(printer_dc_.Get(), &xform); } // ServiceUtilityProcessHost::Client implementation. virtual void OnRenderPDFPagesToMetafilePageDone( - double scale_factor, + float scale_factor, const printing::MetafilePlayer& emf) override { PreparePageDCForPrinting(printer_dc_.Get(), scale_factor); ::StartPage(printer_dc_.Get()); |