From 0b7378afe3dee6db6cff8ee834e758d3a76efa3b Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 17 Jul 2017 12:05:40 -0400 Subject: 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 Reviewed-by: Tom Sepez --- fpdfsdk/pdfwindow/cpwl_wnd.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'fpdfsdk/pdfwindow/cpwl_wnd.cpp') 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 #include +#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(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(GetBorderWidth()), GetBorderColor(), + GetBorderLeftTopColor(GetBorderStyle()), + GetBorderRightBottomColor(GetBorderStyle()), + GetBorderStyle(), GetTransparency()); } } -- cgit v1.2.3