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

Side by Side Diff: core/fxge/apple/apple_int.h

Issue 2158023002: Pdfium: Fix fonts leaking on ClosePage. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix xfa tests. Created 4 years, 3 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
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 #ifndef CORE_FXGE_APPLE_APPLE_INT_H_ 7 #ifndef CORE_FXGE_APPLE_APPLE_INT_H_
8 #define CORE_FXGE_APPLE_APPLE_INT_H_ 8 #define CORE_FXGE_APPLE_APPLE_INT_H_
9 9
10 #include "core/fxcrt/include/fx_system.h" 10 #include "core/fxcrt/include/fx_system.h"
11 11
12 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 12 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
13 13
14 #include "core/fxge/include/cfx_graphstatedata.h" 14 #include "core/fxge/include/cfx_graphstatedata.h"
15 #include "core/fxge/include/cfx_pathdata.h" 15 #include "core/fxge/include/cfx_pathdata.h"
16 #include "core/fxge/include/cfx_renderdevice.h" 16 #include "core/fxge/include/cfx_renderdevice.h"
17 #include "core/fxge/include/fx_dib.h" 17 #include "core/fxge/include/fx_dib.h"
18 #include "core/fxge/include/ifx_renderdevicedriver.h" 18 #include "core/fxge/include/ifx_renderdevicedriver.h"
19 19
20 #if _FX_OS_ == _FX_MACOSX_ 20 #if _FX_OS_ == _FX_MACOSX_
21 #include <Carbon/Carbon.h> 21 #include <Carbon/Carbon.h>
22 #endif 22 #endif
23 23
24 class CFX_FontCache;
25
26 class CQuartz2D { 24 class CQuartz2D {
27 public: 25 public:
28 void* createGraphics(CFX_DIBitmap* bitmap); 26 void* createGraphics(CFX_DIBitmap* bitmap);
29 void destroyGraphics(void* graphics); 27 void destroyGraphics(void* graphics);
30 28
31 void* CreateFont(const uint8_t* pFontData, uint32_t dwFontSize); 29 void* CreateFont(const uint8_t* pFontData, uint32_t dwFontSize);
32 void DestroyFont(void* pFont); 30 void DestroyFont(void* pFont);
33 void setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix); 31 void setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix);
34 FX_BOOL drawGraphicsString(void* graphics, 32 FX_BOOL drawGraphicsString(void* graphics,
35 void* font, 33 void* font,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, 101 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
104 int bitmap_alpha, 102 int bitmap_alpha,
105 uint32_t color, 103 uint32_t color,
106 const CFX_Matrix* pMatrix, 104 const CFX_Matrix* pMatrix,
107 uint32_t flags, 105 uint32_t flags,
108 void*& handle, 106 void*& handle,
109 int blend_type) override; 107 int blend_type) override;
110 FX_BOOL DrawDeviceText(int nChars, 108 FX_BOOL DrawDeviceText(int nChars,
111 const FXTEXT_CHARPOS* pCharPos, 109 const FXTEXT_CHARPOS* pCharPos,
112 CFX_Font* pFont, 110 CFX_Font* pFont,
113 CFX_FontCache* pCache,
114 const CFX_Matrix* pObject2Device, 111 const CFX_Matrix* pObject2Device,
115 FX_FLOAT font_size, 112 FX_FLOAT font_size,
116 uint32_t color) override; 113 uint32_t color) override;
117 void ClearDriver() override; 114 void ClearDriver() override;
118 115
119 protected: 116 protected:
120 void setStrokeInfo(const CFX_GraphStateData* graphState, 117 void setStrokeInfo(const CFX_GraphStateData* graphState,
121 FX_ARGB argb, 118 FX_ARGB argb,
122 FX_FLOAT lineWidth); 119 FX_FLOAT lineWidth);
123 void setFillInfo(FX_ARGB argb); 120 void setFillInfo(FX_ARGB argb);
124 void setPathToContext(const CFX_PathData* pathData); 121 void setPathToContext(const CFX_PathData* pathData);
125 FX_FLOAT getLineWidth(const CFX_GraphStateData* graphState, 122 FX_FLOAT getLineWidth(const CFX_GraphStateData* graphState,
126 CGAffineTransform ctm); 123 CGAffineTransform ctm);
127 FX_BOOL CG_DrawGlyphRun(int nChars, 124 FX_BOOL CG_DrawGlyphRun(int nChars,
128 const FXTEXT_CHARPOS* pCharPos, 125 const FXTEXT_CHARPOS* pCharPos,
129 CFX_Font* pFont, 126 CFX_Font* pFont,
130 CFX_FontCache* pCache,
131 const CFX_Matrix* pGlyphMatrix, 127 const CFX_Matrix* pGlyphMatrix,
132 const CFX_Matrix* pObject2Device, 128 const CFX_Matrix* pObject2Device,
133 FX_FLOAT font_size, 129 FX_FLOAT font_size,
134 uint32_t argb); 130 uint32_t argb);
135 void CG_SetImageTransform(int dest_left, 131 void CG_SetImageTransform(int dest_left,
136 int dest_top, 132 int dest_top,
137 int dest_width, 133 int dest_width,
138 int dest_height, 134 int dest_height,
139 CGRect* rect); 135 CGRect* rect);
140 136
141 CGContextRef m_context; 137 CGContextRef m_context;
142 CGAffineTransform m_foxitDevice2User; 138 CGAffineTransform m_foxitDevice2User;
143 CGAffineTransform m_user2FoxitDevice; 139 CGAffineTransform m_user2FoxitDevice;
144 int32_t m_saveCount; 140 int32_t m_saveCount;
145 141
146 int32_t m_width; 142 int32_t m_width;
147 int32_t m_height; 143 int32_t m_height;
148 int32_t m_bitsPerPixel; 144 int32_t m_bitsPerPixel;
149 int32_t m_deviceClass; 145 int32_t m_deviceClass;
150 int32_t m_renderCaps; 146 int32_t m_renderCaps;
151 int32_t m_horzSize; 147 int32_t m_horzSize;
152 int32_t m_vertSize; 148 int32_t m_vertSize;
153 }; 149 };
154 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 150 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
155 151
156 #endif // CORE_FXGE_APPLE_APPLE_INT_H_ 152 #endif // CORE_FXGE_APPLE_APPLE_INT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698