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

Side by Side Diff: src/core/SkXfermode.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/SkTypeface.cpp ('k') | src/core/SkYUVPlanesCache.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkXfermode.h" 9 #include "SkXfermode.h"
10 #include "SkXfermode_proccoeff.h" 10 #include "SkXfermode_proccoeff.h"
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 999
1000 // Technically, can't be static and passed as a template parameter. So we use a nonymous namespace. 1000 // Technically, can't be static and passed as a template parameter. So we use a nonymous namespace.
1001 namespace { 1001 namespace {
1002 SkXfermode* create_mode(int iMode) { 1002 SkXfermode* create_mode(int iMode) {
1003 SkXfermode::Mode mode = (SkXfermode::Mode)iMode; 1003 SkXfermode::Mode mode = (SkXfermode::Mode)iMode;
1004 1004
1005 ProcCoeff rec = gProcCoeffs[mode]; 1005 ProcCoeff rec = gProcCoeffs[mode];
1006 if (auto xfermode = SkOpts::create_xfermode(rec, mode)) { 1006 if (auto xfermode = SkOpts::create_xfermode(rec, mode)) {
1007 return xfermode; 1007 return xfermode;
1008 } 1008 }
1009 return SkNEW_ARGS(SkProcCoeffXfermode, (rec, mode)); 1009 return new SkProcCoeffXfermode(rec, mode);
1010 } 1010 }
1011 } // namespace 1011 } // namespace
1012 1012
1013 SK_DECLARE_STATIC_LAZY_PTR_ARRAY(SkXfermode, cached, SkXfermode::kLastMode + 1, create_mode); 1013 SK_DECLARE_STATIC_LAZY_PTR_ARRAY(SkXfermode, cached, SkXfermode::kLastMode + 1, create_mode);
1014 1014
1015 SkXfermode* SkXfermode::Create(Mode mode) { 1015 SkXfermode* SkXfermode::Create(Mode mode) {
1016 SkASSERT(SK_ARRAY_COUNT(gProcCoeffs) == kModeCount); 1016 SkASSERT(SK_ARRAY_COUNT(gProcCoeffs) == kModeCount);
1017 1017
1018 if ((unsigned)mode >= kModeCount) { 1018 if ((unsigned)mode >= kModeCount) {
1019 // report error 1019 // report error
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 if (!xfer) { 1094 if (!xfer) {
1095 return SkXfermode::kOpaque_SrcColorOpacity == opacityType; 1095 return SkXfermode::kOpaque_SrcColorOpacity == opacityType;
1096 } 1096 }
1097 1097
1098 return xfer->isOpaque(opacityType); 1098 return xfer->isOpaque(opacityType);
1099 } 1099 }
1100 1100
1101 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) 1101 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode)
1102 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) 1102 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode)
1103 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1103 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | src/core/SkYUVPlanesCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698