Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2726)

Unified Diff: core/fxge/win32/fx_win32_device.cpp

Issue 2612243005: Add postscript path (Closed)
Patch Set: Get rid of extra declarations Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxge/win32/cfx_psrenderer.cpp ('k') | core/fxge/win32/fx_win32_print.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/win32/fx_win32_device.cpp
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index 1bfb4b7d6d2f72f40604f1e245471c16de76453e..c673a18d2de7596ebe2d3001b519d76025f6565c 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -14,10 +14,6 @@
#include "core/fxcrt/cfx_maybe_owned.h"
#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/fx_system.h"
-#include "core/fxge/cfx_fontmapper.h"
-#include "core/fxge/cfx_gemodule.h"
-#include "core/fxge/cfx_graphstatedata.h"
-#include "core/fxge/cfx_pathdata.h"
#include "core/fxge/cfx_windowsdevice.h"
#include "core/fxge/dib/dib_int.h"
#include "core/fxge/fx_font.h"
@@ -697,6 +693,8 @@ bool CFX_Win32FontInfo::GetFontCharset(void* hFont, int& charset) {
} // namespace
+int g_pdfium_print_postscript_level = 0;
+
std::unique_ptr<IFX_SystemFontInfo> IFX_SystemFontInfo::CreateDefault(
const char** pUnused) {
if (IsGDIEnabled())
@@ -1387,7 +1385,13 @@ IFX_RenderDeviceDriver* CFX_WindowsDevice::CreateDriver(HDC hDC) {
int obj_type = ::GetObjectType(hDC);
bool use_printer = device_type == DT_RASPRINTER ||
device_type == DT_PLOTTER || obj_type == OBJ_ENHMETADC;
- if (use_printer)
- return new CGdiPrinterDriver(hDC);
- return new CGdiDisplayDriver(hDC);
+
+ if (!use_printer)
+ return new CGdiDisplayDriver(hDC);
+
+ if (g_pdfium_print_postscript_level == 2 ||
+ g_pdfium_print_postscript_level == 3) {
+ return new CPSPrinterDriver(hDC, g_pdfium_print_postscript_level, false);
+ }
+ return new CGdiPrinterDriver(hDC);
}
« no previous file with comments | « core/fxge/win32/cfx_psrenderer.cpp ('k') | core/fxge/win32/fx_win32_print.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698