summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-08-15 13:56:43 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-08-15 21:33:32 +0000
commiteb14e04c79c575146fe96c025dbf56b7440870c7 (patch)
tree323ca30b3b5b2df46427e336c3482901ca26db8f /core
parent6e524ad89eac22f0e5d5475652ec78c609b788e8 (diff)
downloadpdfium-eb14e04c79c575146fe96c025dbf56b7440870c7.tar.xz
Change a bunch of methods to take a const CFX_Matrix& param.chromium/3187
Simplify some code along the way. Change-Id: I0022c8a82188192c63b9ac0bc87e9b9dbf983040 Reviewed-on: https://pdfium-review.googlesource.com/10852 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fxge/cfx_renderdevice.cpp14
-rw-r--r--core/fxge/cfx_renderdevice.h14
2 files changed, 14 insertions, 14 deletions
diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp
index cb0e600916..a7b1a93643 100644
--- a/core/fxge/cfx_renderdevice.cpp
+++ b/core/fxge/cfx_renderdevice.cpp
@@ -1125,7 +1125,7 @@ bool CFX_RenderDevice::DrawTextPath(int nChars,
return true;
}
-void CFX_RenderDevice::DrawFillRect(CFX_Matrix* pUser2Device,
+void CFX_RenderDevice::DrawFillRect(const CFX_Matrix* pUser2Device,
const CFX_FloatRect& rect,
const FX_COLORREF& color) {
CFX_PathData path;
@@ -1134,7 +1134,7 @@ void CFX_RenderDevice::DrawFillRect(CFX_Matrix* pUser2Device,
DrawPath(&path, pUser2Device, nullptr, color, 0, FXFILL_WINDING);
}
-void CFX_RenderDevice::DrawFillArea(CFX_Matrix* pUser2Device,
+void CFX_RenderDevice::DrawFillArea(const CFX_Matrix* pUser2Device,
const CFX_PointF* pPts,
int32_t nCount,
const FX_COLORREF& color) {
@@ -1146,7 +1146,7 @@ void CFX_RenderDevice::DrawFillArea(CFX_Matrix* pUser2Device,
DrawPath(&path, pUser2Device, nullptr, color, 0, FXFILL_ALTERNATE);
}
-void CFX_RenderDevice::DrawStrokeRect(CFX_Matrix* pUser2Device,
+void CFX_RenderDevice::DrawStrokeRect(const CFX_Matrix* pUser2Device,
const CFX_FloatRect& rect,
const FX_COLORREF& color,
float fWidth) {
@@ -1160,7 +1160,7 @@ void CFX_RenderDevice::DrawStrokeRect(CFX_Matrix* pUser2Device,
DrawPath(&path, pUser2Device, &gsd, 0, color, FXFILL_ALTERNATE);
}
-void CFX_RenderDevice::DrawStrokeLine(CFX_Matrix* pUser2Device,
+void CFX_RenderDevice::DrawStrokeLine(const CFX_Matrix* pUser2Device,
const CFX_PointF& ptMoveTo,
const CFX_PointF& ptLineTo,
const FX_COLORREF& color,
@@ -1175,14 +1175,14 @@ void CFX_RenderDevice::DrawStrokeLine(CFX_Matrix* pUser2Device,
DrawPath(&path, pUser2Device, &gsd, 0, color, FXFILL_ALTERNATE);
}
-void CFX_RenderDevice::DrawFillRect(CFX_Matrix* pUser2Device,
+void CFX_RenderDevice::DrawFillRect(const CFX_Matrix* pUser2Device,
const CFX_FloatRect& rect,
const CFX_Color& color,
int32_t nTransparency) {
DrawFillRect(pUser2Device, rect, color.ToFXColor(nTransparency));
}
-void CFX_RenderDevice::DrawShadow(CFX_Matrix* pUser2Device,
+void CFX_RenderDevice::DrawShadow(const CFX_Matrix* pUser2Device,
bool bVertical,
bool bHorizontal,
CFX_FloatRect rect,
@@ -1214,7 +1214,7 @@ void CFX_RenderDevice::DrawShadow(CFX_Matrix* pUser2Device,
}
}
-void CFX_RenderDevice::DrawBorder(CFX_Matrix* pUser2Device,
+void CFX_RenderDevice::DrawBorder(const CFX_Matrix* pUser2Device,
const CFX_FloatRect& rect,
float fWidth,
const CFX_Color& color,
diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h
index 1a69c42b14..53443ab72f 100644
--- a/core/fxge/cfx_renderdevice.h
+++ b/core/fxge/cfx_renderdevice.h
@@ -229,23 +229,23 @@ class CFX_RenderDevice {
CFX_PathData* pClippingPath,
int nFlag);
- void DrawFillRect(CFX_Matrix* pUser2Device,
+ void DrawFillRect(const CFX_Matrix* pUser2Device,
const CFX_FloatRect& rect,
const CFX_Color& color,
int32_t nTransparency);
- void DrawFillRect(CFX_Matrix* pUser2Device,
+ void DrawFillRect(const CFX_Matrix* pUser2Device,
const CFX_FloatRect& rect,
const FX_COLORREF& color);
- void DrawStrokeRect(CFX_Matrix* pUser2Device,
+ void DrawStrokeRect(const CFX_Matrix* pUser2Device,
const CFX_FloatRect& rect,
const FX_COLORREF& color,
float fWidth);
- void DrawStrokeLine(CFX_Matrix* pUser2Device,
+ void DrawStrokeLine(const CFX_Matrix* pUser2Device,
const CFX_PointF& ptMoveTo,
const CFX_PointF& ptLineTo,
const FX_COLORREF& color,
float fWidth);
- void DrawBorder(CFX_Matrix* pUser2Device,
+ void DrawBorder(const CFX_Matrix* pUser2Device,
const CFX_FloatRect& rect,
float fWidth,
const CFX_Color& color,
@@ -253,11 +253,11 @@ class CFX_RenderDevice {
const CFX_Color& crRightBottom,
BorderStyle nStyle,
int32_t nTransparency);
- void DrawFillArea(CFX_Matrix* pUser2Device,
+ void DrawFillArea(const CFX_Matrix* pUser2Device,
const CFX_PointF* pPts,
int32_t nCount,
const FX_COLORREF& color);
- void DrawShadow(CFX_Matrix* pUser2Device,
+ void DrawShadow(const CFX_Matrix* pUser2Device,
bool bVertical,
bool bHorizontal,
CFX_FloatRect rect,