diff options
author | Nicolas Pena <npm@chromium.org> | 2017-03-31 14:38:21 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-31 18:51:22 +0000 |
commit | ac66da22f47bd9081652f235754edad59ef876f3 (patch) | |
tree | 8887e6b2d5c2fbc57bb06cc3e75b01b32e99f50a /core/fxge/dib/cfx_scanlinecompositor.h | |
parent | fcdb2df009796a78369a7fe8bcaab76b27f5450b (diff) | |
download | pdfium-ac66da22f47bd9081652f235754edad59ef876f3.tar.xz |
Split fx_dib.h part 2chromium/3059
- Created cpp for CFX_FilteredDIB.
- Moved CFX_ScanLineCompositor to its own files.
Change-Id: I020e44a9e824d497db4526893d61eb3819af4059
Reviewed-on: https://pdfium-review.googlesource.com/3550
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/dib/cfx_scanlinecompositor.h')
-rw-r--r-- | core/fxge/dib/cfx_scanlinecompositor.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/core/fxge/dib/cfx_scanlinecompositor.h b/core/fxge/dib/cfx_scanlinecompositor.h new file mode 100644 index 0000000000..2401bc5da8 --- /dev/null +++ b/core/fxge/dib/cfx_scanlinecompositor.h @@ -0,0 +1,74 @@ +// Copyright 2017 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXGE_DIB_CFX_SCANLINECOMPOSITOR_H_ +#define CORE_FXGE_DIB_CFX_SCANLINECOMPOSITOR_H_ + +#include "core/fxge/dib/cfx_dibsource.h" + +class CFX_ScanlineCompositor { + public: + CFX_ScanlineCompositor(); + + ~CFX_ScanlineCompositor(); + + bool Init(FXDIB_Format dest_format, + FXDIB_Format src_format, + int32_t width, + uint32_t* pSrcPalette, + uint32_t mask_color, + int blend_type, + bool bClip, + bool bRgbByteOrder = false, + int alpha_flag = 0, + void* pIccTransform = nullptr); + + void CompositeRgbBitmapLine(uint8_t* dest_scan, + const uint8_t* src_scan, + int width, + const uint8_t* clip_scan, + const uint8_t* src_extra_alpha = nullptr, + uint8_t* dst_extra_alpha = nullptr); + + void CompositePalBitmapLine(uint8_t* dest_scan, + const uint8_t* src_scan, + int src_left, + int width, + const uint8_t* clip_scan, + const uint8_t* src_extra_alpha = nullptr, + uint8_t* dst_extra_alpha = nullptr); + + void CompositeByteMaskLine(uint8_t* dest_scan, + const uint8_t* src_scan, + int width, + const uint8_t* clip_scan, + uint8_t* dst_extra_alpha = nullptr); + + void CompositeBitMaskLine(uint8_t* dest_scan, + const uint8_t* src_scan, + int src_left, + int width, + const uint8_t* clip_scan, + uint8_t* dst_extra_alpha = nullptr); + + private: + int m_Transparency; + FXDIB_Format m_SrcFormat; + FXDIB_Format m_DestFormat; + uint32_t* m_pSrcPalette; + int m_MaskAlpha; + int m_MaskRed; + int m_MaskGreen; + int m_MaskBlue; + int m_MaskBlack; + int m_BlendType; + void* m_pIccTransform; + uint8_t* m_pCacheScanline; + int m_CacheSize; + bool m_bRgbByteOrder; +}; + +#endif // CORE_FXGE_DIB_CFX_SCANLINECOMPOSITOR_H_ |