diff options
author | Lei Zhang <thestig@chromium.org> | 2018-09-19 17:26:54 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-09-19 17:26:54 +0000 |
commit | 174de19776de251aed79220742ecde3e2e435fed (patch) | |
tree | 370894c812460b9f45fca904503eadc0322c6089 /core/fpdfapi/render/cpdf_imageloader.h | |
parent | 5f2ea0f6ef587f9f7a2fec9f80dbc82b94c97400 (diff) | |
download | pdfium-174de19776de251aed79220742ecde3e2e435fed.tar.xz |
Encapsulate CPDF_ImageLoader.
Change-Id: Iee7ce04630fed86f651cd382a19e46b2f7ab6d61
Reviewed-on: https://pdfium-review.googlesource.com/42672
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_imageloader.h')
-rw-r--r-- | core/fpdfapi/render/cpdf_imageloader.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/core/fpdfapi/render/cpdf_imageloader.h b/core/fpdfapi/render/cpdf_imageloader.h index de29d0e2a9..7586d69cc2 100644 --- a/core/fpdfapi/render/cpdf_imageloader.h +++ b/core/fpdfapi/render/cpdf_imageloader.h @@ -16,6 +16,7 @@ class CPDF_ImageObject; class CPDF_PageRenderCache; class CPDF_RenderStatus; +class CPDF_TransferFunc; class PauseIndicatorIface; class CPDF_ImageLoader { @@ -31,14 +32,21 @@ class CPDF_ImageLoader { CPDF_RenderStatus* pRenderStatus); bool Continue(PauseIndicatorIface* pPause, CPDF_RenderStatus* pRenderStatus); - RetainPtr<CFX_DIBBase> m_pBitmap; - RetainPtr<CFX_DIBBase> m_pMask; - uint32_t m_MatteColor; - bool m_bCached; + RetainPtr<CFX_DIBBase> TranslateImage( + const RetainPtr<CPDF_TransferFunc>& pTransferFunc); + + const RetainPtr<CFX_DIBBase>& GetBitmap() const { return m_pBitmap; } + const RetainPtr<CFX_DIBBase>& GetMask() const { return m_pMask; } + uint32_t MatteColor() const { return m_MatteColor; } private: void HandleFailure(); + RetainPtr<CFX_DIBBase> m_pBitmap; + RetainPtr<CFX_DIBBase> m_pMask; + uint32_t m_MatteColor = 0; + bool m_bCached = false; + UnownedPtr<CPDF_PageRenderCache> m_pCache; UnownedPtr<CPDF_ImageObject> m_pImageObject; }; |