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

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

Issue 2350763002: Revert of Pdfium: Fix fonts leaking on ClosePage. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: 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
« no previous file with comments | « core/fxge/agg/fx_agg_driver.cpp ('k') | core/fxge/apple/fx_apple_platform.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 #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
24 class CQuartz2D { 26 class CQuartz2D {
25 public: 27 public:
26 void* createGraphics(CFX_DIBitmap* bitmap); 28 void* createGraphics(CFX_DIBitmap* bitmap);
27 void destroyGraphics(void* graphics); 29 void destroyGraphics(void* graphics);
28 30
29 void* CreateFont(const uint8_t* pFontData, uint32_t dwFontSize); 31 void* CreateFont(const uint8_t* pFontData, uint32_t dwFontSize);
30 void DestroyFont(void* pFont); 32 void DestroyFont(void* pFont);
31 void setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix); 33 void setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix);
32 FX_BOOL drawGraphicsString(void* graphics, 34 FX_BOOL drawGraphicsString(void* graphics,
33 void* font, 35 void* font,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, 103 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
102 int bitmap_alpha, 104 int bitmap_alpha,
103 uint32_t color, 105 uint32_t color,
104 const CFX_Matrix* pMatrix, 106 const CFX_Matrix* pMatrix,
105 uint32_t flags, 107 uint32_t flags,
106 void*& handle, 108 void*& handle,
107 int blend_type) override; 109 int blend_type) override;
108 FX_BOOL DrawDeviceText(int nChars, 110 FX_BOOL DrawDeviceText(int nChars,
109 const FXTEXT_CHARPOS* pCharPos, 111 const FXTEXT_CHARPOS* pCharPos,
110 CFX_Font* pFont, 112 CFX_Font* pFont,
113 CFX_FontCache* pCache,
111 const CFX_Matrix* pObject2Device, 114 const CFX_Matrix* pObject2Device,
112 FX_FLOAT font_size, 115 FX_FLOAT font_size,
113 uint32_t color) override; 116 uint32_t color) override;
114 void ClearDriver() override; 117 void ClearDriver() override;
115 118
116 protected: 119 protected:
117 void setStrokeInfo(const CFX_GraphStateData* graphState, 120 void setStrokeInfo(const CFX_GraphStateData* graphState,
118 FX_ARGB argb, 121 FX_ARGB argb,
119 FX_FLOAT lineWidth); 122 FX_FLOAT lineWidth);
120 void setFillInfo(FX_ARGB argb); 123 void setFillInfo(FX_ARGB argb);
121 void setPathToContext(const CFX_PathData* pathData); 124 void setPathToContext(const CFX_PathData* pathData);
122 FX_FLOAT getLineWidth(const CFX_GraphStateData* graphState, 125 FX_FLOAT getLineWidth(const CFX_GraphStateData* graphState,
123 CGAffineTransform ctm); 126 CGAffineTransform ctm);
124 FX_BOOL CG_DrawGlyphRun(int nChars, 127 FX_BOOL CG_DrawGlyphRun(int nChars,
125 const FXTEXT_CHARPOS* pCharPos, 128 const FXTEXT_CHARPOS* pCharPos,
126 CFX_Font* pFont, 129 CFX_Font* pFont,
130 CFX_FontCache* pCache,
127 const CFX_Matrix* pGlyphMatrix, 131 const CFX_Matrix* pGlyphMatrix,
128 const CFX_Matrix* pObject2Device, 132 const CFX_Matrix* pObject2Device,
129 FX_FLOAT font_size, 133 FX_FLOAT font_size,
130 uint32_t argb); 134 uint32_t argb);
131 void CG_SetImageTransform(int dest_left, 135 void CG_SetImageTransform(int dest_left,
132 int dest_top, 136 int dest_top,
133 int dest_width, 137 int dest_width,
134 int dest_height, 138 int dest_height,
135 CGRect* rect); 139 CGRect* rect);
136 140
137 CGContextRef m_context; 141 CGContextRef m_context;
138 CGAffineTransform m_foxitDevice2User; 142 CGAffineTransform m_foxitDevice2User;
139 CGAffineTransform m_user2FoxitDevice; 143 CGAffineTransform m_user2FoxitDevice;
140 int32_t m_saveCount; 144 int32_t m_saveCount;
141 145
142 int32_t m_width; 146 int32_t m_width;
143 int32_t m_height; 147 int32_t m_height;
144 int32_t m_bitsPerPixel; 148 int32_t m_bitsPerPixel;
145 int32_t m_deviceClass; 149 int32_t m_deviceClass;
146 int32_t m_renderCaps; 150 int32_t m_renderCaps;
147 int32_t m_horzSize; 151 int32_t m_horzSize;
148 int32_t m_vertSize; 152 int32_t m_vertSize;
149 }; 153 };
150 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 154 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
151 155
152 #endif // CORE_FXGE_APPLE_APPLE_INT_H_ 156 #endif // CORE_FXGE_APPLE_APPLE_INT_H_
OLDNEW
« no previous file with comments | « core/fxge/agg/fx_agg_driver.cpp ('k') | core/fxge/apple/fx_apple_platform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698