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

Side by Side Diff: src/codec/SkGifCodec.cpp

Issue 2447223002: SK_FIX_BUILD (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | 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 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 /* 8 /*
9 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 9 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
10 * 10 *
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 return result; 139 return result;
140 } 140 }
141 141
142 void SkGifCodec::initializeColorTable(const SkImageInfo& dstInfo, size_t frameIn dex, 142 void SkGifCodec::initializeColorTable(const SkImageInfo& dstInfo, size_t frameIn dex,
143 SkPMColor* inputColorPtr, int* inputColorCount) { 143 SkPMColor* inputColorPtr, int* inputColorCount) {
144 fCurrColorTable = fReader->getColorTable(dstInfo.colorType(), frameIndex); 144 fCurrColorTable = fReader->getColorTable(dstInfo.colorType(), frameIndex);
145 fCurrColorTableIsReal = fCurrColorTable; 145 fCurrColorTableIsReal = fCurrColorTable;
146 if (!fCurrColorTable) { 146 if (!fCurrColorTable) {
147 // This is possible for an empty frame. Create a dummy with all transpar ent. 147 // This is possible for an empty frame. Create a dummy with all transpar ent.
148 SkPMColor colors[MAX_COLORS]; 148 SkPMColor colors[SK_MAX_COLORS];
149 sk_memset32(colors, SK_ColorTRANSPARENT, MAX_COLORS); 149 sk_memset32(colors, SK_ColorTRANSPARENT, SK_MAX_COLORS);
150 fCurrColorTable.reset(new SkColorTable(colors, 256)); 150 fCurrColorTable.reset(new SkColorTable(colors, 256));
151 } 151 }
152 152
153 if (inputColorCount) { 153 if (inputColorCount) {
154 *inputColorCount = fCurrColorTable->count(); 154 *inputColorCount = fCurrColorTable->count();
155 } 155 }
156 156
157 copy_color_table(dstInfo, fCurrColorTable.get(), inputColorPtr, inputColorCo unt); 157 copy_color_table(dstInfo, fCurrColorTable.get(), inputColorPtr, inputColorCo unt);
158 } 158 }
159 159
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 void* copiedLine = SkTAddOffset<void>(dstLine, fSwizzler->swizzleOffsetB ytes()); 556 void* copiedLine = SkTAddOffset<void>(dstLine, fSwizzler->swizzleOffsetB ytes());
557 void* dst = copiedLine; 557 void* dst = copiedLine;
558 for (unsigned i = 1; i < repeatCount; i++) { 558 for (unsigned i = 1; i < repeatCount; i++) {
559 dst = SkTAddOffset<void>(dst, fDstRowBytes); 559 dst = SkTAddOffset<void>(dst, fDstRowBytes);
560 memcpy(dst, copiedLine, bytesToCopy); 560 memcpy(dst, copiedLine, bytesToCopy);
561 } 561 }
562 } 562 }
563 563
564 return true; 564 return true;
565 } 565 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698