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

Side by Side Diff: src/ports/SkMemory_malloc.cpp

Issue 1207893002: Clean up a few includes, introduce iwyu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkTypes to export stddef. Created 5 years, 4 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/ports/SkGlobalInitialization_default.cpp ('k') | src/ports/SkOSFile_posix.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
2 /* 1 /*
3 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
7
8 #include "SkTypes.h" 8 #include "SkTypes.h"
9 #include <stdio.h> 9
10 #include <stdlib.h> 10 #include <stdlib.h>
11 11
12 #define SK_DEBUGFAILF(fmt, ...) \ 12 #define SK_DEBUGFAILF(fmt, ...) \
13 SkASSERT((SkDebugf(fmt"\n", __VA_ARGS__), false)) 13 SkASSERT((SkDebugf(fmt"\n", __VA_ARGS__), false))
14 14
15 static inline void sk_out_of_memory(size_t size) { 15 static inline void sk_out_of_memory(size_t size) {
16 SK_DEBUGFAILF("sk_out_of_memory (asked for " SK_SIZE_T_SPECIFIER " bytes)", 16 SK_DEBUGFAILF("sk_out_of_memory (asked for " SK_SIZE_T_SPECIFIER " bytes)",
17 size); 17 size);
18 abort(); 18 abort();
19 } 19 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 } 60 }
61 61
62 void* sk_calloc(size_t size) { 62 void* sk_calloc(size_t size) {
63 return calloc(size, 1); 63 return calloc(size, 1);
64 } 64 }
65 65
66 void* sk_calloc_throw(size_t size) { 66 void* sk_calloc_throw(size_t size) {
67 return throw_on_failure(size, sk_calloc(size)); 67 return throw_on_failure(size, sk_calloc(size));
68 } 68 }
OLDNEW
« no previous file with comments | « src/ports/SkGlobalInitialization_default.cpp ('k') | src/ports/SkOSFile_posix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698