Index: include/core/SkColorTable.h |
diff --git a/include/core/SkColorTable.h b/include/core/SkColorTable.h |
index 31891e940182fb98fb0064371fe8ded6bb81c073..c6ca1e961f83f23c5f2b539d1e0279776d02ca1c 100644 |
--- a/include/core/SkColorTable.h |
+++ b/include/core/SkColorTable.h |
@@ -49,12 +49,20 @@ public: |
*/ |
const uint16_t* read16BitCache() const; |
- explicit SkColorTable(SkReadBuffer&); |
void writeToBuffer(SkWriteBuffer&) const; |
+ // may return null |
+ static SkColorTable* Create(SkReadBuffer&); |
+ |
private: |
static void Free16BitCache(uint16_t*); |
+ enum AllocatedWithMalloc { |
+ kAllocatedWithMalloc |
+ }; |
+ // assumes ownership of colors (assumes it was allocated w/ malloc) |
+ SkColorTable(SkPMColor* colors, int count, AllocatedWithMalloc); |
+ |
SkPMColor* fColors; |
SkLazyPtr<uint16_t, Free16BitCache> f16BitCache; |
int fCount; |