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>
diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.cpp b/fpdfsdk/pdfwindow/cpwl_wnd.cpp
index 863b9aa..d3ff2a5 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 @@
 
   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());
   }
 }