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

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

Issue 1432503003: Comments Style: s/skbug.com/bug.skia.org/ (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: include Created 5 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 | « src/core/SkImageCacherator.cpp ('k') | src/core/SkRRect.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 #include "SkImageGenerator.h" 8 #include "SkImageGenerator.h"
9 #include "SkNextID.h" 9 #include "SkNextID.h"
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 if (!bitmap->setInfo(info)) { 141 if (!bitmap->setInfo(info)) {
142 return reset_and_return_false(bitmap); 142 return reset_and_return_false(bitmap);
143 } 143 }
144 144
145 SkPMColor ctStorage[256]; 145 SkPMColor ctStorage[256];
146 memset(ctStorage, 0xFF, sizeof(ctStorage)); // init with opaque-white for th e moment 146 memset(ctStorage, 0xFF, sizeof(ctStorage)); // init with opaque-white for th e moment
147 SkAutoTUnref<SkColorTable> ctable(new SkColorTable(ctStorage, 256)); 147 SkAutoTUnref<SkColorTable> ctable(new SkColorTable(ctStorage, 256));
148 if (!bitmap->tryAllocPixels(allocator, ctable)) { 148 if (!bitmap->tryAllocPixels(allocator, ctable)) {
149 // SkResourceCache's custom allcator can'thandle ctables, so it may fail on 149 // SkResourceCache's custom allcator can'thandle ctables, so it may fail on
150 // kIndex_8_SkColorTable. 150 // kIndex_8_SkColorTable.
151 // skbug.com/4355 151 // https://bug.skia.org/4355
152 #if 1 152 #if 1
153 // ignroe the allocator, and see if we can succeed without it 153 // ignroe the allocator, and see if we can succeed without it
154 if (!bitmap->tryAllocPixels(nullptr, ctable)) { 154 if (!bitmap->tryAllocPixels(nullptr, ctable)) {
155 return reset_and_return_false(bitmap); 155 return reset_and_return_false(bitmap);
156 } 156 }
157 #else 157 #else
158 // this is the up-scale technique, not fully debugged, but we keep it he re at the moment 158 // this is the up-scale technique, not fully debugged, but we keep it he re at the moment
159 // to remind ourselves that this might be better than ignoring the alloc ator. 159 // to remind ourselves that this might be better than ignoring the alloc ator.
160 160
161 info = SkImageInfo::MakeN32(info.width(), info.height(), info.alphaType( )); 161 info = SkImageInfo::MakeN32(info.width(), info.height(), info.alphaType( ));
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 if (nullptr == data) { 214 if (nullptr == data) {
215 return nullptr; 215 return nullptr;
216 } 216 }
217 if (gFactory) { 217 if (gFactory) {
218 if (SkImageGenerator* generator = gFactory(data)) { 218 if (SkImageGenerator* generator = gFactory(data)) {
219 return generator; 219 return generator;
220 } 220 }
221 } 221 }
222 return SkImageGenerator::NewFromEncodedImpl(data); 222 return SkImageGenerator::NewFromEncodedImpl(data);
223 } 223 }
OLDNEW
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/core/SkRRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698