blob: 657f74f0285a777bfe4074c5c24a0b84b159ac47 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
reed@google.com117cc392011-01-19 13:19:27 +00002/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00003 * 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.com117cc392011-01-19 13:19:27 +00007 */
8
epoger@google.comec3ed6a2011-07-28 14:26:00 +00009
reed@google.comac10a2d2010-12-22 21:39:39 +000010#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.comac10a2d2010-12-22 21:39:39 +000024/*
reed@google.comac10a2d2010-12-22 21:39:39 +000025 * 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
bsalomon@google.come9557f92010-12-23 20:59:40 +000030/*
bsalomon@google.com43333232011-02-02 19:24:54 +000031 * 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.comd16983b2011-02-02 22:42:20 +000038/*
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
bsalomon@google.com1c13c962011-02-14 16:51:21 +000044/*
45 * This gives a threshold in bytes of when to lock a GrGeometryBuffer vs using
bsalomon@google.com96e96df2011-10-10 14:49:29 +000046 * updateData. (Note the depending on the underlying 3D API the update functions
47 * may always be implemented using a lock)
bsalomon@google.com1c13c962011-02-14 16:51:21 +000048 */
49//#define GR_GEOM_BUFFER_LOCK_THRESHOLD (1<<15)
50
reed@google.com117cc392011-01-19 13:19:27 +000051///////////////////////////////////////////////////////////////////////////////
reed@google.comac10a2d2010-12-22 21:39:39 +000052// 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