• 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 
10 #ifndef GrUserConfig_DEFINED
11 #define GrUserConfig_DEFINED
12 
13 #if defined(GR_USER_CONFIG_FILE)
14     #error "default user config pulled in but GR_USER_CONFIG_FILE is defined."
15 #endif
16 
17 #if 0
18     #undef GR_RELEASE
19     #undef GR_DEBUG
20     #define GR_RELEASE  0
21     #define GR_DEBUG    1
22 #endif
23 
24 /*
25  * To diagnose texture cache performance, define this to 1 if you want to see
26  * a log statement everytime we upload an image to create a texture.
27  */
28 //#define GR_DUMP_TEXTURE_UPLOAD    1
29 
30 /*
31  * When drawing rects this causes Ganesh to use a vertex buffer containing
32  * a unit square that is positioned by a matrix. Enable on systems where
33  * emitting per-rect-draw verts is more expensive than constant/matrix
34  * updates. Defaults to 0.
35  */
36 //#define GR_STATIC_RECT_VB 1
37 
38 /*
39  * This causes the GrContext to execute all draws immediately in the 3D API
40  * rather than internally queuing draws.
41  */
42 //#define GR_DISABLE_DRAW_BUFFERING 1
43 
44 /*
45  * This causes more aggressive shader optimization. May hurt performance if
46  * switching shaders is expensive.
47  */
48 //#define GR_AGGRESSIVE_SHADER_OPTS 1
49 
50 /*
51  * This gives a threshold in bytes of when to lock a GrGeometryBuffer vs using
52  * updateData. (Note the depending on the underlying 3D API the update functions
53  * may always be implemented using a lock)
54  */
55 //#define GR_GEOM_BUFFER_LOCK_THRESHOLD (1<<15)
56 
57 /**
58  * This gives a threshold in megabytes for the maximum size of the texture cache
59  * in vram. The value is only a default and can be overridden at runtime.
60  */
61 //#define GR_DEFAULT_TEXTURE_CACHE_MB_LIMIT 96
62 
63 ///////////////////////////////////////////////////////////////////////////////
64 // Decide Ganesh types
65 
66 #define GR_TEXT_SCALAR_IS_USHORT    0
67 #define GR_TEXT_SCALAR_IS_FIXED     0
68 #define GR_TEXT_SCALAR_IS_FLOAT     1
69 
70 #endif
71