epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
reed@google.com | 117cc39 | 2011-01-19 13:19:27 +0000 | [diff] [blame] | 2 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 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. |
reed@google.com | 117cc39 | 2011-01-19 13:19:27 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 9 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 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 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 24 | /* |
bsalomon@google.com | 1d4edd3 | 2012-08-16 18:36:06 +0000 | [diff] [blame^] | 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. |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 27 | */ |
| 28 | //#define GR_DUMP_TEXTURE_UPLOAD 1 |
| 29 | |
bsalomon@google.com | e9557f9 | 2010-12-23 20:59:40 +0000 | [diff] [blame] | 30 | /* |
bsalomon@google.com | 4333323 | 2011-02-02 19:24:54 +0000 | [diff] [blame] | 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 | |
bsalomon@google.com | d16983b | 2011-02-02 22:42:20 +0000 | [diff] [blame] | 38 | /* |
bsalomon@google.com | 1d4edd3 | 2012-08-16 18:36:06 +0000 | [diff] [blame^] | 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 | /* |
bsalomon@google.com | d16983b | 2011-02-02 22:42:20 +0000 | [diff] [blame] | 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 | |
bsalomon@google.com | 1c13c96 | 2011-02-14 16:51:21 +0000 | [diff] [blame] | 50 | /* |
| 51 | * This gives a threshold in bytes of when to lock a GrGeometryBuffer vs using |
bsalomon@google.com | 96e96df | 2011-10-10 14:49:29 +0000 | [diff] [blame] | 52 | * updateData. (Note the depending on the underlying 3D API the update functions |
| 53 | * may always be implemented using a lock) |
bsalomon@google.com | 1c13c96 | 2011-02-14 16:51:21 +0000 | [diff] [blame] | 54 | */ |
| 55 | //#define GR_GEOM_BUFFER_LOCK_THRESHOLD (1<<15) |
| 56 | |
reed@google.com | 117cc39 | 2011-01-19 13:19:27 +0000 | [diff] [blame] | 57 | /////////////////////////////////////////////////////////////////////////////// |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 58 | // Decide Ganesh types |
| 59 | |
| 60 | #define GR_SCALAR_IS_FIXED 0 |
| 61 | #define GR_SCALAR_IS_FLOAT 1 |
| 62 | |
| 63 | #define GR_TEXT_SCALAR_IS_USHORT 0 |
| 64 | #define GR_TEXT_SCALAR_IS_FIXED 0 |
| 65 | #define GR_TEXT_SCALAR_IS_FLOAT 1 |
| 66 | |
| 67 | #endif |
| 68 | |
| 69 | |