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 #ifndef CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 7 #ifndef CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
8 #define CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 8 #define CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
9 | 9 |
10 #include "../../../../third_party/base/nonstd_unique_ptr.h" | 10 #include "../../../../third_party/base/nonstd_unique_ptr.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode, const CFX_AffineMat
rix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f); | 39 CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode, const CFX_AffineMat
rix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f); |
40 protected: | 40 protected: |
41 CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, FX_DWORD ch
arcode, const CFX_AffineMatrix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT
retinaScaleY = 1.0f); | 41 CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, FX_DWORD ch
arcode, const CFX_AffineMatrix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT
retinaScaleY = 1.0f); |
42 CPDF_Type3Font* m_pFont; | 42 CPDF_Type3Font* m_pFont; |
43 CFX_MapByteStringToPtr m_SizeMap; | 43 CFX_MapByteStringToPtr m_SizeMap; |
44 }; | 44 }; |
45 class CPDF_TransferFunc | 45 class CPDF_TransferFunc |
46 { | 46 { |
47 public: | 47 public: |
48 CPDF_Document* m_pPDFDoc; | 48 CPDF_Document* m_pPDFDoc; |
49 FX_BYTE» » » m_Samples[256 * 3]; | 49 uint8_t» » » m_Samples[256 * 3]; |
50 FX_BOOL m_bIdentity; | 50 FX_BOOL m_bIdentity; |
51 | 51 |
52 CFX_DIBSource* TranslateImage(const CFX_DIBSource* pSrc, FX_BOOL bAutoD
ropSrc); | 52 CFX_DIBSource* TranslateImage(const CFX_DIBSource* pSrc, FX_BOOL bAutoD
ropSrc); |
53 FX_COLORREF TranslateColor(FX_COLORREF src); | 53 FX_COLORREF TranslateColor(FX_COLORREF src); |
54 }; | 54 }; |
55 typedef CFX_MapPtrTemplate<CPDF_Font*, CPDF_CountedObject<CPDF_Type3Cache*>*> CP
DF_Type3CacheMap; | 55 typedef CFX_MapPtrTemplate<CPDF_Font*, CPDF_CountedObject<CPDF_Type3Cache*>*> CP
DF_Type3CacheMap; |
56 typedef CFX_MapPtrTemplate<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc*>*
> CPDF_TransferFuncMap; | 56 typedef CFX_MapPtrTemplate<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc*>*
> CPDF_TransferFuncMap; |
57 class CPDF_DocRenderData | 57 class CPDF_DocRenderData |
58 { | 58 { |
59 public: | 59 public: |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 m_pBitmap = NULL; | 190 m_pBitmap = NULL; |
191 m_pMask = NULL; | 191 m_pMask = NULL; |
192 m_MatteColor = 0; | 192 m_MatteColor = 0; |
193 m_bCached = FALSE; | 193 m_bCached = FALSE; |
194 m_nDownsampleWidth = 0; | 194 m_nDownsampleWidth = 0; |
195 m_nDownsampleHeight = 0; | 195 m_nDownsampleHeight = 0; |
196 } | 196 } |
197 | 197 |
198 FX_BOOL Load(const CPDF_ImageObject* pIm
age, CPDF_PageRenderCache* pCache, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily
= 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL); | 198 FX_BOOL Load(const CPDF_ImageObject* pIm
age, CPDF_PageRenderCache* pCache, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily
= 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL); |
199 | 199 |
200 FX_BOOL» » » » » StartLoadImage(const CPDF_ImageO
bject* pImage, CPDF_PageRenderCache* pCache, FX_LPVOID& LoadHandle, FX_BOOL bStd
CS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStat
us* pRenderStatus = NULL, FX_INT32 nDownsampleWidth = 0, FX_INT32 nDownsampleHei
ght = 0); | 200 FX_BOOL» » » » » StartLoadImage(const CPDF_ImageO
bject* pImage, CPDF_PageRenderCache* pCache, FX_LPVOID& LoadHandle, FX_BOOL bStd
CS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStat
us* pRenderStatus = NULL, int32_t nDownsampleWidth = 0, int32_t nDownsampleHeigh
t = 0); |
201 FX_BOOL Continue(FX_LPVOID LoadHandle, I
FX_Pause* pPause); | 201 FX_BOOL Continue(FX_LPVOID LoadHandle, I
FX_Pause* pPause); |
202 ~CPDF_ImageLoader(); | 202 ~CPDF_ImageLoader(); |
203 CFX_DIBSource* m_pBitmap; | 203 CFX_DIBSource* m_pBitmap; |
204 CFX_DIBSource* m_pMask; | 204 CFX_DIBSource* m_pMask; |
205 FX_DWORD m_MatteColor; | 205 FX_DWORD m_MatteColor; |
206 FX_BOOL m_bCached; | 206 FX_BOOL m_bCached; |
207 protected: | 207 protected: |
208 FX_INT32 m_nDownsampleWidth; | 208 int32_t m_nDownsampleWidth; |
209 FX_INT32 m_nDownsampleHeight; | 209 int32_t m_nDownsampleHeight; |
210 }; | 210 }; |
211 class CPDF_ProgressiveImageLoaderHandle | 211 class CPDF_ProgressiveImageLoaderHandle |
212 { | 212 { |
213 public: | 213 public: |
214 CPDF_ProgressiveImageLoaderHandle(); | 214 CPDF_ProgressiveImageLoaderHandle(); |
215 ~CPDF_ProgressiveImageLoaderHandle(); | 215 ~CPDF_ProgressiveImageLoaderHandle(); |
216 | 216 |
217 FX_BOOL» » » Start(CPDF_ImageLoader* pImageLoader, const CPDF
_ImageObject* pImage, CPDF_PageRenderCache* pCache, FX_BOOL bStdCS = FALSE, FX_D
WORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatu
s = NULL, FX_INT32 nDownsampleWidth = 0, FX_INT32 nDownsampleHeight = 0); | 217 FX_BOOL» » » Start(CPDF_ImageLoader* pImageLoader, const CPDF
_ImageObject* pImage, CPDF_PageRenderCache* pCache, FX_BOOL bStdCS = FALSE, FX_D
WORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatu
s = NULL, int32_t nDownsampleWidth = 0, int32_t nDownsampleHeight = 0); |
218 FX_BOOL Continue(IFX_Pause* pPause); | 218 FX_BOOL Continue(IFX_Pause* pPause); |
219 protected: | 219 protected: |
220 CPDF_ImageLoader* m_pImageLoader; | 220 CPDF_ImageLoader* m_pImageLoader; |
221 CPDF_PageRenderCache* m_pCache; | 221 CPDF_PageRenderCache* m_pCache; |
222 CPDF_ImageObject* m_pImage; | 222 CPDF_ImageObject* m_pImage; |
223 FX_INT32 m_nDownsampleWidth; | 223 int32_t m_nDownsampleWidth; |
224 FX_INT32 m_nDownsampleHeight; | 224 int32_t m_nDownsampleHeight; |
225 }; | 225 }; |
226 class CFX_ImageTransformer; | 226 class CFX_ImageTransformer; |
227 class CPDF_ImageRenderer : public IPDF_ObjectRenderer | 227 class CPDF_ImageRenderer : public IPDF_ObjectRenderer |
228 { | 228 { |
229 public: | 229 public: |
230 CPDF_ImageRenderer(); | 230 CPDF_ImageRenderer(); |
231 ~CPDF_ImageRenderer(); | 231 ~CPDF_ImageRenderer(); |
232 FX_BOOL Start(CPDF_RenderStatus* pStatus, const CPDF_PageObject*
pObj, const CFX_AffineMatrix* pObj2Device, FX_BOOL bStdCS, int blendType = FXDI
B_BLEND_NORMAL); | 232 FX_BOOL Start(CPDF_RenderStatus* pStatus, const CPDF_PageObject*
pObj, const CFX_AffineMatrix* pObj2Device, FX_BOOL bStdCS, int blendType = FXDI
B_BLEND_NORMAL); |
233 FX_BOOL Start(CPDF_RenderStatus* pStatus, const CFX_DIBSource* p
DIBSource, FX_ARGB bitmap_argb, | 233 FX_BOOL Start(CPDF_RenderStatus* pStatus, const CFX_DIBSource* p
DIBSource, FX_ARGB bitmap_argb, |
234 int bitmap_alpha, const CFX_AffineMatrix* pImage2Device, F
X_DWORD flags, FX_BOOL bStdCS, int blendType = FXDIB_BLEND_NORMAL); | 234 int bitmap_alpha, const CFX_AffineMatrix* pImage2Device, F
X_DWORD flags, FX_BOOL bStdCS, int blendType = FXDIB_BLEND_NORMAL); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 }; | 329 }; |
330 class CPDF_ImageCache | 330 class CPDF_ImageCache |
331 { | 331 { |
332 public: | 332 public: |
333 CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream); | 333 CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream); |
334 ~CPDF_ImageCache(); | 334 ~CPDF_ImageCache(); |
335 void ClearImageData(); | 335 void ClearImageData(); |
336 void Reset(const CFX_DIBitmap* pBitmap); | 336 void Reset(const CFX_DIBitmap* pBitmap); |
337 FX_BOOL GetCachedBitmap(CFX_DIBSource*& pBitmap,
CFX_DIBSource*& pMask, FX_DWORD& MatteColor, CPDF_Dictionary* pPageResources, | 337 FX_BOOL GetCachedBitmap(CFX_DIBSource*& pBitmap,
CFX_DIBSource*& pMask, FX_DWORD& MatteColor, CPDF_Dictionary* pPageResources, |
338 FX_BOOL bStdCS = FALSE, FX_DWORD GroupFa
mily = 0, FX_BOOL bLoadMask = FALSE, | 338 FX_BOOL bStdCS = FALSE, FX_DWORD GroupFa
mily = 0, FX_BOOL bLoadMask = FALSE, |
339 CPDF_RenderStatus* pRenderStatus = NULL,
FX_INT32 downsampleWidth = 0, FX_INT32 downsampleHeight = 0); | 339 CPDF_RenderStatus* pRenderStatus = NULL,
int32_t downsampleWidth = 0, int32_t downsampleHeight = 0); |
340 FX_DWORD EstimateSize() const | 340 FX_DWORD EstimateSize() const |
341 { | 341 { |
342 return m_dwCacheSize; | 342 return m_dwCacheSize; |
343 } | 343 } |
344 FX_DWORD GetTimeCount() const | 344 FX_DWORD GetTimeCount() const |
345 { | 345 { |
346 return m_dwTimeCount; | 346 return m_dwTimeCount; |
347 } | 347 } |
348 CPDF_Stream* GetStream() const | 348 CPDF_Stream* GetStream() const |
349 { | 349 { |
350 return m_pStream; | 350 return m_pStream; |
351 } | 351 } |
352 void SetTimeCount(FX_DWORD dwTimeCount) | 352 void SetTimeCount(FX_DWORD dwTimeCount) |
353 { | 353 { |
354 m_dwTimeCount = dwTimeCount; | 354 m_dwTimeCount = dwTimeCount; |
355 } | 355 } |
356 int m_dwTimeCount; | 356 int m_dwTimeCount; |
357 public: | 357 public: |
358 int StartGetCachedBitmap(CPDF_Dictionary* pF
ormResources, CPDF_Dictionary* pPageResources, | 358 int StartGetCachedBitmap(CPDF_Dictionary* pF
ormResources, CPDF_Dictionary* pPageResources, |
359 FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, | 359 FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, |
360 FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL,
FX_INT32 downsampleWidth = 0, FX_INT32 downsampleHeight = 0); | 360 FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL,
int32_t downsampleWidth = 0, int32_t downsampleHeight = 0); |
361 int Continue(IFX_Pause* pPause); | 361 int Continue(IFX_Pause* pPause); |
362 int ContinueGetCachedBitmap(); | 362 int ContinueGetCachedBitmap(); |
363 CFX_DIBSource* DetachBitmap(); | 363 CFX_DIBSource* DetachBitmap(); |
364 CFX_DIBSource* DetachMask(); | 364 CFX_DIBSource* DetachMask(); |
365 CFX_DIBSource* m_pCurBitmap; | 365 CFX_DIBSource* m_pCurBitmap; |
366 CFX_DIBSource* m_pCurMask; | 366 CFX_DIBSource* m_pCurMask; |
367 FX_DWORD m_MatteColor; | 367 FX_DWORD m_MatteColor; |
368 CPDF_RenderStatus* m_pRenderStatus; | 368 CPDF_RenderStatus* m_pRenderStatus; |
369 protected: | 369 protected: |
370 CPDF_Document* m_pDocument; | 370 CPDF_Document* m_pDocument; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 FX_LPCBYTE m_RampG; | 463 FX_LPCBYTE m_RampG; |
464 FX_LPCBYTE m_RampB; | 464 FX_LPCBYTE m_RampB; |
465 }; | 465 }; |
466 struct _CPDF_UniqueKeyGen { | 466 struct _CPDF_UniqueKeyGen { |
467 void Generate(int count, ...); | 467 void Generate(int count, ...); |
468 FX_CHAR m_Key[128]; | 468 FX_CHAR m_Key[128]; |
469 int m_KeyLen; | 469 int m_KeyLen; |
470 }; | 470 }; |
471 | 471 |
472 #endif // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 472 #endif // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
OLD | NEW |