blob: 7b4e4bb789c057b9b28644a4f46bde32e3bfecfb [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/*
bsalomon@google.com1d4edd32012-08-16 18:36:06 +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.
reed@google.comac10a2d2010-12-22 21:39:39 +000027 */
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/*
bsalomon@google.com1d4edd32012-08-16 18:36:06 +000039 * 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.comd16983b2011-02-02 22:42:20 +000045 * 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.com1c13c962011-02-14 16:51:21 +000050/*
51 * This gives a threshold in bytes of when to lock a GrGeometryBuffer vs using
bsalomon@google.com96e96df2011-10-10 14:49:29 +000052 * updateData. (Note the depending on the underlying 3D API the update functions
53 * may always be implemented using a lock)
bsalomon@google.com1c13c962011-02-14 16:51:21 +000054 */
55//#define GR_GEOM_BUFFER_LOCK_THRESHOLD (1<<15)
56
djsollen@google.com42041e62012-10-29 19:24:45 +000057/**
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
reed@google.com117cc392011-01-19 13:19:27 +000063///////////////////////////////////////////////////////////////////////////////
reed@google.comac10a2d2010-12-22 21:39:39 +000064// Decide Ganesh types
65
66#define GR_SCALAR_IS_FIXED 0
67#define GR_SCALAR_IS_FLOAT 1
68
69#define GR_TEXT_SCALAR_IS_USHORT 0
70#define GR_TEXT_SCALAR_IS_FIXED 0
71#define GR_TEXT_SCALAR_IS_FLOAT 1
72
73#endif
74
75