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

Side by Side Diff: src/core/SkColorTable.cpp

Issue 27392002: Remove SkColorTable from SkFlattenable hierarchy. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: reupload Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkColorTable.h ('k') | src/core/SkMallocPixelRef.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 2009 The Android Open Source Project 3 * Copyright 2009 The Android Open Source Project
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 #include "SkColorTable.h" 10 #include "SkColorTable.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 fAlphaType = SkToU8(buffer.readUInt()); 93 fAlphaType = SkToU8(buffer.readUInt());
94 fCount = buffer.getArrayCount(); 94 fCount = buffer.getArrayCount();
95 fColors = (SkPMColor*)sk_malloc_throw(fCount * sizeof(SkPMColor)); 95 fColors = (SkPMColor*)sk_malloc_throw(fCount * sizeof(SkPMColor));
96 SkDEBUGCODE(const uint32_t countRead =) buffer.readColorArray(fColors); 96 SkDEBUGCODE(const uint32_t countRead =) buffer.readColorArray(fColors);
97 #ifdef SK_DEBUG 97 #ifdef SK_DEBUG
98 SkASSERT((unsigned)fCount <= 256); 98 SkASSERT((unsigned)fCount <= 256);
99 SkASSERT(countRead == fCount); 99 SkASSERT(countRead == fCount);
100 #endif 100 #endif
101 } 101 }
102 102
103 void SkColorTable::flatten(SkFlattenableWriteBuffer& buffer) const { 103 void SkColorTable::writeToBuffer(SkFlattenableWriteBuffer& buffer) const {
104 buffer.writeUInt(fAlphaType); 104 buffer.writeUInt(fAlphaType);
105 buffer.writeColorArray(fColors, fCount); 105 buffer.writeColorArray(fColors, fCount);
106 } 106 }
OLDNEW
« no previous file with comments | « include/core/SkColorTable.h ('k') | src/core/SkMallocPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698