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

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

Issue 1821043003: Remove FX_WORD in favor of uint16_t. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use stdint.h directly, bitfield minefield. 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/include/fxcrt/fx_system.h" 7 #include "core/include/fxcrt/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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 if (!pFont->GetPlatformFont()) { 67 if (!pFont->GetPlatformFont()) {
68 if (pFont->GetPsName() == CFX_WideString::FromLocal("DFHeiStd-W5")) { 68 if (pFont->GetPsName() == CFX_WideString::FromLocal("DFHeiStd-W5")) {
69 return FALSE; 69 return FALSE;
70 } 70 }
71 pFont->SetPlatformFont( 71 pFont->SetPlatformFont(
72 quartz2d.CreateFont(pFont->GetFontData(), pFont->GetSize())); 72 quartz2d.CreateFont(pFont->GetFontData(), pFont->GetSize()));
73 if (!pFont->GetPlatformFont()) { 73 if (!pFont->GetPlatformFont()) {
74 return FALSE; 74 return FALSE;
75 } 75 }
76 } 76 }
77 CFX_FixedBufGrow<FX_WORD, 32> glyph_indices(nChars); 77 CFX_FixedBufGrow<uint16_t, 32> glyph_indices(nChars);
78 CFX_FixedBufGrow<CGPoint, 32> glyph_positions(nChars); 78 CFX_FixedBufGrow<CGPoint, 32> glyph_positions(nChars);
79 for (int i = 0; i < nChars; i++) { 79 for (int i = 0; i < nChars; i++) {
80 glyph_indices[i] = pCharPos[i].m_ExtGID; 80 glyph_indices[i] = pCharPos[i].m_ExtGID;
81 if (bNegSize) { 81 if (bNegSize) {
82 glyph_positions[i].x = -pCharPos[i].m_OriginX; 82 glyph_positions[i].x = -pCharPos[i].m_OriginX;
83 } else { 83 } else {
84 glyph_positions[i].x = pCharPos[i].m_OriginX; 84 glyph_positions[i].x = pCharPos[i].m_OriginX;
85 } 85 }
86 glyph_positions[i].y = pCharPos[i].m_OriginY; 86 glyph_positions[i].y = pCharPos[i].m_OriginY;
87 } 87 }
(...skipping 76 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