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

Unified Diff: src/codec/SkMasks.h

Issue 1364463005: Avoid copies in SkMasks constructor (Closed) Base URL: https://skia.googlesource.com/skia.git@codecSDmerge
Patch Set: Rebase Created 5 years, 3 months 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 | « no previous file | src/codec/SkMasks.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkMasks.h
diff --git a/src/codec/SkMasks.h b/src/codec/SkMasks.h
index 082370466828009f781f6cbdb20d07d7379b6504..9606cbfbeb9760a64ad33e7656f50ea59fe20a15 100644
--- a/src/codec/SkMasks.h
+++ b/src/codec/SkMasks.h
@@ -52,10 +52,10 @@ public:
* Get a color component
*
*/
- uint8_t getRed(uint32_t pixel);
- uint8_t getGreen(uint32_t pixel);
- uint8_t getBlue(uint32_t pixel);
- uint8_t getAlpha(uint32_t pixel);
+ uint8_t getRed(uint32_t pixel) const;
+ uint8_t getGreen(uint32_t pixel) const;
+ uint8_t getBlue(uint32_t pixel) const;
+ uint8_t getAlpha(uint32_t pixel) const;
/*
*
@@ -63,7 +63,7 @@ public:
* The alpha mask may be used in other decoding modes
*
*/
- uint32_t getAlphaMask() {
+ uint32_t getAlphaMask() const {
return fAlpha.mask;
}
@@ -71,11 +71,11 @@ private:
/*
*
- * Constrcutor
+ * Constructor
*
*/
- SkMasks(const MaskInfo red, const MaskInfo green, const MaskInfo blue,
- const MaskInfo alpha);
+ SkMasks(const MaskInfo& red, const MaskInfo& green, const MaskInfo& blue,
+ const MaskInfo& alpha);
const MaskInfo fRed;
const MaskInfo fGreen;
« no previous file with comments | « no previous file | src/codec/SkMasks.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698