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_FXGE_INCLUDE_FX_GE_H_ | 7 #ifndef CORE_FXGE_INCLUDE_FX_GE_H_ |
8 #define CORE_FXGE_INCLUDE_FX_GE_H_ | 8 #define CORE_FXGE_INCLUDE_FX_GE_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 uint32_t m_ExtGID; | 208 uint32_t m_ExtGID; |
209 #endif | 209 #endif |
210 bool m_bFontStyle; | 210 bool m_bFontStyle; |
211 }; | 211 }; |
212 | 212 |
213 class CFX_RenderDevice { | 213 class CFX_RenderDevice { |
214 public: | 214 public: |
215 CFX_RenderDevice(); | 215 CFX_RenderDevice(); |
216 virtual ~CFX_RenderDevice(); | 216 virtual ~CFX_RenderDevice(); |
217 | 217 |
| 218 void Flush(); |
218 void SetDeviceDriver(IFX_RenderDeviceDriver* pDriver); | 219 void SetDeviceDriver(IFX_RenderDeviceDriver* pDriver); |
219 IFX_RenderDeviceDriver* GetDeviceDriver() const { return m_pDeviceDriver; } | 220 IFX_RenderDeviceDriver* GetDeviceDriver() const { return m_pDeviceDriver; } |
220 | 221 |
221 FX_BOOL StartRendering(); | 222 FX_BOOL StartRendering(); |
222 void EndRendering(); | 223 void EndRendering(); |
223 void SaveState(); | 224 void SaveState(); |
224 void RestoreState(bool bKeepSaved); | 225 void RestoreState(bool bKeepSaved); |
225 | 226 |
226 int GetWidth() const { return m_Width; } | 227 int GetWidth() const { return m_Width; } |
227 int GetHeight() const { return m_Height; } | 228 int GetHeight() const { return m_Height; } |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 CFX_FontCache* pCache, | 372 CFX_FontCache* pCache, |
372 FX_FLOAT font_size, | 373 FX_FLOAT font_size, |
373 const CFX_Matrix* pText2User, | 374 const CFX_Matrix* pText2User, |
374 const CFX_Matrix* pUser2Device, | 375 const CFX_Matrix* pUser2Device, |
375 const CFX_GraphStateData* pGraphState, | 376 const CFX_GraphStateData* pGraphState, |
376 uint32_t fill_color, | 377 uint32_t fill_color, |
377 uint32_t stroke_color, | 378 uint32_t stroke_color, |
378 CFX_PathData* pClippingPath, | 379 CFX_PathData* pClippingPath, |
379 int nFlag); | 380 int nFlag); |
380 | 381 |
| 382 #ifdef _SKIA_SUPPORT_ |
| 383 virtual void DebugVerifyBitmapIsPreMultiplied() const; |
| 384 #endif |
| 385 |
381 private: | 386 private: |
382 void InitDeviceInfo(); | 387 void InitDeviceInfo(); |
383 void UpdateClipBox(); | 388 void UpdateClipBox(); |
384 FX_BOOL DrawFillStrokePath(const CFX_PathData* pPathData, | 389 FX_BOOL DrawFillStrokePath(const CFX_PathData* pPathData, |
385 const CFX_Matrix* pObject2Device, | 390 const CFX_Matrix* pObject2Device, |
386 const CFX_GraphStateData* pGraphState, | 391 const CFX_GraphStateData* pGraphState, |
387 uint32_t fill_color, | 392 uint32_t fill_color, |
388 uint32_t stroke_color, | 393 uint32_t stroke_color, |
389 int fill_mode, | 394 int fill_mode, |
390 int blend_type); | 395 int blend_type); |
(...skipping 18 matching lines...) Expand all Loading... |
409 CFX_DIBitmap* pOriDevice, | 414 CFX_DIBitmap* pOriDevice, |
410 bool bGroupKnockout); | 415 bool bGroupKnockout); |
411 bool Create(int width, | 416 bool Create(int width, |
412 int height, | 417 int height, |
413 FXDIB_Format format, | 418 FXDIB_Format format, |
414 CFX_DIBitmap* pOriDevice); | 419 CFX_DIBitmap* pOriDevice); |
415 | 420 |
416 #ifdef _SKIA_SUPPORT_ | 421 #ifdef _SKIA_SUPPORT_ |
417 bool AttachRecorder(SkPictureRecorder* recorder); | 422 bool AttachRecorder(SkPictureRecorder* recorder); |
418 SkPictureRecorder* CreateRecorder(int size_x, int size_y); | 423 SkPictureRecorder* CreateRecorder(int size_x, int size_y); |
419 void PreMultiply(); | 424 void DebugVerifyBitmapIsPreMultiplied() const override; |
420 #endif | 425 #endif |
421 | 426 |
422 protected: | 427 protected: |
423 bool m_bOwnedBitmap; | 428 bool m_bOwnedBitmap; |
424 }; | 429 }; |
425 | 430 |
426 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ | 431 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ |
OLD | NEW |