| 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_FX_DIB_H_ | 7 #ifndef CORE_FXGE_FX_DIB_H_ |
| 8 #define CORE_FXGE_FX_DIB_H_ | 8 #define CORE_FXGE_FX_DIB_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 bool CompositeRect(int dest_left, | 364 bool CompositeRect(int dest_left, |
| 365 int dest_top, | 365 int dest_top, |
| 366 int width, | 366 int width, |
| 367 int height, | 367 int height, |
| 368 uint32_t color, | 368 uint32_t color, |
| 369 int alpha_flag = 0, | 369 int alpha_flag = 0, |
| 370 void* pIccTransform = nullptr); | 370 void* pIccTransform = nullptr); |
| 371 | 371 |
| 372 bool ConvertColorScale(uint32_t forecolor, uint32_t backcolor); | 372 bool ConvertColorScale(uint32_t forecolor, uint32_t backcolor); |
| 373 | 373 |
| 374 #ifdef _SKIA_SUPPORT_PATHS_ | 374 #if defined _SKIA_SUPPORT_ || _SKIA_SUPPORT_PATHS_ |
| 375 bool IsMarkedForUnPreMultiply() const { return m_bUnPreMultiply; } | 375 void PreMultiply(); |
| 376 | 376 #endif |
| 377 void MarkForUnPreMultiply(bool mark) { m_bUnPreMultiply = mark; } | 377 #if defined _SKIA_SUPPORT_PATHS_ |
| 378 void UnPreMultiply(); |
| 378 #endif | 379 #endif |
| 379 | 380 |
| 380 protected: | 381 protected: |
| 381 bool GetGrayData(void* pIccTransform = nullptr); | 382 bool GetGrayData(void* pIccTransform = nullptr); |
| 382 | 383 |
| 384 #if defined _SKIA_SUPPORT_PATHS_ |
| 385 enum class Format { kCleared, kPreMultiplied, kUnPreMultiplied }; |
| 386 #endif |
| 387 |
| 383 uint8_t* m_pBuffer; | 388 uint8_t* m_pBuffer; |
| 389 #if defined _SKIA_SUPPORT_PATHS_ |
| 390 Format m_nFormat; |
| 391 #endif |
| 384 bool m_bExtBuf; | 392 bool m_bExtBuf; |
| 385 #ifdef _SKIA_SUPPORT_PATHS_ | |
| 386 bool m_bUnPreMultiply; | |
| 387 #endif | |
| 388 }; | 393 }; |
| 389 | 394 |
| 390 class CFX_DIBExtractor { | 395 class CFX_DIBExtractor { |
| 391 public: | 396 public: |
| 392 explicit CFX_DIBExtractor(const CFX_DIBSource* pSrc); | 397 explicit CFX_DIBExtractor(const CFX_DIBSource* pSrc); |
| 393 ~CFX_DIBExtractor(); | 398 ~CFX_DIBExtractor(); |
| 394 | 399 |
| 395 CFX_DIBitmap* GetBitmap() { return m_pBitmap.get(); } | 400 CFX_DIBitmap* GetBitmap() { return m_pBitmap.get(); } |
| 396 | 401 |
| 397 private: | 402 private: |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 int m_Status; | 685 int m_Status; |
| 681 FX_RECT m_ClipBox; | 686 FX_RECT m_ClipBox; |
| 682 uint32_t m_Flags; | 687 uint32_t m_Flags; |
| 683 int m_AlphaFlag; | 688 int m_AlphaFlag; |
| 684 void* m_pIccTransform; | 689 void* m_pIccTransform; |
| 685 bool m_bRgbByteOrder; | 690 bool m_bRgbByteOrder; |
| 686 int m_BlendType; | 691 int m_BlendType; |
| 687 }; | 692 }; |
| 688 | 693 |
| 689 #endif // CORE_FXGE_FX_DIB_H_ | 694 #endif // CORE_FXGE_FX_DIB_H_ |
| OLD | NEW |