summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_comboboxtp.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-08-16 15:09:00 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-08-16 22:54:39 +0000
commit574015e0ad53c592fe8a923390b31edeb30c41fe (patch)
treea3774207ebb4c1fc5b5abfb90a32adf974f76a10 /xfa/fwl/theme/cfwl_comboboxtp.cpp
parenta364729be3725adbc9689c1c8c23902df102243b (diff)
downloadpdfium-574015e0ad53c592fe8a923390b31edeb30c41fe.tar.xz
Tidy CXFA_Color class and argument passing.
Remove friendship. De-virtualize. Nest enum inside class. Make copy-assignable and pass by const ref. Make pack better on 64-bits. Change-Id: I1ae3b6d03756fa5780e9023795db6648e8b8299a Reviewed-on: https://pdfium-review.googlesource.com/11290 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fwl/theme/cfwl_comboboxtp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_comboboxtp.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/xfa/fwl/theme/cfwl_comboboxtp.cpp b/xfa/fwl/theme/cfwl_comboboxtp.cpp
index d8852ffe52..86888c0487 100644
--- a/xfa/fwl/theme/cfwl_comboboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_comboboxtp.cpp
@@ -42,8 +42,7 @@ void CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
argb_color = 0xFFFFFFFF;
}
pParams->m_pGraphics->SaveGraphState();
- CXFA_Color cr(argb_color);
- pParams->m_pGraphics->SetFillColor(&cr);
+ pParams->m_pGraphics->SetFillColor(CXFA_Color(argb_color));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams->m_matrix);
pParams->m_pGraphics->RestoreGraphState();
break;
@@ -67,8 +66,7 @@ void CFWL_ComboBoxTP::DrawStrethHandler(CFWL_ThemeBackground* pParams,
CXFA_Path path;
path.AddRectangle(pParams->m_rtPart.left, pParams->m_rtPart.top,
pParams->m_rtPart.width - 1, pParams->m_rtPart.height);
- CXFA_Color cr(ArgbEncode(0xff, 0xff, 0, 0));
- pParams->m_pGraphics->SetFillColor(&cr);
+ pParams->m_pGraphics->SetFillColor(CXFA_Color(ArgbEncode(0xff, 0xff, 0, 0)));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams->m_matrix);
}