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

Side by Side Diff: src/core/SkMaskCache.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/SkMallocPixelRef.cpp ('k') | src/core/SkMatrixImageFilter.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 "SkMaskCache.h" 8 #include "SkMaskCache.h"
9 9
10 #define CHECK_LOCAL(localCache, localName, globalName, ...) \ 10 #define CHECK_LOCAL(localCache, localName, globalName, ...) \
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 *mask = result.fMask; 85 *mask = result.fMask;
86 mask->fImage = (uint8_t*)(result.fData->data()); 86 mask->fImage = (uint8_t*)(result.fData->data());
87 return result.fData; 87 return result.fData;
88 } 88 }
89 89
90 void SkMaskCache::Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, 90 void SkMaskCache::Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality,
91 const SkRRect& rrect, const SkMask& mask, SkCachedData* da ta, 91 const SkRRect& rrect, const SkMask& mask, SkCachedData* da ta,
92 SkResourceCache* localCache) { 92 SkResourceCache* localCache) {
93 RRectBlurKey key(sigma, rrect, style, quality); 93 RRectBlurKey key(sigma, rrect, style, quality);
94 return CHECK_LOCAL(localCache, add, Add, SkNEW_ARGS(RRectBlurRec, (key, mask , data))); 94 return CHECK_LOCAL(localCache, add, Add, new RRectBlurRec(key, mask, data));
95 } 95 }
96 96
97 //////////////////////////////////////////////////////////////////////////////// ////////// 97 //////////////////////////////////////////////////////////////////////////////// //////////
98 98
99 namespace { 99 namespace {
100 static unsigned gRectsBlurKeyNamespaceLabel; 100 static unsigned gRectsBlurKeyNamespaceLabel;
101 101
102 struct RectsBlurKey : public SkResourceCache::Key { 102 struct RectsBlurKey : public SkResourceCache::Key {
103 public: 103 public:
104 RectsBlurKey(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, 104 RectsBlurKey(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 *mask = result.fMask; 181 *mask = result.fMask;
182 mask->fImage = (uint8_t*)(result.fData->data()); 182 mask->fImage = (uint8_t*)(result.fData->data());
183 return result.fData; 183 return result.fData;
184 } 184 }
185 185
186 void SkMaskCache::Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, 186 void SkMaskCache::Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality,
187 const SkRect rects[], int count, const SkMask& mask, SkCac hedData* data, 187 const SkRect rects[], int count, const SkMask& mask, SkCac hedData* data,
188 SkResourceCache* localCache) { 188 SkResourceCache* localCache) {
189 RectsBlurKey key(sigma, style, quality, rects, count); 189 RectsBlurKey key(sigma, style, quality, rects, count);
190 return CHECK_LOCAL(localCache, add, Add, SkNEW_ARGS(RectsBlurRec, (key, mask , data))); 190 return CHECK_LOCAL(localCache, add, Add, new RectsBlurRec(key, mask, data));
191 } 191 }
OLDNEW
« no previous file with comments | « src/core/SkMallocPixelRef.cpp ('k') | src/core/SkMatrixImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698