Chromium Code Reviews| Index: src/core/SkColorTable.cpp |
| diff --git a/src/core/SkColorTable.cpp b/src/core/SkColorTable.cpp |
| index 4d0a7950b294886f10cca13f95a8eaedca7650cd..e9e32d99bd54d94f829a3352aa54629f009fb8d3 100644 |
| --- a/src/core/SkColorTable.cpp |
| +++ b/src/core/SkColorTable.cpp |
| @@ -73,7 +73,8 @@ static inline void build_16bitcache(uint16_t dst[], const SkPMColor src[], |
| } |
| const uint16_t* SkColorTable::lock16BitCache() { |
| - if (this->isOpaque() && NULL == f16BitCache) { |
| + SkASSERT(this->isOpaque()); |
|
reed1
2014/09/29 14:16:00
// Assert that we're opaque, since our 16bit will
|
| + if (NULL == f16BitCache) { |
| f16BitCache = (uint16_t*)sk_malloc_throw(fCount * sizeof(uint16_t)); |
| build_16bitcache(f16BitCache, fColors, fCount); |
| } |