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

Side by Side Diff: src/image/SkImage.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/gpu/gl/win/SkCreatePlatformGLContext_win.cpp ('k') | src/image/SkImage_Gpu.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 2012 Google Inc. 2 * Copyright 2012 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 SkAutoTUnref<GrTexture> unrefCopy; 240 SkAutoTUnref<GrTexture> unrefCopy;
241 if (!bm.isImmutable()) { 241 if (!bm.isImmutable()) {
242 const bool notBudgeted = false; 242 const bool notBudgeted = false;
243 tex = GrDeepCopyTexture(tex, notBudgeted); 243 tex = GrDeepCopyTexture(tex, notBudgeted);
244 if (NULL == tex) { 244 if (NULL == tex) {
245 return NULL; 245 return NULL;
246 } 246 }
247 unrefCopy.reset(tex); 247 unrefCopy.reset(tex);
248 } 248 }
249 const SkImageInfo info = bm.info(); 249 const SkImageInfo info = bm.info();
250 return SkNEW_ARGS(SkImage_Gpu, (info.width(), info.height(), bm.getGener ationID(), 250 return new SkImage_Gpu(info.width(), info.height(), bm.getGenerationID() , info.alphaType(),
251 info.alphaType(), tex, 0, SkSurface::kNo _Budgeted)); 251 tex, 0, SkSurface::kNo_Budgeted);
252 } 252 }
253 #endif 253 #endif
254 254
255 // This will check for immutable (share or copy) 255 // This will check for immutable (share or copy)
256 return SkNewImageFromRasterBitmap(bm, nullptr); 256 return SkNewImageFromRasterBitmap(bm, nullptr);
257 } 257 }
258 258
259 bool SkImage::asLegacyBitmap(SkBitmap* bitmap, LegacyBitmapMode mode) const { 259 bool SkImage::asLegacyBitmap(SkBitmap* bitmap, LegacyBitmapMode mode) const {
260 return as_IB(this)->onAsLegacyBitmap(bitmap, mode); 260 return as_IB(this)->onAsLegacyBitmap(bitmap, mode);
261 } 261 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 SkImage* SkImage::NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc&, SkAlphaType) { 303 SkImage* SkImage::NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc&, SkAlphaType) {
304 return NULL; 304 return NULL;
305 } 305 }
306 306
307 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) { 307 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) {
308 return NULL; 308 return NULL;
309 } 309 }
310 310
311 #endif 311 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698