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

Unified Diff: chrome/service/cloud_print/print_system_win.cc

Issue 641923002: Change PDF scaling factor from double to float. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 years, 2 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 | « chrome/common/chrome_utility_printing_messages.h ('k') | chrome/service/service_utility_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/print_system_win.cc
diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc
index ca2045d75cb6fc38e4a2c1957cc733f2928c68fb..4f9ea5048efbeb6a8282c19753b33ff705ce51e1 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());
« no previous file with comments | « chrome/common/chrome_utility_printing_messages.h ('k') | chrome/service/service_utility_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698