summaryrefslogtreecommitdiff
path: root/third_party/agg23/agg_rasterizer_scanline_aa.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-23 14:36:20 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-23 14:36:20 -0800
commit4022f87eb8716155291543efaaf289e51d7cbf43 (patch)
tree28e2a3b99367932ee84a92b1f6c913245e62afb1 /third_party/agg23/agg_rasterizer_scanline_aa.cpp
parentb76f49b36baffea2b2ecb90d67c7b6bb734e7bb9 (diff)
downloadpdfium-4022f87eb8716155291543efaaf289e51d7cbf43.tar.xz
Update safe numerics package to get bitwise ops
Fix callers conventions to avoid ambiguity. Fix bad bounds check unmasked by change. Directly include headers no longer pulled in by numerics itself. Review-Url: https://codereview.chromium.org/2640143003
Diffstat (limited to 'third_party/agg23/agg_rasterizer_scanline_aa.cpp')
-rw-r--r--third_party/agg23/agg_rasterizer_scanline_aa.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/third_party/agg23/agg_rasterizer_scanline_aa.cpp b/third_party/agg23/agg_rasterizer_scanline_aa.cpp
index c6b3f013a0..af6dd58fe3 100644
--- a/third_party/agg23/agg_rasterizer_scanline_aa.cpp
+++ b/third_party/agg23/agg_rasterizer_scanline_aa.cpp
@@ -283,8 +283,8 @@ void outline_aa::render_line(int x1, int y1, int x2, int y2)
incr = -1;
dy = -dy;
}
- delta = safeP.ValueOrDie() / dy;
- mod = safeP.ValueOrDie() % dy;
+ delta = (safeP / dy).ValueOrDie();
+ mod = (safeP % dy).ValueOrDie();
if(mod < 0) {
delta--;
mod += dy;
@@ -298,8 +298,8 @@ void outline_aa::render_line(int x1, int y1, int x2, int y2)
safeP *= dx;
if (!safeP.IsValid())
return;
- lift = safeP.ValueOrDie() / dy;
- rem = safeP.ValueOrDie() % dy;
+ lift = (safeP / dy).ValueOrDie();
+ rem = (safeP % dy).ValueOrDie();
if (rem < 0) {
lift--;
rem += dy;