Index: include/core/SkColorTable.h |
diff --git a/include/core/SkColorTable.h b/include/core/SkColorTable.h |
index ff2bf7cde205e895300a9e816dff407c3c382bb4..c6ca1e961f83f23c5f2b539d1e0279776d02ca1c 100644 |
--- a/include/core/SkColorTable.h |
+++ b/include/core/SkColorTable.h |
@@ -10,10 +10,10 @@ |
#ifndef SkColorTable_DEFINED |
#define SkColorTable_DEFINED |
-#include "../private/SkOncePtr.h" |
#include "SkColor.h" |
#include "SkFlattenable.h" |
#include "SkImageInfo.h" |
+#include "SkLazyPtr.h" |
/** \class SkColorTable |
@@ -55,16 +55,16 @@ |
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); |
- struct Free16BitCache { void operator()(uint16_t* cache) const { sk_free(cache); } }; |
- |
SkPMColor* fColors; |
- SkOncePtr<uint16_t, Free16BitCache> f16BitCache; |
+ SkLazyPtr<uint16_t, Free16BitCache> f16BitCache; |
int fCount; |
void init(const SkPMColor* colors, int count); |