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

Side by Side Diff: include/core/SkPostConfig.h

Issue 15739013: Use macros for new and delete in SkTemplates.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | include/core/SkTemplates.h » ('j') | include/core/SkTemplates.h » ('J')
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 9
10 #ifndef SkPostConfig_DEFINED 10 #ifndef SkPostConfig_DEFINED
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #define SK_HAS_ZLIB 89 #define SK_HAS_ZLIB
90 #endif 90 #endif
91 91
92 /////////////////////////////////////////////////////////////////////////////// 92 ///////////////////////////////////////////////////////////////////////////////
93 93
94 #ifndef SkNEW 94 #ifndef SkNEW
95 #define SkNEW(type_name) (new type_name) 95 #define SkNEW(type_name) (new type_name)
96 #define SkNEW_ARGS(type_name, args) (new type_name args) 96 #define SkNEW_ARGS(type_name, args) (new type_name args)
97 #define SkNEW_ARRAY(type_name, count) (new type_name[(count)]) 97 #define SkNEW_ARRAY(type_name, count) (new type_name[(count)])
98 #define SkNEW_PLACEMENT(buf, type_name) (new (buf) type_name) 98 #define SkNEW_PLACEMENT(buf, type_name) (new (buf) type_name)
99 #define SkNEW_PLACEMENT_ARGS(buf, type_name, args) \ 99 #define SkNEW_PLACEMENT_ARGS(buf, type_name, args) (new (buf) type_name args )
100 (new (buf) type_name args) 100 #define SkNEW_PLACEMENT_ARRAY(buf, type_name, count) (new (buf) type_name[(c ount)])
101 #define SkDELETE(obj) (delete (obj)) 101 #define SkDELETE(obj) (delete (obj))
102 #define SkDELETE_ARRAY(array) (delete[] (array)) 102 #define SkDELETE_ARRAY(array) (delete[] (array))
103 #endif 103 #endif
104 104
105 #ifndef SK_CRASH 105 #ifndef SK_CRASH
106 #if 1 // set to 0 for infinite loop, which can help connecting gdb 106 #if 1 // set to 0 for infinite loop, which can help connecting gdb
107 #define SK_CRASH() do { SkNO_RETURN_HINT(); *(int *)(uintptr_t)0xbbadbeef = 0; } while (false) 107 #define SK_CRASH() do { SkNO_RETURN_HINT(); *(int *)(uintptr_t)0xbbadbeef = 0; } while (false)
108 #else 108 #else
109 #define SK_CRASH() do { SkNO_RETURN_HINT(); } while (true) 109 #define SK_CRASH() do { SkNO_RETURN_HINT(); } while (true)
110 #endif 110 #endif
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 #else 360 #else
361 #define SK_SIZE_T_SPECIFIER "%zu" 361 #define SK_SIZE_T_SPECIFIER "%zu"
362 #endif 362 #endif
363 #endif 363 #endif
364 364
365 ////////////////////////////////////////////////////////////////////// 365 //////////////////////////////////////////////////////////////////////
366 366
367 #ifndef SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 367 #ifndef SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
368 #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 1 368 #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 1
369 #endif 369 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkTemplates.h » ('j') | include/core/SkTemplates.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698