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

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

Issue 750583002: Revert of Add MultiPictureDraw to nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « bench/nanobench.cpp ('k') | src/core/SkBitmap.cpp » ('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
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 /** Similar to lockColors(), lock16BitCache() returns the array of 58 /** Similar to lockColors(), lock16BitCache() returns the array of
59 RGB16 colors that mirror the 32bit colors. However, this function 59 RGB16 colors that mirror the 32bit colors. However, this function
60 will return null if kColorsAreOpaque_Flag is not set. 60 will return null if kColorsAreOpaque_Flag is not set.
61 Also, unlike lockColors(), the returned array here cannot be modified. 61 Also, unlike lockColors(), the returned array here cannot be modified.
62 */ 62 */
63 const uint16_t* lock16BitCache(); 63 const uint16_t* lock16BitCache();
64 /** Balancing call to lock16BitCache(). 64 /** Balancing call to lock16BitCache().
65 */ 65 */
66 void unlock16BitCache() { 66 void unlock16BitCache() {
67 SkASSERT(f16BitCacheLockCount > 0); 67 SkASSERT(f16BitCacheLockCount > 0);
68 SkDEBUGCODE(sk_atomic_dec(&f16BitCacheLockCount);) 68 SkDEBUGCODE(f16BitCacheLockCount -= 1);
69 } 69 }
70 70
71 explicit SkColorTable(SkReadBuffer&); 71 explicit SkColorTable(SkReadBuffer&);
72 void writeToBuffer(SkWriteBuffer&) const; 72 void writeToBuffer(SkWriteBuffer&) const;
73 73
74 private: 74 private:
75 SkPMColor* fColors; 75 SkPMColor* fColors;
76 uint16_t* f16BitCache; 76 uint16_t* f16BitCache;
77 int fCount; 77 int fCount;
78 SkDEBUGCODE(int fColorLockCount;) 78 SkDEBUGCODE(int fColorLockCount;)
79 SkDEBUGCODE(int f16BitCacheLockCount;) 79 SkDEBUGCODE(int f16BitCacheLockCount;)
80 80
81 void init(const SkPMColor* colors, int count); 81 void init(const SkPMColor* colors, int count);
82 82
83 void inval16BitCache(); 83 void inval16BitCache();
84 84
85 typedef SkRefCnt INHERITED; 85 typedef SkRefCnt INHERITED;
86 }; 86 };
87 87
88 #endif 88 #endif
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698