diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-07-17 12:05:40 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-17 16:22:56 +0000 |
commit | 0b7378afe3dee6db6cff8ee834e758d3a76efa3b (patch) | |
tree | 04ad09e12a5cbd33005194b3bf031c1d690e8ba8 /fpdfsdk/pdfwindow/cpwl_wnd.cpp | |
parent | d6aff2f2e8469344becd6f73e443c31bca9baac0 (diff) | |
download | pdfium-0b7378afe3dee6db6cff8ee834e758d3a76efa3b.tar.xz |
Move CPWL_Utils Draw methods to CFX_RenderDevice
This CL removes the drawing code from the AP stream generation code in
CPWL_Utils and places it in CFX_RenderDevice.
Change-Id: I5335fc38368740ba3ddc676ee856201a358979fc
Reviewed-on: https://pdfium-review.googlesource.com/7715
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_wnd.cpp')
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_wnd.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.cpp b/fpdfsdk/pdfwindow/cpwl_wnd.cpp index 863b9aab9a..d3ff2a5743 100644 --- a/fpdfsdk/pdfwindow/cpwl_wnd.cpp +++ b/fpdfsdk/pdfwindow/cpwl_wnd.cpp @@ -10,6 +10,7 @@ #include <sstream> #include <vector> +#include "core/fxge/cfx_renderdevice.h" #include "fpdfsdk/pdfwindow/cpwl_scroll_bar.h" #include "fpdfsdk/pdfwindow/cpwl_utils.h" #include "third_party/base/ptr_util.h" @@ -293,17 +294,16 @@ void CPWL_Wnd::DrawThisAppearance(CFX_RenderDevice* pDevice, if (HasFlag(PWS_BACKGROUND)) { float width = static_cast<float>(GetBorderWidth() + GetInnerBorderWidth()); - CPWL_Utils::DrawFillRect(pDevice, pUser2Device, - rectWnd.GetDeflated(width, width), - GetBackgroundColor(), GetTransparency()); + pDevice->DrawFillRect(pUser2Device, rectWnd.GetDeflated(width, width), + GetBackgroundColor(), GetTransparency()); } if (HasFlag(PWS_BORDER)) { - CPWL_Utils::DrawBorder(pDevice, pUser2Device, rectWnd, - (float)GetBorderWidth(), GetBorderColor(), - GetBorderLeftTopColor(GetBorderStyle()), - GetBorderRightBottomColor(GetBorderStyle()), - GetBorderStyle(), GetTransparency()); + pDevice->DrawBorder(pUser2Device, rectWnd, + static_cast<float>(GetBorderWidth()), GetBorderColor(), + GetBorderLeftTopColor(GetBorderStyle()), + GetBorderRightBottomColor(GetBorderStyle()), + GetBorderStyle(), GetTransparency()); } } |