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

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

Issue 134163010: Refactor read and write buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: original write flags were fine Created 6 years, 10 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 Also, unlike lockColors(), the returned array here cannot be modified. 68 Also, unlike lockColors(), the returned array here cannot be modified.
69 */ 69 */
70 const uint16_t* lock16BitCache(); 70 const uint16_t* lock16BitCache();
71 /** Balancing call to lock16BitCache(). 71 /** Balancing call to lock16BitCache().
72 */ 72 */
73 void unlock16BitCache() { 73 void unlock16BitCache() {
74 SkASSERT(f16BitCacheLockCount > 0); 74 SkASSERT(f16BitCacheLockCount > 0);
75 SkDEBUGCODE(f16BitCacheLockCount -= 1); 75 SkDEBUGCODE(f16BitCacheLockCount -= 1);
76 } 76 }
77 77
78 explicit SkColorTable(SkFlattenableReadBuffer&); 78 explicit SkColorTable(SkReadBuffer&);
79 void writeToBuffer(SkFlattenableWriteBuffer&) const; 79 void writeToBuffer(SkWriteBuffer&) const;
80 80
81 private: 81 private:
82 SkPMColor* fColors; 82 SkPMColor* fColors;
83 uint16_t* f16BitCache; 83 uint16_t* f16BitCache;
84 uint16_t fCount; 84 uint16_t fCount;
85 uint8_t fAlphaType; 85 uint8_t fAlphaType;
86 SkDEBUGCODE(int fColorLockCount;) 86 SkDEBUGCODE(int fColorLockCount;)
87 SkDEBUGCODE(int f16BitCacheLockCount;) 87 SkDEBUGCODE(int f16BitCacheLockCount;)
88 88
89 void inval16BitCache(); 89 void inval16BitCache();
90 90
91 typedef SkRefCnt INHERITED; 91 typedef SkRefCnt INHERITED;
92 }; 92 };
93 93
94 #endif 94 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698