Move scalar vectors to data partition in fxge/win32

Change-Id: I998de7d0b12b3b14a5b5c8594d4e7e419f2999a7
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68850
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxge/win32/fx_win32_dib.cpp b/core/fxge/win32/fx_win32_dib.cpp
index 5f9d42c..7b349e1 100644
--- a/core/fxge/win32/fx_win32_dib.cpp
+++ b/core/fxge/win32/fx_win32_dib.cpp
@@ -6,6 +6,7 @@
 
 #include <windows.h>
 
+#include "core/fxcrt/fx_memory_wrappers.h"
 #include "core/fxcrt/fx_system.h"
 #include "core/fxge/cfx_gemodule.h"
 #include "core/fxge/win32/cfx_windowsdib.h"
@@ -76,7 +77,7 @@
 
   memcpy(pBitmap->GetBuffer(), pData, pitch * height);
   if (bBottomUp) {
-    std::vector<uint8_t> temp_buf(pitch);
+    std::vector<uint8_t, FxAllocAllocator<uint8_t>> temp_buf(pitch);
     int top = 0;
     int bottom = height - 1;
     while (top < bottom) {
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp
index 9ae092a..dfa75a9 100644
--- a/core/fxge/win32/fx_win32_print.cpp
+++ b/core/fxge/win32/fx_win32_print.cpp
@@ -10,6 +10,7 @@
 #include <memory>
 #include <vector>
 
+#include "core/fxcrt/fx_memory_wrappers.h"
 #include "core/fxcrt/fx_system.h"
 #include "core/fxge/cfx_font.h"
 #include "core/fxge/cfx_windowsrenderdevice.h"
@@ -259,7 +260,7 @@
       return false;
   }
 
-  std::vector<BYTE> buf(nTextMetricSize);
+  std::vector<BYTE, FxAllocAllocator<BYTE>> buf(nTextMetricSize);
   OUTLINETEXTMETRIC* pTextMetric =
       reinterpret_cast<OUTLINETEXTMETRIC*>(buf.data());
   if (GetOutlineTextMetrics(m_hDC, nTextMetricSize, pTextMetric) == 0)
@@ -290,7 +291,7 @@
 
   // Text
   WideString wsText;
-  std::vector<INT> spacing(nChars);
+  std::vector<INT, FxAllocAllocator<INT>> spacing(nChars);
   float fPreviousOriginX = 0;
   for (int i = 0; i < nChars; ++i) {
     // Only works with PDFs from Skia's PDF generator. Cannot handle arbitrary
@@ -364,7 +365,7 @@
   if (::GetClipRgn(m_hDC, hRgn) == 1) {
     DWORD dwCount = ::GetRegionData(hRgn, 0, nullptr);
     if (dwCount) {
-      std::vector<uint8_t> buffer(dwCount);
+      std::vector<uint8_t, FxAllocAllocator<uint8_t>> buffer(dwCount);
       RGNDATA* pData = reinterpret_cast<RGNDATA*>(buffer.data());
       if (::GetRegionData(hRgn, dwCount, pData)) {
         CFX_PathData path;