• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 /*
3  * Copyright 2010 Google Inc.
4  *
5  * Use of this source code is governed by a BSD-style license that can be
6  * found in the LICENSE file.
7  */
8 
9 #ifndef GrConfig_DEFINED
10 #define GrConfig_DEFINED
11 
12 #include "include/core/SkTypes.h"
13 
14 /**
15  *  Gr defines are set to 0 or 1, rather than being undefined or defined
16  */
17 
18 #define SK_DUMP_STATES //OPEN DUMP
19 
20 #if !defined(GR_CACHE_STATS)
21   #if defined(SK_DEBUG) || defined(SK_DUMP_STATS)
22       #define GR_CACHE_STATS  1
23   #else
24       #define GR_CACHE_STATS  0
25   #endif
26 #endif
27 
28 #if !defined(GR_GPU_STATS)
29   #if defined(SK_DEBUG) || defined(SK_DUMP_STATS) || GR_TEST_UTILS
30       #define GR_GPU_STATS    1
31   #else
32       #define GR_GPU_STATS    0
33   #endif
34 #endif
35 
36 #endif
37 
38 /**
39  *  GR_STRING makes a string of X where X is expanded before conversion to a string
40  *  if X itself contains macros.
41  */
42 #define GR_STRING(X) GR_STRING_IMPL(X)
43 #define GR_STRING_IMPL(X) #X
44 
45 /**
46  *  GR_CONCAT concatenates X and Y  where each is expanded before
47  *  contanenation if either contains macros.
48  */
49 #define GR_CONCAT(X,Y) GR_CONCAT_IMPL(X,Y)
50 #define GR_CONCAT_IMPL(X,Y) X##Y
51 
52 /**
53  *  Creates a string of the form "<filename>(<linenumber>) : "
54  */
55 #define GR_FILE_AND_LINE_STR __FILE__ "(" GR_STRING(__LINE__) ") : "
56