Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(880)

Side by Side Diff: include/gpu/GrConfig.h

Issue 1159713006: add context override of GeometryBufferMapThreshold (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/gpu/GrCaps.h ('k') | include/gpu/GrContextOptions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 */ 69 */
70 #ifndef __STDC_LIMIT_MACROS 70 #ifndef __STDC_LIMIT_MACROS
71 #define __STDC_LIMIT_MACROS 71 #define __STDC_LIMIT_MACROS
72 #endif 72 #endif
73 #ifndef __STDC_CONSTANT_MACROS 73 #ifndef __STDC_CONSTANT_MACROS
74 #define __STDC_CONSTANT_MACROS 74 #define __STDC_CONSTANT_MACROS
75 #endif 75 #endif
76 #include <stdint.h> 76 #include <stdint.h>
77 #endif 77 #endif
78 78
79 /*
80 * The "user config" file can be empty, and everything should work. It is
81 * meant to store a given platform/client's overrides of our guess-work.
82 *
83 * A alternate user config file can be specified by defining
84 * GR_USER_CONFIG_FILE. It should be defined relative to GrConfig.h
85 *
86 * e.g. it can change the BUILD target or supply its own defines for anything
87 * else (e.g. GR_DEFAULT_RESOURCE_CACHE_MB_LIMIT)
88 */
89 #if !defined(GR_USER_CONFIG_FILE)
90 #include "GrUserConfig.h"
91 #else
92 #include GR_USER_CONFIG_FILE
93 #endif
94
95
96 /////////////////////////////////////////////////////////////////////////////// 79 ///////////////////////////////////////////////////////////////////////////////
97 /////////////////////////////////////////////////////////////////////////////// 80 ///////////////////////////////////////////////////////////////////////////////
98 // postconfig section: 81 // postconfig section:
99 // 82 //
100 83
101 /** 84 /**
102 * GR_STRING makes a string of X where X is expanded before conversion to a str ing 85 * GR_STRING makes a string of X where X is expanded before conversion to a str ing
103 * if X itself contains macros. 86 * if X itself contains macros.
104 */ 87 */
105 #define GR_STRING(X) GR_STRING_IMPL(X) 88 #define GR_STRING(X) GR_STRING_IMPL(X)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 #else 179 #else
197 template <bool> class GR_STATIC_ASSERT_FAILURE; 180 template <bool> class GR_STATIC_ASSERT_FAILURE;
198 template <> class GR_STATIC_ASSERT_FAILURE<true> {}; 181 template <> class GR_STATIC_ASSERT_FAILURE<true> {};
199 #define GR_STATIC_ASSERT(CONDITION) \ 182 #define GR_STATIC_ASSERT(CONDITION) \
200 enum {GR_CONCAT(X,__LINE__) = \ 183 enum {GR_CONCAT(X,__LINE__) = \
201 sizeof(GR_STATIC_ASSERT_FAILURE<CONDITION>)} 184 sizeof(GR_STATIC_ASSERT_FAILURE<CONDITION>)}
202 #endif 185 #endif
203 #endif 186 #endif
204 187
205 /** 188 /**
206 * GR_GEOM_BUFFER_MAP_THRESHOLD gives a threshold (in bytes) for when Gr should
207 * map a GrGeometryBuffer to update its contents. It will use map() if the
208 * size of the updated region is greater than the threshold. Otherwise it will
209 * use updateData().
210 */
211 #if !defined(GR_GEOM_BUFFER_MAP_THRESHOLD)
212 #define GR_GEOM_BUFFER_MAP_THRESHOLD (1 << 15)
213 #endif
214
215 /**
216 * GR_STROKE_PATH_RENDERING controls whether or not the GrStrokePathRenderer can be selected 189 * GR_STROKE_PATH_RENDERING controls whether or not the GrStrokePathRenderer can be selected
217 * as a path renderer. GrStrokePathRenderer is currently an experimental path re nderer. 190 * as a path renderer. GrStrokePathRenderer is currently an experimental path re nderer.
218 */ 191 */
219 #if !defined(GR_STROKE_PATH_RENDERING) 192 #if !defined(GR_STROKE_PATH_RENDERING)
220 #define GR_STROKE_PATH_RENDERING 0 193 #define GR_STROKE_PATH_RENDERING 0
221 #endif 194 #endif
222 195
223 /** 196 /**
224 * GR_ALWAYS_ALLOCATE_ON_HEAP determines whether various temporary buffers creat ed 197 * GR_ALWAYS_ALLOCATE_ON_HEAP determines whether various temporary buffers creat ed
225 * in the GPU backend are always allocated on the heap or are allowed to be 198 * in the GPU backend are always allocated on the heap or are allowed to be
226 * allocated on the stack for smaller memory requests. 199 * allocated on the stack for smaller memory requests.
227 * 200 *
228 * This is only used for memory buffers that are created and then passed through to the 201 * This is only used for memory buffers that are created and then passed through to the
229 * 3D API (e.g. as texture or geometry data) 202 * 3D API (e.g. as texture or geometry data)
230 */ 203 */
231 #if !defined(GR_ALWAYS_ALLOCATE_ON_HEAP) 204 #if !defined(GR_ALWAYS_ALLOCATE_ON_HEAP)
232 #define GR_ALWAYS_ALLOCATE_ON_HEAP 0 205 #define GR_ALWAYS_ALLOCATE_ON_HEAP 0
233 #endif 206 #endif
234 207
235 /** 208 /**
236 * GR_FORCE_GPU_TRACE_DEBUGGING will force gpu tracing/debug markers to be turne d on. The trace 209 * GR_FORCE_GPU_TRACE_DEBUGGING will force gpu tracing/debug markers to be turne d on. The trace
237 * markers will be printed out instead of making the backend calls to push and p op them. 210 * markers will be printed out instead of making the backend calls to push and p op them.
238 */ 211 */
239 #if !defined(GR_FORCE_GPU_TRACE_DEBUGGING) 212 #if !defined(GR_FORCE_GPU_TRACE_DEBUGGING)
240 #define GR_FORCE_GPU_TRACE_DEBUGGING 0 213 #define GR_FORCE_GPU_TRACE_DEBUGGING 0
241 #endif 214 #endif
242 215
243 #endif 216 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrCaps.h ('k') | include/gpu/GrContextOptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698