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

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

Issue 1438773003: Fix GOOGLE3 Android build. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Move SkDebugfForDumpStackTrace to SkPostConfig.h Created 5 years, 1 month 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 | « no previous file | src/core/SkDebug.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 // IWYU pragma: private, include "SkTypes.h" 8 // IWYU pragma: private, include "SkTypes.h"
9 9
10 #ifndef SkPostConfig_DEFINED 10 #ifndef SkPostConfig_DEFINED
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 # 140 #
141 # ifndef SK_A32_SHIFT 141 # ifndef SK_A32_SHIFT
142 # define SK_A32_SHIFT 24 142 # define SK_A32_SHIFT 24
143 # define SK_R32_SHIFT 16 143 # define SK_R32_SHIFT 16
144 # define SK_G32_SHIFT 8 144 # define SK_G32_SHIFT 8
145 # define SK_B32_SHIFT 0 145 # define SK_B32_SHIFT 0
146 # endif 146 # endif
147 # 147 #
148 #endif 148 #endif
149 149
150 #if defined(GOOGLE3)
151 // Used as argument to DumpStackTrace in SK_ALWAYSBREAK.
152 void SkDebugfForDumpStackTrace(const char* data, void* unused);
153 #endif
154
150 #ifndef SK_ALWAYSBREAK 155 #ifndef SK_ALWAYSBREAK
151 # if defined(GOOGLE3) 156 # if defined(GOOGLE3)
152 void DebugWriteToStderr(const char*, void*);
153 void DumpStackTrace(int skip_count, void w(const char*, void*), 157 void DumpStackTrace(int skip_count, void w(const char*, void*),
154 void* arg); 158 void* arg);
155 # define SK_ALWAYSBREAK(cond) do { \ 159 # define SK_ALWAYSBREAK(cond) do { \
156 if (cond) break; \ 160 if (cond) break; \
157 SkNO_RETURN_HINT(); \ 161 SkNO_RETURN_HINT(); \
158 SkDebugf("%s:%d: failed assertion \"%s\"\n", __FILE__, __LINE__, # cond); \ 162 SkDebugf("%s:%d: failed assertion \"%s\"\n", __FILE__, __LINE__, # cond); \
159 DumpStackTrace(0, DebugWriteToStderr, nullptr); \ 163 DumpStackTrace(0, SkDebugfForDumpStackTrace, nullptr); \
160 SK_CRASH(); \ 164 SK_CRASH(); \
161 } while (false) 165 } while (false)
162 # elif defined(SK_DEBUG) 166 # elif defined(SK_DEBUG)
163 # define SK_ALWAYSBREAK(cond) do { \ 167 # define SK_ALWAYSBREAK(cond) do { \
164 if (cond) break; \ 168 if (cond) break; \
165 SkNO_RETURN_HINT(); \ 169 SkNO_RETURN_HINT(); \
166 SkDebugf("%s:%d: failed assertion \"%s\"\n", __FILE__, __LINE__, # cond); \ 170 SkDebugf("%s:%d: failed assertion \"%s\"\n", __FILE__, __LINE__, # cond); \
167 SK_CRASH(); \ 171 SK_CRASH(); \
168 } while (false) 172 } while (false)
169 # else 173 # else
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 # define SK_GAMMA_EXPONENT (2.2f) 367 # define SK_GAMMA_EXPONENT (2.2f)
364 #endif 368 #endif
365 369
366 ////////////////////////////////////////////////////////////////////// 370 //////////////////////////////////////////////////////////////////////
367 371
368 #ifndef GR_TEST_UTILS 372 #ifndef GR_TEST_UTILS
369 # define GR_TEST_UTILS 1 373 # define GR_TEST_UTILS 1
370 #endif 374 #endif
371 375
372 #endif // SkPostConfig_DEFINED 376 #endif // SkPostConfig_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkDebug.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698