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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 void GetOverlapRect(int& dest_left, | 241 void GetOverlapRect(int& dest_left, |
242 int& dest_top, | 242 int& dest_top, |
243 int& width, | 243 int& width, |
244 int& height, | 244 int& height, |
245 int src_width, | 245 int src_width, |
246 int src_height, | 246 int src_height, |
247 int& src_left, | 247 int& src_left, |
248 int& src_top, | 248 int& src_top, |
249 const CFX_ClipRgn* pClipRgn); | 249 const CFX_ClipRgn* pClipRgn); |
250 | 250 |
251 #if defined _SKIA_SUPPORT_ | 251 #if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_ |
252 void DebugVerifyBitmapIsPreMultiplied(void* buffer = nullptr) const; | 252 void DebugVerifyBitmapIsPreMultiplied(void* buffer = nullptr) const; |
253 #endif | 253 #endif |
254 | 254 |
255 CFX_DIBitmap* m_pAlphaMask; | 255 CFX_DIBitmap* m_pAlphaMask; |
256 | 256 |
257 protected: | 257 protected: |
258 CFX_DIBSource(); | 258 CFX_DIBSource(); |
259 | 259 |
260 void BuildPalette(); | 260 void BuildPalette(); |
261 bool BuildAlphaMask(); | 261 bool BuildAlphaMask(); |
(...skipping 102 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_ |
| 375 bool IsMarkedForUnPreMultiply() const { return m_bUnPreMultiply; } |
| 376 |
| 377 void MarkForUnPreMultiply(bool mark) { m_bUnPreMultiply = mark; } |
| 378 #endif |
| 379 |
374 protected: | 380 protected: |
375 bool GetGrayData(void* pIccTransform = nullptr); | 381 bool GetGrayData(void* pIccTransform = nullptr); |
376 | 382 |
377 uint8_t* m_pBuffer; | 383 uint8_t* m_pBuffer; |
378 bool m_bExtBuf; | 384 bool m_bExtBuf; |
| 385 #ifdef _SKIA_SUPPORT_PATHS_ |
| 386 bool m_bUnPreMultiply; |
| 387 #endif |
379 }; | 388 }; |
380 | 389 |
381 class CFX_DIBExtractor { | 390 class CFX_DIBExtractor { |
382 public: | 391 public: |
383 explicit CFX_DIBExtractor(const CFX_DIBSource* pSrc); | 392 explicit CFX_DIBExtractor(const CFX_DIBSource* pSrc); |
384 ~CFX_DIBExtractor(); | 393 ~CFX_DIBExtractor(); |
385 | 394 |
386 CFX_DIBitmap* GetBitmap() { return m_pBitmap.get(); } | 395 CFX_DIBitmap* GetBitmap() { return m_pBitmap.get(); } |
387 | 396 |
388 private: | 397 private: |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 int m_Status; | 680 int m_Status; |
672 FX_RECT m_ClipBox; | 681 FX_RECT m_ClipBox; |
673 uint32_t m_Flags; | 682 uint32_t m_Flags; |
674 int m_AlphaFlag; | 683 int m_AlphaFlag; |
675 void* m_pIccTransform; | 684 void* m_pIccTransform; |
676 bool m_bRgbByteOrder; | 685 bool m_bRgbByteOrder; |
677 int m_BlendType; | 686 int m_BlendType; |
678 }; | 687 }; |
679 | 688 |
680 #endif // CORE_FXGE_FX_DIB_H_ | 689 #endif // CORE_FXGE_FX_DIB_H_ |
OLD | NEW |