Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: core/fxge/fx_dib.h

Issue 2572243002: Return unique_ptr from GetAlphaMask. (Closed)
Patch Set: rebase, nits, typo. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxge/dib/fx_dib_transform.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/fx_dib.h
diff --git a/core/fxge/fx_dib.h b/core/fxge/fx_dib.h
index ed2b47f9c140174f7792df675d25a238e8e5124e..c083bf732fd94e535438976efeeb7cbc8c4fe849 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,
« no previous file with comments | « core/fxge/dib/fx_dib_transform.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698