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

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

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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
« no previous file with comments | « src/core/SkMiniRecorder.cpp ('k') | src/core/SkMultiPictureDraw.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 2013 Google Inc. 2 * Copyright 2013 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 "SkMipMap.h" 8 #include "SkMipMap.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 if (NULL == srcPixmap.addr()) { 243 if (NULL == srcPixmap.addr()) {
244 sk_throw(); 244 sk_throw();
245 } 245 }
246 246
247 SkMipMap* mipmap; 247 SkMipMap* mipmap;
248 if (fact) { 248 if (fact) {
249 SkDiscardableMemory* dm = fact(storageSize); 249 SkDiscardableMemory* dm = fact(storageSize);
250 if (NULL == dm) { 250 if (NULL == dm) {
251 return NULL; 251 return NULL;
252 } 252 }
253 mipmap = SkNEW_ARGS(SkMipMap, (storageSize, dm)); 253 mipmap = new SkMipMap(storageSize, dm);
254 } else { 254 } else {
255 mipmap = SkNEW_ARGS(SkMipMap, (sk_malloc_throw(storageSize), storageSize )); 255 mipmap = new SkMipMap(sk_malloc_throw(storageSize), storageSize);
256 } 256 }
257 257
258 // init 258 // init
259 mipmap->fCount = countLevels; 259 mipmap->fCount = countLevels;
260 mipmap->fLevels = (Level*)mipmap->writable_data(); 260 mipmap->fLevels = (Level*)mipmap->writable_data();
261 261
262 Level* levels = mipmap->fLevels; 262 Level* levels = mipmap->fLevels;
263 uint8_t* baseAddr = (uint8_t*)&levels[countLevels]; 263 uint8_t* baseAddr = (uint8_t*)&levels[countLevels];
264 uint8_t* addr = baseAddr; 264 uint8_t* addr = baseAddr;
265 int width = src.width(); 265 int width = src.width();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 } 344 }
345 345
346 if (level > fCount) { 346 if (level > fCount) {
347 level = fCount; 347 level = fCount;
348 } 348 }
349 if (levelPtr) { 349 if (levelPtr) {
350 *levelPtr = fLevels[level - 1]; 350 *levelPtr = fLevels[level - 1];
351 } 351 }
352 return true; 352 return true;
353 } 353 }
OLDNEW
« no previous file with comments | « src/core/SkMiniRecorder.cpp ('k') | src/core/SkMultiPictureDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698