7#include "core/fxge/cfx_windowsrenderdevice.h"
11#include "core/fxge/renderdevicedriver_iface.h"
12#include "core/fxge/win32/cgdi_display_driver.h"
13#include "core/fxge/win32/cgdi_printer_driver.h"
14#include "core/fxge/win32/cps_printer_driver.h"
15#include "core/fxge/win32/ctext_only_printer_driver.h"
19std::unique_ptr<RenderDeviceDriverIface> CreateDriver(
23 int device_type = ::GetDeviceCaps(hDC, TECHNOLOGY);
24 int obj_type = ::GetObjectType(hDC);
25 bool use_printer = device_type == DT_RASPRINTER ||
26 device_type == DT_PLOTTER ||
27 device_type == DT_CHARSTREAM || obj_type == OBJ_ENHMETADC;
30 return std::make_unique<CGdiDisplayDriver>(hDC);
34 return std::make_unique<CGdiPrinterDriver>(hDC);
38 return std::make_unique<CTextOnlyPrinterDriver>(hDC);
41 ps_font_tracker, encoder_iface);
52 SetDeviceDriver(CreateDriver(hDC, ps_font_tracker, encoder_iface));
WindowsPrintMode g_pdfium_print_mode
CFX_WindowsRenderDevice(HDC hDC, CFX_PSFontTracker *ps_font_tracker, const EncoderIface *encoder_iface)
~CFX_WindowsRenderDevice() override