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 179 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, int32_t nDownsampleWidth = 0, int32_t nDownsampleHeigh
t = 0); | 200 FX_BOOL» » » » » StartLoadImage(const CPDF_ImageO
bject* pImage, CPDF_PageRenderCache* pCache, void*& LoadHandle, FX_BOOL bStdCS =
FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus*
pRenderStatus = NULL, int32_t nDownsampleWidth = 0, int32_t nDownsampleHeight =
0); |
201 FX_BOOL» » » » » Continue(FX_LPVOID LoadHandle, I
FX_Pause* pPause); | 201 FX_BOOL» » » » » Continue(void* LoadHandle, IFX_P
ause* 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 int32_t m_nDownsampleWidth; | 208 int32_t m_nDownsampleWidth; |
209 int32_t m_nDownsampleHeight; | 209 int32_t m_nDownsampleHeight; |
210 }; | 210 }; |
211 class CPDF_ProgressiveImageLoaderHandle | 211 class CPDF_ProgressiveImageLoaderHandle |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 const CFX_DIBSource* m_pDIBSource; | 243 const CFX_DIBSource* m_pDIBSource; |
244 CFX_DIBitmap* m_pClone; | 244 CFX_DIBitmap* m_pClone; |
245 int m_BitmapAlpha; | 245 int m_BitmapAlpha; |
246 FX_BOOL m_bPatternColor; | 246 FX_BOOL m_bPatternColor; |
247 CPDF_Pattern* m_pPattern; | 247 CPDF_Pattern* m_pPattern; |
248 FX_ARGB m_FillArgb; | 248 FX_ARGB m_FillArgb; |
249 FX_DWORD m_Flags; | 249 FX_DWORD m_Flags; |
250 CPDF_QuickStretcher* m_pQuickStretcher; | 250 CPDF_QuickStretcher* m_pQuickStretcher; |
251 CFX_ImageTransformer* m_pTransformer; | 251 CFX_ImageTransformer* m_pTransformer; |
252 CPDF_ImageRenderer* m_pRenderer2; | 252 CPDF_ImageRenderer* m_pRenderer2; |
253 FX_LPVOID» » » m_DeviceHandle; | 253 void*» » » m_DeviceHandle; |
254 FX_LPVOID m_LoadHandle; | 254 void* m_LoadHandle; |
255 FX_BOOL m_bStdCS; | 255 FX_BOOL m_bStdCS; |
256 int m_BlendType; | 256 int m_BlendType; |
257 FX_BOOL StartBitmapAlpha(); | 257 FX_BOOL StartBitmapAlpha(); |
258 FX_BOOL StartDIBSource(); | 258 FX_BOOL StartDIBSource(); |
259 FX_BOOL StartRenderDIBSource(); | 259 FX_BOOL StartRenderDIBSource(); |
260 FX_BOOL StartLoadDIBSource(); | 260 FX_BOOL StartLoadDIBSource(); |
261 FX_BOOL DrawMaskedImage(); | 261 FX_BOOL DrawMaskedImage(); |
262 FX_BOOL DrawPatternImage(const CFX_Matrix* pObj2
Device); | 262 FX_BOOL DrawPatternImage(const CFX_Matrix* pObj2
Device); |
263 }; | 263 }; |
264 class CPDF_ScaledRenderBuffer | 264 class CPDF_ScaledRenderBuffer |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 class CPDF_DIBSource : public CFX_DIBSource | 383 class CPDF_DIBSource : public CFX_DIBSource |
384 { | 384 { |
385 public: | 385 public: |
386 CPDF_DIBSource(); | 386 CPDF_DIBSource(); |
387 virtual ~CPDF_DIBSource(); | 387 virtual ~CPDF_DIBSource(); |
388 FX_BOOL Load(CPDF_Document* pDoc, const CPDF_Str
eam* pStream, | 388 FX_BOOL Load(CPDF_Document* pDoc, const CPDF_Str
eam* pStream, |
389 CPDF_DIBSource** ppMask, FX_DWORD* pMatteColor, | 389 CPDF_DIBSource** ppMask, FX_DWORD* pMatteColor, |
390 CPDF_Dictionary* pFormResources, CPDF_Dictionary* p
PageResources, | 390 CPDF_Dictionary* pFormResources, CPDF_Dictionary* p
PageResources, |
391 FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, F
X_BOOL bLoadMask = FALSE); | 391 FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, F
X_BOOL bLoadMask = FALSE); |
392 virtual FX_BOOL SkipToScanline(int line, IFX_Pause* pPause) cons
t; | 392 virtual FX_BOOL SkipToScanline(int line, IFX_Pause* pPause) cons
t; |
393 virtual» FX_LPBYTE» GetBuffer() const; | 393 virtual» uint8_t*» GetBuffer() const; |
394 virtual FX_LPCBYTE» GetScanline(int line) const; | 394 virtual const uint8_t*» GetScanline(int line) const; |
395 virtual void» » DownSampleScanline(int line, FX_LPBYTE dest_scan
, int dest_bpp, | 395 virtual void» » DownSampleScanline(int line, uint8_t* dest_scan,
int dest_bpp, |
396 int dest_width, FX_BOOL bFlipX, int c
lip_left, int clip_width) const; | 396 int dest_width, FX_BOOL bFlipX, int c
lip_left, int clip_width) const; |
397 virtual void SetDownSampleSize(int dest_width, int dest_heigh
t) const; | 397 virtual void SetDownSampleSize(int dest_width, int dest_heigh
t) const; |
398 CFX_DIBitmap* GetBitmap() const; | 398 CFX_DIBitmap* GetBitmap() const; |
399 void ReleaseBitmap(CFX_DIBitmap*) const; | 399 void ReleaseBitmap(CFX_DIBitmap*) const; |
400 void ClearImageData(); | 400 void ClearImageData(); |
401 public: | 401 public: |
402 int StartLoadDIBSource(CPDF_Document* pDoc,
const CPDF_Stream* pStream, FX_BOOL bHasMask, | 402 int StartLoadDIBSource(CPDF_Document* pDoc,
const CPDF_Stream* pStream, FX_BOOL bHasMask, |
403 CPDF_Dictionary* pFormResources, CPDF
_Dictionary* pPageResources, | 403 CPDF_Dictionary* pFormResources, CPDF
_Dictionary* pPageResources, |
404 FX_BOOL bStdCS = FALSE, FX_DWORD Grou
pFamily = 0, FX_BOOL bLoadMask = FALSE); | 404 FX_BOOL bStdCS = FALSE, FX_DWORD Grou
pFamily = 0, FX_BOOL bLoadMask = FALSE); |
405 int ContinueLoadDIBSource(IFX_Pause* pPause)
; | 405 int ContinueLoadDIBSource(IFX_Pause* pPause)
; |
406 int StratLoadMask(); | 406 int StratLoadMask(); |
407 int StartLoadMaskDIB(); | 407 int StartLoadMaskDIB(); |
408 int ContinueLoadMaskDIB(IFX_Pause* pPause); | 408 int ContinueLoadMaskDIB(IFX_Pause* pPause); |
409 int ContinueToLoadMask(); | 409 int ContinueToLoadMask(); |
410 CPDF_DIBSource* DetachMask(); | 410 CPDF_DIBSource* DetachMask(); |
411 CPDF_DIBSource* m_pMask; | 411 CPDF_DIBSource* m_pMask; |
412 FX_DWORD m_MatteColor; | 412 FX_DWORD m_MatteColor; |
413 FX_LPVOID» » » m_pJbig2Context; | 413 void*» » » m_pJbig2Context; |
414 CPDF_StreamAcc* m_pGlobalStream; | 414 CPDF_StreamAcc* m_pGlobalStream; |
415 FX_BOOL m_bStdCS; | 415 FX_BOOL m_bStdCS; |
416 int m_Status; | 416 int m_Status; |
417 CPDF_Object* m_pMaskStream; | 417 CPDF_Object* m_pMaskStream; |
418 FX_BOOL m_bHasMask; | 418 FX_BOOL m_bHasMask; |
419 protected: | 419 protected: |
420 FX_BOOL LoadColorInfo(CPDF_Dictionary* pFormReso
urces, CPDF_Dictionary* pPageResources); | 420 FX_BOOL LoadColorInfo(CPDF_Dictionary* pFormReso
urces, CPDF_Dictionary* pPageResources); |
421 DIB_COMP_DATA* GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode, FX_BOOL&
bColorKey); | 421 DIB_COMP_DATA* GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode, FX_BOOL&
bColorKey); |
422 CPDF_DIBSource* LoadMask(FX_DWORD& MatteColor); | 422 CPDF_DIBSource* LoadMask(FX_DWORD& MatteColor); |
423 CPDF_DIBSource* LoadMaskDIB(CPDF_Stream* pMask); | 423 CPDF_DIBSource* LoadMaskDIB(CPDF_Stream* pMask); |
424 void LoadJpxBitmap(); | 424 void LoadJpxBitmap(); |
425 void LoadPalette(); | 425 void LoadPalette(); |
426 int CreateDecoder(); | 426 int CreateDecoder(); |
427 void» » » » TranslateScanline24bpp(FX_LPBYTE dest_sc
an, FX_LPCBYTE src_scan) const; | 427 void» » » » TranslateScanline24bpp(uint8_t* dest_sca
n, const uint8_t* src_scan) const; |
428 void ValidateDictParam(); | 428 void ValidateDictParam(); |
429 CPDF_Document* m_pDocument; | 429 CPDF_Document* m_pDocument; |
430 const CPDF_Stream* m_pStream; | 430 const CPDF_Stream* m_pStream; |
431 CPDF_StreamAcc* m_pStreamAcc; | 431 CPDF_StreamAcc* m_pStreamAcc; |
432 const CPDF_Dictionary* m_pDict; | 432 const CPDF_Dictionary* m_pDict; |
433 CPDF_ColorSpace* m_pColorSpace; | 433 CPDF_ColorSpace* m_pColorSpace; |
434 FX_DWORD m_Family; | 434 FX_DWORD m_Family; |
435 FX_DWORD m_bpc; | 435 FX_DWORD m_bpc; |
436 FX_DWORD m_bpc_orig; | 436 FX_DWORD m_bpc_orig; |
437 FX_DWORD m_nComponents; | 437 FX_DWORD m_nComponents; |
438 FX_DWORD m_GroupFamily; | 438 FX_DWORD m_GroupFamily; |
439 FX_BOOL m_bLoadMask; | 439 FX_BOOL m_bLoadMask; |
440 FX_BOOL m_bDefaultDecode; | 440 FX_BOOL m_bDefaultDecode; |
441 FX_BOOL m_bImageMask; | 441 FX_BOOL m_bImageMask; |
442 FX_BOOL m_bDoBpcCheck; | 442 FX_BOOL m_bDoBpcCheck; |
443 FX_BOOL m_bColorKey; | 443 FX_BOOL m_bColorKey; |
444 DIB_COMP_DATA* m_pCompData; | 444 DIB_COMP_DATA* m_pCompData; |
445 FX_LPBYTE» » » m_pLineBuf; | 445 uint8_t*» » » m_pLineBuf; |
446 FX_LPBYTE» » » m_pMaskedLine; | 446 uint8_t*» » » m_pMaskedLine; |
447 nonstd::unique_ptr<CFX_DIBitmap> m_pCachedBitmap; | 447 nonstd::unique_ptr<CFX_DIBitmap> m_pCachedBitmap; |
448 ICodec_ScanlineDecoder* m_pDecoder; | 448 ICodec_ScanlineDecoder* m_pDecoder; |
449 }; | 449 }; |
450 #define FPDF_HUGE_IMAGE_SIZE 60000000 | 450 #define FPDF_HUGE_IMAGE_SIZE 60000000 |
451 class CPDF_DIBTransferFunc : public CFX_FilteredDIB | 451 class CPDF_DIBTransferFunc : public CFX_FilteredDIB |
452 { | 452 { |
453 public: | 453 public: |
454 CPDF_DIBTransferFunc(const CPDF_TransferFunc* pTransferFunc); | 454 CPDF_DIBTransferFunc(const CPDF_TransferFunc* pTransferFunc); |
455 virtual FXDIB_Format GetDestFormat(); | 455 virtual FXDIB_Format GetDestFormat(); |
456 virtual FX_ARGB* GetDestPalette() | 456 virtual FX_ARGB* GetDestPalette() |
457 { | 457 { |
458 return NULL; | 458 return NULL; |
459 } | 459 } |
460 virtual void» » » TranslateScanline(FX_LPBYTE dest_buf, FX
_LPCBYTE src_buf) const; | 460 virtual void» » » TranslateScanline(uint8_t* dest_buf, con
st uint8_t* src_buf) const; |
461 virtual void» » » TranslateDownSamples(FX_LPBYTE dest_buf,
FX_LPCBYTE src_buf, int pixels, int Bpp) const; | 461 virtual void» » » TranslateDownSamples(uint8_t* dest_buf,
const uint8_t* src_buf, int pixels, int Bpp) const; |
462 FX_LPCBYTE» » » » m_RampR; | 462 const uint8_t*» » » » m_RampR; |
463 FX_LPCBYTE» » » » m_RampG; | 463 const uint8_t*» » » » m_RampG; |
464 FX_LPCBYTE» » » » m_RampB; | 464 const uint8_t*» » » » 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 |