diff options
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrConfig.h | 9 | ||||
-rw-r--r-- | include/gpu/GrUserConfig.h | 11 |
2 files changed, 19 insertions, 1 deletions
diff --git a/include/gpu/GrConfig.h b/include/gpu/GrConfig.h index d929d580ac..00e77eadb3 100644 --- a/include/gpu/GrConfig.h +++ b/include/gpu/GrConfig.h @@ -316,6 +316,15 @@ inline void GrCrash(const char* msg) { GrPrintf(msg); GrAlwaysAssert(false); } #endif /** + * GR_STATIC_RECT_VB controls whether rects are drawn by issuing a vertex + * for each corner or using a static vb that is positioned by modifying the + * view / texture matrix. + */ +#if !defined(GR_STATIC_RECT_VB) + #define GR_STATIC_RECT_VB 1 +#endif + +/** * GR_GEOM_BUFFER_LOCK_THRESHOLD gives a threshold (in bytes) for when Gr should * lock a GrGeometryBuffer to update its contents. It will use lock() if the * size of the updated region is greater than the threshold. Otherwise it will diff --git a/include/gpu/GrUserConfig.h b/include/gpu/GrUserConfig.h index b9df083c48..594889b1a7 100644 --- a/include/gpu/GrUserConfig.h +++ b/include/gpu/GrUserConfig.h @@ -21,7 +21,16 @@ #define GR_DEBUG 1 #endif -/* +/** + * When drawing rects this causes Ganesh to use a vertex buffer containing + * a unit square that is positioned by a matrix. Enable on systems where + * emitting per-rect-draw verts is more expensive than constant/matrix + * updates. Defaults to 0. + */ +//#define GR_STATIC_RECT_VB 1 + + +/** * This gives a threshold in bytes of when to lock a GrGeometryBuffer vs using * updateData. (Note the depending on the underlying 3D API the update functions * may always be implemented using a lock) |