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

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

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 9 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 | « include/core/SkPathEffect.h ('k') | include/core/SkShader.h » ('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 #ifndef SkPostConfig_DEFINED 8 #ifndef SkPostConfig_DEFINED
9 #define SkPostConfig_DEFINED 9 #define SkPostConfig_DEFINED
10 10
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 # define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__) 277 # define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__)
278 # endif 278 # endif
279 # define new DEBUG_CLIENTBLOCK 279 # define new DEBUG_CLIENTBLOCK
280 # else 280 # else
281 # define DEBUG_CLIENTBLOCK 281 # define DEBUG_CLIENTBLOCK
282 # endif 282 # endif
283 #endif 283 #endif
284 284
285 ////////////////////////////////////////////////////////////////////// 285 //////////////////////////////////////////////////////////////////////
286 286
287 #ifndef SK_OVERRIDE
288 # if defined(_MSC_VER)
289 # define SK_OVERRIDE override
290 # elif defined(__clang__)
291 // Using __attribute__((override)) on clang does not appear to always work.
292 // Clang defaults to C++03 and warns about using override. Squelch that. In tentionally no
293 // push/pop here so all users of SK_OVERRIDE ignore the warning too. This i s like passing
294 // -Wno-c++11-extensions, except that GCC won't die (because it won't see t his pragma).
295 # pragma clang diagnostic ignored "-Wc++11-extensions"
296 #
297 # if __has_feature(cxx_override_control)
298 # define SK_OVERRIDE override
299 # elif defined(__has_extension) && __has_extension(cxx_override_control)
300 # define SK_OVERRIDE override
301 # endif
302 // if GCC >= 4.7
303 # elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > = 7))
304 # define SK_OVERRIDE override
305 # endif
306 # ifndef SK_OVERRIDE
307 # define SK_OVERRIDE
308 # endif
309 #endif
310
311 //////////////////////////////////////////////////////////////////////
312
313 #if !defined(SK_UNUSED) 287 #if !defined(SK_UNUSED)
314 # define SK_UNUSED SK_ATTRIBUTE(unused) 288 # define SK_UNUSED SK_ATTRIBUTE(unused)
315 #endif 289 #endif
316 290
317 #if !defined(SK_ATTR_DEPRECATED) 291 #if !defined(SK_ATTR_DEPRECATED)
318 // FIXME: we ignore msg for now... 292 // FIXME: we ignore msg for now...
319 # define SK_ATTR_DEPRECATED(msg) SK_ATTRIBUTE(deprecated) 293 # define SK_ATTR_DEPRECATED(msg) SK_ATTRIBUTE(deprecated)
320 #endif 294 #endif
321 295
322 #if !defined(SK_ATTR_EXTERNALLY_DEPRECATED) 296 #if !defined(SK_ATTR_EXTERNALLY_DEPRECATED)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 365
392 #if defined(SK_GAMMA_EXPONENT) && defined(SK_GAMMA_SRGB) 366 #if defined(SK_GAMMA_EXPONENT) && defined(SK_GAMMA_SRGB)
393 # error "cannot define both SK_GAMMA_EXPONENT and SK_GAMMA_SRGB" 367 # error "cannot define both SK_GAMMA_EXPONENT and SK_GAMMA_SRGB"
394 #elif defined(SK_GAMMA_SRGB) 368 #elif defined(SK_GAMMA_SRGB)
395 # define SK_GAMMA_EXPONENT (0.0f) 369 # define SK_GAMMA_EXPONENT (0.0f)
396 #elif !defined(SK_GAMMA_EXPONENT) 370 #elif !defined(SK_GAMMA_EXPONENT)
397 # define SK_GAMMA_EXPONENT (2.2f) 371 # define SK_GAMMA_EXPONENT (2.2f)
398 #endif 372 #endif
399 373
400 #endif // SkPostConfig_DEFINED 374 #endif // SkPostConfig_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkPathEffect.h ('k') | include/core/SkShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698