Home | History | Annotate | Download | only in include
      1 /*
      2     Copyright 2010 Google Inc.
      3 
      4     Licensed under the Apache License, Version 2.0 (the "License");
      5     you may not use this file except in compliance with the License.
      6     You may obtain a copy of the License at
      7 
      8     http://www.apache.org/licenses/LICENSE-2.0
      9 
     10     Unless required by applicable law or agreed to in writing, software
     11     distributed under the License is distributed on an "AS IS" BASIS,
     12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13     See the License for the specific language governing permissions and
     14     limitations under the License.
     15  */
     16 
     17 #ifndef GrUserConfig_DEFINED
     18 #define GrUserConfig_DEFINED
     19 
     20 #if defined(GR_USER_CONFIG_FILE)
     21     #error "default user config pulled in but GR_USER_CONFIG_FILE is defined."
     22 #endif
     23 
     24 #if 0
     25     #undef GR_RELEASE
     26     #undef GR_DEBUG
     27     #define GR_RELEASE  0
     28     #define GR_DEBUG    1
     29 #endif
     30 
     31 /*
     32  *  The default 32bit pixel config for texture upload is GL_RGBA on all
     33  *  platforms except on Windows where it is GL_BGRA. If your bitmaps map to a
     34  *  different GL enum, specify that with this define. For portability use
     35  *  GR_BGRA rather than GL_BGRA for platforms where this format is an
     36  *  extension.
     37  */
     38 //#define GR_GL_32BPP_COLOR_FORMAT  GL_RGBA
     39 
     40 /*
     41  *  To diagnose texture cache performance, define this to 1 if you want to see
     42  *  a log statement everytime we upload an image to create a texture.
     43  */
     44 //#define GR_DUMP_TEXTURE_UPLOAD    1
     45 
     46 /*
     47  * To log all GL calls define this. Can be turned on and off at runtime by
     48  * gPrintGL global variable.
     49  */
     50 //#define GR_GL_LOG_CALLS 1
     51 
     52 /*
     53  * When drawing rects this causes Ganesh to use a vertex buffer containing
     54  * a unit square that is positioned by a matrix. Enable on systems where
     55  * emitting per-rect-draw verts is more expensive than constant/matrix
     56  * updates. Defaults to 0.
     57  */
     58 //#define GR_STATIC_RECT_VB 1
     59 
     60 /*
     61  * This causes more aggressive shader optimization. May hurt performance if
     62  * switching shaders is expensive.
     63  */
     64 //#define GR_AGGRESSIVE_SHADER_OPTS 1
     65 
     66 /*
     67  * This gives a threshold in bytes of when to lock a GrGeometryBuffer vs using
     68  * updateData or updateSubData. (Note the depending on the underlying 3D API
     69  * the update functions may always be implemented using a lock)
     70  */
     71 //#define GR_GEOM_BUFFER_LOCK_THRESHOLD (1<<15)
     72 
     73 ///////////////////////////////////////////////////////////////////////////////
     74 /*
     75  *  temporary flags (may go away soon)
     76  */
     77 
     78 ///////////////////////////////////////////////////////////////////////////////
     79 // Decide Ganesh types
     80 
     81 #define GR_SCALAR_IS_FIXED          0
     82 #define GR_SCALAR_IS_FLOAT          1
     83 
     84 #define GR_TEXT_SCALAR_IS_USHORT    0
     85 #define GR_TEXT_SCALAR_IS_FIXED     0
     86 #define GR_TEXT_SCALAR_IS_FLOAT     1
     87 
     88 #endif
     89 
     90 
     91