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

Side by Side Diff: src/core/SkBitmapDevice.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/SkBitmapCache.cpp ('k') | src/core/SkBitmapFilter.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 "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkConfig8888.h" 9 #include "SkConfig8888.h"
10 #include "SkDraw.h" 10 #include "SkDraw.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 } else { 97 } else {
98 if (!bitmap.tryAllocPixels(info)) { 98 if (!bitmap.tryAllocPixels(info)) {
99 return NULL; 99 return NULL;
100 } 100 }
101 if (!bitmap.info().isOpaque()) { 101 if (!bitmap.info().isOpaque()) {
102 bitmap.eraseColor(SK_ColorTRANSPARENT); 102 bitmap.eraseColor(SK_ColorTRANSPARENT);
103 } 103 }
104 } 104 }
105 105
106 return SkNEW_ARGS(SkBitmapDevice, (bitmap, surfaceProps)); 106 return new SkBitmapDevice(bitmap, surfaceProps);
107 } 107 }
108 108
109 SkImageInfo SkBitmapDevice::imageInfo() const { 109 SkImageInfo SkBitmapDevice::imageInfo() const {
110 return fBitmap.info(); 110 return fBitmap.info();
111 } 111 }
112 112
113 void SkBitmapDevice::setNewSize(const SkISize& size) { 113 void SkBitmapDevice::setNewSize(const SkISize& size) {
114 SkASSERT(!fBitmap.pixelRef()); 114 SkASSERT(!fBitmap.pixelRef());
115 fBitmap.setInfo(fBitmap.info().makeWH(size.fWidth, size.fHeight)); 115 fBitmap.setInfo(fBitmap.info().makeWH(size.fWidth, size.fHeight));
116 } 116 }
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 paint.getRasterizer() || 380 paint.getRasterizer() ||
381 paint.getPathEffect() || 381 paint.getPathEffect() ||
382 paint.isFakeBoldText() || 382 paint.isFakeBoldText() ||
383 paint.getStyle() != SkPaint::kFill_Style || 383 paint.getStyle() != SkPaint::kFill_Style ||
384 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) 384 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode))
385 { 385 {
386 return true; 386 return true;
387 } 387 }
388 return false; 388 return false;
389 } 389 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapCache.cpp ('k') | src/core/SkBitmapFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698