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

Side by Side Diff: src/core/SkMultiPictureDraw.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/SkMipMap.cpp ('k') | src/core/SkPaint.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 // Need to include something before #if SK_SUPPORT_GPU so that the Android 8 // Need to include something before #if SK_SUPPORT_GPU so that the Android
9 // framework build, which gets its defines from SkTypes rather than a makefile, 9 // framework build, which gets its defines from SkTypes rather than a makefile,
10 // has the definition before checking it. 10 // has the definition before checking it.
(...skipping 17 matching lines...) Expand all
28 void SkMultiPictureDraw::DrawData::init(SkCanvas* canvas, const SkPicture* pictu re, 28 void SkMultiPictureDraw::DrawData::init(SkCanvas* canvas, const SkPicture* pictu re,
29 const SkMatrix* matrix, const SkPaint* p aint) { 29 const SkMatrix* matrix, const SkPaint* p aint) {
30 fPicture = SkRef(picture); 30 fPicture = SkRef(picture);
31 fCanvas = SkRef(canvas); 31 fCanvas = SkRef(canvas);
32 if (matrix) { 32 if (matrix) {
33 fMatrix = *matrix; 33 fMatrix = *matrix;
34 } else { 34 } else {
35 fMatrix.setIdentity(); 35 fMatrix.setIdentity();
36 } 36 }
37 if (paint) { 37 if (paint) {
38 fPaint = SkNEW_ARGS(SkPaint, (*paint)); 38 fPaint = new SkPaint(*paint);
39 } else { 39 } else {
40 fPaint = NULL; 40 fPaint = NULL;
41 } 41 }
42 } 42 }
43 43
44 void SkMultiPictureDraw::DrawData::Reset(SkTDArray<DrawData>& data) { 44 void SkMultiPictureDraw::DrawData::Reset(SkTDArray<DrawData>& data) {
45 for (int i = 0; i < data.count(); ++i) { 45 for (int i = 0; i < data.count(); ++i) {
46 data[i].fPicture->unref(); 46 data[i].fPicture->unref();
47 data[i].fCanvas->unref(); 47 data[i].fCanvas->unref();
48 SkDELETE(data[i].fPaint); 48 delete data[i].fPaint;
49 } 49 }
50 data.rewind(); 50 data.rewind();
51 } 51 }
52 52
53 //////////////////////////////////////////////////////////////////////////////// ////// 53 //////////////////////////////////////////////////////////////////////////////// //////
54 54
55 SkMultiPictureDraw::SkMultiPictureDraw(int reserve) { 55 SkMultiPictureDraw::SkMultiPictureDraw(int reserve) {
56 if (reserve > 0) { 56 if (reserve > 0) {
57 fGPUDrawData.setReserve(reserve); 57 fGPUDrawData.setReserve(reserve);
58 fThreadSafeDrawData.setReserve(reserve); 58 fThreadSafeDrawData.setReserve(reserve);
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 #if !defined(SK_IGNORE_GPU_LAYER_HOISTING) && SK_SUPPORT_GPU 199 #if !defined(SK_IGNORE_GPU_LAYER_HOISTING) && SK_SUPPORT_GPU
200 GrLayerHoister::UnlockLayers(context, atlasedNeedRendering); 200 GrLayerHoister::UnlockLayers(context, atlasedNeedRendering);
201 GrLayerHoister::UnlockLayers(context, atlasedRecycled); 201 GrLayerHoister::UnlockLayers(context, atlasedRecycled);
202 #if !GR_CACHE_HOISTED_LAYERS 202 #if !GR_CACHE_HOISTED_LAYERS
203 GrLayerHoister::PurgeCache(context); 203 GrLayerHoister::PurgeCache(context);
204 #endif 204 #endif
205 #endif 205 #endif
206 } 206 }
207 207
OLDNEW
« no previous file with comments | « src/core/SkMipMap.cpp ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698