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

Side by Side Diff: core/fxge/apple/fx_apple_platform.cpp

Issue 1832173003: Remove FX_DWORD from core/ and delete definition (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « core/fxge/apple/apple_int.h ('k') | core/fxge/apple/fx_quartz_device.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "core/fxcrt/include/fx_system.h" 7 #include "core/fxcrt/include/fx_system.h"
8 #include "core/include/fxge/fx_ge.h" 8 #include "core/include/fxge/fx_ge.h"
9 9
10 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 10 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
(...skipping 15 matching lines...) Expand all
26 ((CApplePlatform*)CFX_GEModule::Get()->GetPlatformData())->_quartz2d; 26 ((CApplePlatform*)CFX_GEModule::Get()->GetPlatformData())->_quartz2d;
27 if (m_pPlatformGraphics) { 27 if (m_pPlatformGraphics) {
28 quartz2d.destroyGraphics(m_pPlatformGraphics); 28 quartz2d.destroyGraphics(m_pPlatformGraphics);
29 m_pPlatformGraphics = NULL; 29 m_pPlatformGraphics = NULL;
30 } 30 }
31 } 31 }
32 void CFX_FaceCache::InitPlatform() {} 32 void CFX_FaceCache::InitPlatform() {}
33 void CFX_FaceCache::DestroyPlatform() {} 33 void CFX_FaceCache::DestroyPlatform() {}
34 CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph_Nativetext( 34 CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph_Nativetext(
35 CFX_Font* pFont, 35 CFX_Font* pFont,
36 FX_DWORD glyph_index, 36 uint32_t glyph_index,
37 const CFX_Matrix* pMatrix, 37 const CFX_Matrix* pMatrix,
38 int dest_width, 38 int dest_width,
39 int anti_alias) { 39 int anti_alias) {
40 return NULL; 40 return NULL;
41 } 41 }
42 static FX_BOOL _CGDrawGlyphRun(CGContextRef pContext, 42 static FX_BOOL _CGDrawGlyphRun(CGContextRef pContext,
43 int nChars, 43 int nChars,
44 const FXTEXT_CHARPOS* pCharPos, 44 const FXTEXT_CHARPOS* pCharPos,
45 CFX_Font* pFont, 45 CFX_Font* pFont,
46 CFX_FontCache* pCache, 46 CFX_FontCache* pCache,
47 const CFX_Matrix* pObject2Device, 47 const CFX_Matrix* pObject2Device,
48 FX_FLOAT font_size, 48 FX_FLOAT font_size,
49 FX_DWORD argb, 49 uint32_t argb,
50 int alpha_flag, 50 int alpha_flag,
51 void* pIccTransform) { 51 void* pIccTransform) {
52 if (nChars == 0) { 52 if (nChars == 0) {
53 return TRUE; 53 return TRUE;
54 } 54 }
55 CFX_Matrix new_matrix; 55 CFX_Matrix new_matrix;
56 FX_BOOL bNegSize = font_size < 0; 56 FX_BOOL bNegSize = font_size < 0;
57 if (bNegSize) { 57 if (bNegSize) {
58 font_size = -font_size; 58 font_size = -font_size;
59 } 59 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 font_size, glyph_indices, glyph_positions, 96 font_size, glyph_indices, glyph_positions,
97 nChars, argb, NULL); 97 nChars, argb, NULL);
98 } 98 }
99 static void _DoNothing(void* info, const void* data, size_t size) {} 99 static void _DoNothing(void* info, const void* data, size_t size) {}
100 FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, 100 FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars,
101 const FXTEXT_CHARPOS* pCharPos, 101 const FXTEXT_CHARPOS* pCharPos,
102 CFX_Font* pFont, 102 CFX_Font* pFont,
103 CFX_FontCache* pCache, 103 CFX_FontCache* pCache,
104 const CFX_Matrix* pObject2Device, 104 const CFX_Matrix* pObject2Device,
105 FX_FLOAT font_size, 105 FX_FLOAT font_size,
106 FX_DWORD argb, 106 uint32_t argb,
107 int alpha_flag, 107 int alpha_flag,
108 void* pIccTransform) { 108 void* pIccTransform) {
109 if (!pFont) { 109 if (!pFont) {
110 return FALSE; 110 return FALSE;
111 } 111 }
112 FX_BOOL bBold = pFont->IsBold(); 112 FX_BOOL bBold = pFont->IsBold();
113 if (!bBold && pFont->GetSubstFont() && 113 if (!bBold && pFont->GetSubstFont() &&
114 pFont->GetSubstFont()->m_Weight >= 500 && 114 pFont->GetSubstFont()->m_Weight >= 500 &&
115 pFont->GetSubstFont()->m_Weight <= 600) { 115 pFont->GetSubstFont()->m_Weight <= 600) {
116 return FALSE; 116 return FALSE;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 void CFX_Font::ReleasePlatformResource() { 164 void CFX_Font::ReleasePlatformResource() {
165 if (m_pPlatformFont) { 165 if (m_pPlatformFont) {
166 CQuartz2D& quartz2d = 166 CQuartz2D& quartz2d =
167 ((CApplePlatform*)CFX_GEModule::Get()->GetPlatformData())->_quartz2d; 167 ((CApplePlatform*)CFX_GEModule::Get()->GetPlatformData())->_quartz2d;
168 quartz2d.DestroyFont(m_pPlatformFont); 168 quartz2d.DestroyFont(m_pPlatformFont);
169 m_pPlatformFont = NULL; 169 m_pPlatformFont = NULL;
170 } 170 }
171 } 171 }
172 172
173 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 173 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
OLDNEW
« no previous file with comments | « core/fxge/apple/apple_int.h ('k') | core/fxge/apple/fx_quartz_device.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698