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

Side by Side Diff: src/c/sk_paint.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/animator/SkScriptRuntime.cpp ('k') | src/c/sk_surface.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 2015 Google Inc. 2 * Copyright 2015 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 "sk_paint.h" 8 #include "sk_paint.h"
9 #include "sk_types_priv.h" 9 #include "sk_types_priv.h"
10 10
(...skipping 24 matching lines...) Expand all
35 #define CTypeSkTypeMap MAKE_FROM_TO_NAME(sk_stroke_cap_t) 35 #define CTypeSkTypeMap MAKE_FROM_TO_NAME(sk_stroke_cap_t)
36 #include "sk_c_from_to.h" 36 #include "sk_c_from_to.h"
37 37
38 #define CType sk_stroke_join_t 38 #define CType sk_stroke_join_t
39 #define SKType SkPaint::Join 39 #define SKType SkPaint::Join
40 #define CTypeSkTypeMap MAKE_FROM_TO_NAME(sk_stroke_join_t) 40 #define CTypeSkTypeMap MAKE_FROM_TO_NAME(sk_stroke_join_t)
41 #include "sk_c_from_to.h" 41 #include "sk_c_from_to.h"
42 42
43 //////////////////////////////////////////////////////////////////////////////// ////////////////// 43 //////////////////////////////////////////////////////////////////////////////// //////////////////
44 44
45 sk_paint_t* sk_paint_new() { 45 sk_paint_t* sk_paint_new() { return (sk_paint_t*)new SkPaint; }
46 return (sk_paint_t*)SkNEW(SkPaint);
47 }
48 46
49 void sk_paint_delete(sk_paint_t* cpaint) { 47 void sk_paint_delete(sk_paint_t* cpaint) { delete AsPaint(cpaint); }
50 SkDELETE(AsPaint(cpaint));
51 }
52 48
53 bool sk_paint_is_antialias(const sk_paint_t* cpaint) { 49 bool sk_paint_is_antialias(const sk_paint_t* cpaint) {
54 return AsPaint(*cpaint).isAntiAlias(); 50 return AsPaint(*cpaint).isAntiAlias();
55 } 51 }
56 52
57 void sk_paint_set_antialias(sk_paint_t* cpaint, bool aa) { 53 void sk_paint_set_antialias(sk_paint_t* cpaint, bool aa) {
58 AsPaint(cpaint)->setAntiAlias(aa); 54 AsPaint(cpaint)->setAntiAlias(aa);
59 } 55 }
60 56
61 sk_color_t sk_paint_get_color(const sk_paint_t* cpaint) { 57 sk_color_t sk_paint_get_color(const sk_paint_t* cpaint) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 MAP( HUE_SK_XFERMODE_MODE, SkXfermode::kHue_Mode ); 161 MAP( HUE_SK_XFERMODE_MODE, SkXfermode::kHue_Mode );
166 MAP( SATURATION_SK_XFERMODE_MODE, SkXfermode::kSaturation_Mode ); 162 MAP( SATURATION_SK_XFERMODE_MODE, SkXfermode::kSaturation_Mode );
167 MAP( COLOR_SK_XFERMODE_MODE, SkXfermode::kColor_Mode ); 163 MAP( COLOR_SK_XFERMODE_MODE, SkXfermode::kColor_Mode );
168 MAP( LUMINOSITY_SK_XFERMODE_MODE, SkXfermode::kLuminosity_Mode ); 164 MAP( LUMINOSITY_SK_XFERMODE_MODE, SkXfermode::kLuminosity_Mode );
169 #undef MAP 165 #undef MAP
170 default: 166 default:
171 return; 167 return;
172 } 168 }
173 AsPaint(paint)->setXfermodeMode(skmode); 169 AsPaint(paint)->setXfermodeMode(skmode);
174 } 170 }
OLDNEW
« no previous file with comments | « src/animator/SkScriptRuntime.cpp ('k') | src/c/sk_surface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698