summaryrefslogtreecommitdiff
path: root/core/fxge/fx_dib.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-12-14 14:15:14 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-14 14:15:14 -0800
commit72c1bda4efaf0121e13b794cb886acd9806b6c89 (patch)
tree42930bca08650730ef2aba728799c9428edab79e /core/fxge/fx_dib.h
parent5e4388ef805b1666a1064e4dc73f4f1e792aa041 (diff)
downloadpdfium-72c1bda4efaf0121e13b794cb886acd9806b6c89.tar.xz
Return unique_ptr from GetAlphaMask.
Rename GetAlphaMask => CloneAlphaMask since it does more than get. Rename CopyAlphaMask => SetAlphaMask, as it copies IN, not OUT. ditto for CopyPalette => SetPalette. BUG= Review-Url: https://codereview.chromium.org/2572243002
Diffstat (limited to 'core/fxge/fx_dib.h')
-rw-r--r--core/fxge/fx_dib.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/fxge/fx_dib.h b/core/fxge/fx_dib.h
index ed2b47f9c1..c083bf732f 100644
--- a/core/fxge/fx_dib.h
+++ b/core/fxge/fx_dib.h
@@ -213,7 +213,8 @@ class CFX_DIBSource {
SetPaletteEntry(index, color);
}
- void CopyPalette(const uint32_t* pSrcPal);
+ // Copies into internally-owned palette.
+ void SetPalette(const uint32_t* pSrcPal);
std::unique_ptr<CFX_DIBitmap> Clone(const FX_RECT* pClip = nullptr) const;
std::unique_ptr<CFX_DIBitmap> CloneConvert(FXDIB_Format format) const;
@@ -229,9 +230,12 @@ class CFX_DIBSource {
uint32_t flags = 0,
const FX_RECT* pClip = nullptr) const;
- CFX_DIBitmap* GetAlphaMask(const FX_RECT* pClip = nullptr) const;
- bool CopyAlphaMask(const CFX_DIBSource* pAlphaMask,
- const FX_RECT* pClip = nullptr);
+ std::unique_ptr<CFX_DIBitmap> CloneAlphaMask(
+ const FX_RECT* pClip = nullptr) const;
+
+ // Copies into internally-owned mask.
+ bool SetAlphaMask(const CFX_DIBSource* pAlphaMask,
+ const FX_RECT* pClip = nullptr);
CFX_DIBitmap* SwapXY(bool bXFlip,
bool bYFlip,