| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkColorTable_DEFINED | 10 #ifndef SkColorTable_DEFINED |
| 11 #define SkColorTable_DEFINED | 11 #define SkColorTable_DEFINED |
| 12 | 12 |
| 13 #include "SkColor.h" | 13 #include "SkColor.h" |
| 14 #include "SkFlattenable.h" | 14 #include "SkFlattenable.h" |
| 15 | 15 |
| 16 /** \class SkColorTable | 16 /** \class SkColorTable |
| 17 | 17 |
| 18 SkColorTable holds an array SkPMColors (premultiplied 32-bit colors) used by | 18 SkColorTable holds an array SkPMColors (premultiplied 32-bit colors) used by |
| 19 8-bit bitmaps, where the bitmap bytes are interpreted as indices into the co
lortable. | 19 8-bit bitmaps, where the bitmap bytes are interpreted as indices into the co
lortable. |
| 20 */ | 20 */ |
| 21 class SkColorTable : public SkFlattenable { | 21 class SkColorTable : public SkFlattenable { |
| 22 typedef SkFlattenable INHERITED; |
| 23 |
| 22 public: | 24 public: |
| 23 SK_DECLARE_INST_COUNT(SkColorTable) | 25 SK_DECLARE_INST_COUNT(SkColorTable) |
| 24 | 26 |
| 25 /** Makes a deep copy of colors. | 27 /** Makes a deep copy of colors. |
| 26 */ | 28 */ |
| 27 SkColorTable(const SkColorTable& src); | 29 SkColorTable(const SkColorTable& src); |
| 28 /** Preallocates the colortable to have 'count' colors, which | 30 /** Preallocates the colortable to have 'count' colors, which |
| 29 * are initially set to 0. | 31 * are initially set to 0. |
| 30 */ | 32 */ |
| 31 explicit SkColorTable(int count); | 33 explicit SkColorTable(int count); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 100 |
| 99 private: | 101 private: |
| 100 SkPMColor* fColors; | 102 SkPMColor* fColors; |
| 101 uint16_t* f16BitCache; | 103 uint16_t* f16BitCache; |
| 102 uint16_t fCount; | 104 uint16_t fCount; |
| 103 uint8_t fFlags; | 105 uint8_t fFlags; |
| 104 SkDEBUGCODE(int fColorLockCount;) | 106 SkDEBUGCODE(int fColorLockCount;) |
| 105 SkDEBUGCODE(int f16BitCacheLockCount;) | 107 SkDEBUGCODE(int f16BitCacheLockCount;) |
| 106 | 108 |
| 107 void inval16BitCache(); | 109 void inval16BitCache(); |
| 108 | |
| 109 typedef SkFlattenable INHERITED; | |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 #endif | 112 #endif |
| OLD | NEW |