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 more aggressive shader optimization. May hurt performance if 40 * switching shaders is expensive. 41 */ 42 //#define GR_AGGRESSIVE_SHADER_OPTS 1 43 44 /* 45 * This gives a threshold in bytes of when to lock a GrGeometryBuffer vs using 46 * updateData. (Note the depending on the underlying 3D API the update functions 47 * may always be implemented using a lock) 48 */ 49 //#define GR_GEOM_BUFFER_LOCK_THRESHOLD (1<<15) 50 51 /////////////////////////////////////////////////////////////////////////////// 52 // Decide Ganesh types 53 54 #define GR_SCALAR_IS_FIXED 0 55 #define GR_SCALAR_IS_FLOAT 1 56 57 #define GR_TEXT_SCALAR_IS_USHORT 0 58 #define GR_TEXT_SCALAR_IS_FIXED 0 59 #define GR_TEXT_SCALAR_IS_FLOAT 1 60 61 #endif 62 63 64