Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "../../../include/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
| 8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ | 8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ |
| 9 #include "../../../include/fxge/fx_ge_win32.h" | 9 #include "../../../include/fxge/fx_ge_win32.h" |
| 10 #include <crtdbg.h> | 10 #include <crtdbg.h> |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 396 return FX_NEW CWin32FontInfo; | 396 return FX_NEW CWin32FontInfo; |
| 397 } | 397 } |
| 398 void CFX_GEModule::InitPlatform() | 398 void CFX_GEModule::InitPlatform() |
| 399 { | 399 { |
| 400 CWin32Platform* pPlatformData = FX_NEW CWin32Platform; | 400 CWin32Platform* pPlatformData = FX_NEW CWin32Platform; |
| 401 if (!pPlatformData) { | 401 if (!pPlatformData) { |
| 402 return; | 402 return; |
| 403 } | 403 } |
| 404 OSVERSIONINFO ver; | 404 OSVERSIONINFO ver; |
| 405 ver.dwOSVersionInfoSize = sizeof(ver); | 405 ver.dwOSVersionInfoSize = sizeof(ver); |
| 406 #pragma warning(suppress : 4996) // Suppress deprecation warning | |
|
scottmg
2015/01/06 19:48:53
This is globally disabled in Chromium, maybe you w
| |
| 406 GetVersionEx(&ver); | 407 GetVersionEx(&ver); |
| 407 pPlatformData->m_bHalfTone = ver.dwMajorVersion >= 5; | 408 pPlatformData->m_bHalfTone = ver.dwMajorVersion >= 5; |
| 408 pPlatformData->m_GdiplusExt.Load(); | 409 pPlatformData->m_GdiplusExt.Load(); |
| 409 m_pPlatformData = pPlatformData; | 410 m_pPlatformData = pPlatformData; |
| 410 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault()); | 411 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault()); |
| 411 } | 412 } |
| 412 void CFX_GEModule::DestroyPlatform() | 413 void CFX_GEModule::DestroyPlatform() |
| 413 { | 414 { |
| 414 if (m_pPlatformData) { | 415 if (m_pPlatformData) { |
| 415 delete (CWin32Platform*)m_pPlatformData; | 416 delete (CWin32Platform*)m_pPlatformData; |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1209 if (m_hDC) { | 1210 if (m_hDC) { |
| 1210 SelectObject(m_hDC, m_hOldBitmap); | 1211 SelectObject(m_hDC, m_hOldBitmap); |
| 1211 DeleteDC(m_hDC); | 1212 DeleteDC(m_hDC); |
| 1212 } | 1213 } |
| 1213 if (m_hBitmap) { | 1214 if (m_hBitmap) { |
| 1214 DeleteObject(m_hBitmap); | 1215 DeleteObject(m_hBitmap); |
| 1215 } | 1216 } |
| 1216 delete GetBitmap(); | 1217 delete GetBitmap(); |
| 1217 } | 1218 } |
| 1218 #endif | 1219 #endif |
| OLD | NEW |