summaryrefslogtreecommitdiffstats
path: root/printing/printed_document_win.cc
diff options
context:
space:
mode:
authorpkasting <pkasting@chromium.org>2014-10-09 14:30:00 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-09 21:30:15 +0000
commit46a6291e7b4e7c7367daf4e5fb1a33537f776813 (patch)
tree308d85c00a1076c0c12fcf8d306630ef39e47929 /printing/printed_document_win.cc
parent7cc29ce343a235f9067545ddd19ba2d982c4595f (diff)
downloadchromium_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 'printing/printed_document_win.cc')
-rw-r--r--printing/printed_document_win.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/printing/printed_document_win.cc b/printing/printed_document_win.cc
index 5da1151..3c6b715 100644
--- a/printing/printed_document_win.cc
+++ b/printing/printed_document_win.cc
@@ -16,11 +16,11 @@ namespace {
void SimpleModifyWorldTransform(HDC context,
int offset_x,
int offset_y,
- double shrink_factor) {
+ float shrink_factor) {
XFORM xform = { 0 };
xform.eDx = static_cast<float>(offset_x);
xform.eDy = static_cast<float>(offset_y);
- xform.eM11 = xform.eM22 = static_cast<float>(1. / shrink_factor);
+ xform.eM11 = xform.eM22 = 1.f / shrink_factor;
BOOL res = ModifyWorldTransform(context, &xform, MWT_LEFTMULTIPLY);
DCHECK_NE(res, 0);
}