Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: include/core/SkColorTable.h

Issue 1217573002: remove SkInstCnt (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkColorFilter.h ('k') | include/core/SkData.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "SkImageInfo.h" 15 #include "SkImageInfo.h"
16 #include "SkLazyPtr.h" 16 #include "SkLazyPtr.h"
17 17
18 /** \class SkColorTable 18 /** \class SkColorTable
19 19
20 SkColorTable holds an array SkPMColors (premultiplied 32-bit colors) used by 20 SkColorTable holds an array SkPMColors (premultiplied 32-bit colors) used by
21 8-bit bitmaps, where the bitmap bytes are interpreted as indices into the co lortable. 21 8-bit bitmaps, where the bitmap bytes are interpreted as indices into the co lortable.
22 22
23 SkColorTable is thread-safe. 23 SkColorTable is thread-safe.
24 */ 24 */
25 class SK_API SkColorTable : public SkRefCnt { 25 class SK_API SkColorTable : public SkRefCnt {
26 public: 26 public:
27 SK_DECLARE_INST_COUNT(SkColorTable)
28
29 /** Copy up to 256 colors into a new SkColorTable. 27 /** Copy up to 256 colors into a new SkColorTable.
30 */ 28 */
31 SkColorTable(const SkPMColor colors[], int count); 29 SkColorTable(const SkPMColor colors[], int count);
32 virtual ~SkColorTable(); 30 virtual ~SkColorTable();
33 31
34 /** Returns the number of colors in the table. 32 /** Returns the number of colors in the table.
35 */ 33 */
36 int count() const { return fCount; } 34 int count() const { return fCount; }
37 35
38 /** Returns the specified color from the table. In the debug build, this ass erts that 36 /** Returns the specified color from the table. In the debug build, this ass erts that
(...skipping 21 matching lines...) Expand all
60 SkPMColor* fColors; 58 SkPMColor* fColors;
61 SkLazyPtr<uint16_t, Free16BitCache> f16BitCache; 59 SkLazyPtr<uint16_t, Free16BitCache> f16BitCache;
62 int fCount; 60 int fCount;
63 61
64 void init(const SkPMColor* colors, int count); 62 void init(const SkPMColor* colors, int count);
65 63
66 typedef SkRefCnt INHERITED; 64 typedef SkRefCnt INHERITED;
67 }; 65 };
68 66
69 #endif 67 #endif
OLDNEW
« no previous file with comments | « include/core/SkColorFilter.h ('k') | include/core/SkData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698