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

Unified Diff: include/core/SkColorTable.h

Issue 611093002: remove alphatype from colortable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update codecs Created 6 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 | « bench/RepeatTileBench.cpp ('k') | include/core/SkPicture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkColorTable.h
diff --git a/include/core/SkColorTable.h b/include/core/SkColorTable.h
index c73b431921a07727e8710ddba166959af77a5fcd..00ef8548f6dbcb6bb9748c4d7517b54006f7dffa 100644
--- a/include/core/SkColorTable.h
+++ b/include/core/SkColorTable.h
@@ -26,16 +26,9 @@ public:
/** Makes a deep copy of colors.
*/
SkColorTable(const SkColorTable& src);
- SkColorTable(const SkPMColor colors[], int count,
- SkAlphaType alphaType = kPremul_SkAlphaType);
+ SkColorTable(const SkPMColor colors[], int count);
virtual ~SkColorTable();
- SkAlphaType alphaType() const { return (SkAlphaType)fAlphaType; }
-
- bool isOpaque() const {
- return SkAlphaTypeIsOpaque(this->alphaType());
- }
-
/** Returns the number of colors in the table.
*/
int count() const { return fCount; }
@@ -44,7 +37,7 @@ public:
the index is in range (0 <= index < count).
*/
SkPMColor operator[](int index) const {
- SkASSERT(fColors != NULL && (unsigned)index < fCount);
+ SkASSERT(fColors != NULL && (unsigned)index < (unsigned)fCount);
return fColors[index];
}
@@ -81,11 +74,12 @@ public:
private:
SkPMColor* fColors;
uint16_t* f16BitCache;
- uint16_t fCount;
- uint8_t fAlphaType;
+ int fCount;
SkDEBUGCODE(int fColorLockCount;)
SkDEBUGCODE(int f16BitCacheLockCount;)
+ void init(const SkPMColor* colors, int count);
+
void inval16BitCache();
typedef SkRefCnt INHERITED;
« no previous file with comments | « bench/RepeatTileBench.cpp ('k') | include/core/SkPicture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698