summaryrefslogtreecommitdiff
path: root/core/fxge/agg/fx_agg_driver.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-04-10 17:55:46 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-10 17:55:46 +0000
commit85ba2610cf05a75b52681f381bba2da3ba37b984 (patch)
treedcf1553a49ca032eaadab986fdc12f1fcf893b59 /core/fxge/agg/fx_agg_driver.cpp
parent537115b5a3ceccfe8ce2ca79577b61c5ec31c432 (diff)
downloadpdfium-85ba2610cf05a75b52681f381bba2da3ba37b984.tar.xz
Change FillRectWithBlend methods to take FX_RECT by const-ref.
They currently take const FX_RECT*, but the pointer is never nullptr. Also add a comment to explain why FX_RECT is the way it is. It has the same layout as a win32 RECT. Change-Id: Icf0e4c3eb25fe03317590a736578e053b9dccf7a Reviewed-on: https://pdfium-review.googlesource.com/30051 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxge/agg/fx_agg_driver.cpp')
-rw-r--r--core/fxge/agg/fx_agg_driver.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp
index 9d8d8fa0a1..ab6ee49c7e 100644
--- a/core/fxge/agg/fx_agg_driver.cpp
+++ b/core/fxge/agg/fx_agg_driver.cpp
@@ -1407,7 +1407,7 @@ bool CFX_AggDeviceDriver::SetPixel(int x, int y, uint32_t color) {
return DibSetPixel(m_pBitmap, x, y, color);
}
-bool CFX_AggDeviceDriver::FillRectWithBlend(const FX_RECT* pRect,
+bool CFX_AggDeviceDriver::FillRectWithBlend(const FX_RECT& rect,
uint32_t fill_color,
int blend_type) {
if (blend_type != FXDIB_BLEND_NORMAL)
@@ -1419,8 +1419,7 @@ bool CFX_AggDeviceDriver::FillRectWithBlend(const FX_RECT* pRect,
FX_RECT clip_rect;
GetClipBox(&clip_rect);
FX_RECT draw_rect = clip_rect;
- if (pRect)
- draw_rect.Intersect(*pRect);
+ draw_rect.Intersect(rect);
if (draw_rect.IsEmpty())
return true;