| Index: include/core/SkColorTable.h
|
| diff --git a/include/core/SkColorTable.h b/include/core/SkColorTable.h
|
| index cb613befb1756499a48ca882cf5ecee794c2901f..ccea7ed550bf05b64fd05f0cfc38bc077c6ba4e1 100644
|
| --- a/include/core/SkColorTable.h
|
| +++ b/include/core/SkColorTable.h
|
| @@ -67,6 +67,17 @@ private:
|
|
|
| void init(const SkPMColor* colors, int count);
|
|
|
| + friend class SkImageGenerator;
|
| + // Only call if no other thread or cache has seen this table.
|
| + void dangerous_overwriteColors(const SkPMColor newColors[], int count) {
|
| + if (count < 0 || count > fCount) {
|
| + sk_throw();
|
| + }
|
| + // assumes that f16BitCache nas NOT been initialized yet, so we don't try to update it
|
| + memcpy(fColors, newColors, count * sizeof(SkPMColor));
|
| + fCount = count; // update fCount, in case count is smaller
|
| + }
|
| +
|
| typedef SkRefCnt INHERITED;
|
| };
|
|
|
|
|