summaryrefslogtreecommitdiff
path: root/core/fxge/dib/cfx_dibitmap.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2018-04-16 20:25:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-16 20:25:17 +0000
commit846fb0301a146319826a04c4a6e2fafadf92813a (patch)
treee1c38c4eeda8832b17e5550aa6b40be8b995e869 /core/fxge/dib/cfx_dibitmap.h
parent219b0a63fad9dd99ad0bd79b721edf64996ac467 (diff)
downloadpdfium-846fb0301a146319826a04c4a6e2fafadf92813a.tar.xz
Simplify CFX_DIBitmap::TransferBitmap
This CL changes CFX_DIBitmap::TransferBitmap so that the exception cases are handled before, and early returns are used to reduce nesting. Change-Id: I733adce5de15d345ee160a8b250133836e9d2873 Reviewed-on: https://pdfium-review.googlesource.com/30770 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/dib/cfx_dibitmap.h')
-rw-r--r--core/fxge/dib/cfx_dibitmap.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/core/fxge/dib/cfx_dibitmap.h b/core/fxge/dib/cfx_dibitmap.h
index 00a145af68..105a22d76e 100644
--- a/core/fxge/dib/cfx_dibitmap.h
+++ b/core/fxge/dib/cfx_dibitmap.h
@@ -124,6 +124,28 @@ class CFX_DIBitmap : public CFX_DIBSource {
private:
void ConvertBGRColorScale(uint32_t forecolor, uint32_t backcolor);
void ConvertCMYKColorScale(uint32_t forecolor, uint32_t backcolor);
+ bool TransferWithUnequalFormats(FXDIB_Format dest_format,
+ int dest_left,
+ int dest_top,
+ int width,
+ int height,
+ const RetainPtr<CFX_DIBSource>& pSrcBitmap,
+ int src_left,
+ int src_top);
+ void TransferWithMultipleBPP(int dest_left,
+ int dest_top,
+ int width,
+ int height,
+ const RetainPtr<CFX_DIBSource>& pSrcBitmap,
+ int src_left,
+ int src_top);
+ void TransferEqualFormatsOneBPP(int dest_left,
+ int dest_top,
+ int width,
+ int height,
+ const RetainPtr<CFX_DIBSource>& pSrcBitmap,
+ int src_left,
+ int src_top);
};
#endif // CORE_FXGE_DIB_CFX_DIBITMAP_H_