summaryrefslogtreecommitdiff
path: root/core/src/fxge/win32
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-02-23 16:04:59 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-02-23 16:04:59 -0500
commitaffe4b09575b297747e66bd0b807d2b1b04822fe (patch)
tree249ef3593f4e4187454d70da14f0f0624a932039 /core/src/fxge/win32
parentc145aeb2bf13ac408fc3e8233acca43d4251bbdc (diff)
downloadpdfium-affe4b09575b297747e66bd0b807d2b1b04822fe.tar.xz
Remove FXSYS_Div.
This is just a wrapper for (a) / (b). Inline the divide. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1727793002 .
Diffstat (limited to 'core/src/fxge/win32')
-rw-r--r--core/src/fxge/win32/fx_win32_gdipext.cpp5
-rw-r--r--core/src/fxge/win32/fx_win32_print.cpp3
2 files changed, 3 insertions, 5 deletions
diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp
index ce280948d7..e71d94d310 100644
--- a/core/src/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/src/fxge/win32/fx_win32_gdipext.cpp
@@ -973,9 +973,8 @@ static GpPen* _GdipCreatePen(const CFX_GraphStateData* pGraphState,
FX_FLOAT width = pGraphState ? pGraphState->m_LineWidth : 1.0f;
if (!bTextMode) {
FX_FLOAT unit =
- pMatrix
- ? FXSYS_Div(1.0f, (pMatrix->GetXUnit() + pMatrix->GetYUnit()) / 2)
- : 1.0f;
+ pMatrix ? 1.0f / ((pMatrix->GetXUnit() + pMatrix->GetYUnit()) / 2)
+ : 1.0f;
if (width < unit) {
width = unit;
}
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp
index 4816c03e2c..6c262d83dc 100644
--- a/core/src/fxge/win32/fx_win32_print.cpp
+++ b/core/src/fxge/win32/fx_win32_print.cpp
@@ -149,8 +149,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc,
uint8_t* src_buf = pSrcBitmap->GetBuffer();
FX_DWORD src_pitch = pSrcBitmap->GetPitch();
FX_FLOAT dest_area = pDestMatrix->GetUnitArea();
- FX_FLOAT area_scale =
- FXSYS_Div((FX_FLOAT)(src_width * src_height), dest_area);
+ FX_FLOAT area_scale = ((FX_FLOAT)(src_width * src_height)) / dest_area;
FX_FLOAT size_scale = FXSYS_sqrt(area_scale);
CFX_Matrix adjusted_matrix(*pDestMatrix);
adjusted_matrix.Scale(size_scale, size_scale);