Chromium Code Reviews| 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_INCLUDE_FXGE_FX_GE_H_ | 7 #ifndef CORE_INCLUDE_FXGE_FX_GE_H_ |
| 8 #define CORE_INCLUDE_FXGE_FX_GE_H_ | 8 #define CORE_INCLUDE_FXGE_FX_GE_H_ |
| 9 | 9 |
| 10 #include "core/include/fxge/fx_dib.h" | 10 #include "core/include/fxge/fx_dib.h" |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 423 FXDIB_Format format, | 423 FXDIB_Format format, |
| 424 int dither_bits = 0, | 424 int dither_bits = 0, |
| 425 CFX_DIBitmap* pOriDevice = NULL); | 425 CFX_DIBitmap* pOriDevice = NULL); |
| 426 | 426 |
| 427 protected: | 427 protected: |
| 428 FX_BOOL m_bOwnedBitmap; | 428 FX_BOOL m_bOwnedBitmap; |
| 429 }; | 429 }; |
| 430 class CFX_SkiaDevice : public CFX_RenderDevice { | 430 class CFX_SkiaDevice : public CFX_RenderDevice { |
| 431 public: | 431 public: |
| 432 CFX_SkiaDevice(); | 432 CFX_SkiaDevice(); |
| 433 CFX_SkiaDevice(int size_x, int size_y, void* recorder); | |
| 433 ~CFX_SkiaDevice() override; | 434 ~CFX_SkiaDevice() override; |
| 434 | 435 |
| 435 FX_BOOL Attach(CFX_DIBitmap* pBitmap, | 436 FX_BOOL Attach(CFX_DIBitmap* pBitmap, |
| 436 int dither_bits = 0, | 437 int dither_bits = 0, |
| 437 FX_BOOL bRgbByteOrder = FALSE, | 438 FX_BOOL bRgbByteOrder = FALSE, |
| 438 CFX_DIBitmap* pOriDevice = NULL, | 439 CFX_DIBitmap* pOriDevice = NULL, |
| 439 FX_BOOL bGroupKnockout = FALSE); | 440 FX_BOOL bGroupKnockout = FALSE); |
| 440 | 441 |
| 441 FX_BOOL Create(int width, | 442 FX_BOOL Create(int width, |
| 442 int height, | 443 int height, |
| 443 FXDIB_Format format, | 444 FXDIB_Format format, |
| 444 int dither_bits = 0, | 445 int dither_bits = 0, |
| 445 CFX_DIBitmap* pOriDevice = NULL); | 446 CFX_DIBitmap* pOriDevice = NULL); |
| 446 | 447 |
| 448 void* GetRecorder() const { return m_recorder; } | |
| 449 | |
| 447 protected: | 450 protected: |
| 451 void* m_recorder; | |
|
dsinclair
2016/03/10 14:38:54
Is there a better type we could use for recorder t
caryclark
2016/03/10 20:44:55
replaced void* with FPDF_RECORDER in C interfaces
| |
| 448 FX_BOOL m_bOwnedBitmap; | 452 FX_BOOL m_bOwnedBitmap; |
| 449 }; | 453 }; |
| 450 | 454 |
| 451 class IFX_RenderDeviceDriver { | 455 class IFX_RenderDeviceDriver { |
| 452 public: | 456 public: |
| 453 static IFX_RenderDeviceDriver* CreateFxgeDriver( | 457 static IFX_RenderDeviceDriver* CreateFxgeDriver( |
| 454 CFX_DIBitmap* pBitmap, | 458 CFX_DIBitmap* pBitmap, |
| 455 FX_BOOL bRgbByteOrder = FALSE, | 459 FX_BOOL bRgbByteOrder = FALSE, |
| 456 CFX_DIBitmap* pOriDevice = NULL, | 460 CFX_DIBitmap* pOriDevice = NULL, |
| 457 FX_BOOL bGroupKnockout = FALSE); | 461 FX_BOOL bGroupKnockout = FALSE); |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 701 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, | 705 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, |
| 702 CFX_Font* pFont, | 706 CFX_Font* pFont, |
| 703 const FXTEXT_CHARPOS& charpos, | 707 const FXTEXT_CHARPOS& charpos, |
| 704 int& ps_fontnum, | 708 int& ps_fontnum, |
| 705 int& ps_glyphindex); | 709 int& ps_glyphindex); |
| 706 | 710 |
| 707 void WritePSBinary(const uint8_t* data, int len); | 711 void WritePSBinary(const uint8_t* data, int len); |
| 708 }; | 712 }; |
| 709 | 713 |
| 710 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ | 714 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ |
| OLD | NEW |