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

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

Issue 1161543003: Set GeometryBufferMapThreshold defaults (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more 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') | src/gpu/gl/GrGLCaps.cpp » ('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 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrContextOptions_DEFINED 8 #ifndef GrContextOptions_DEFINED
9 #define GrContextOptions_DEFINED 9 #define GrContextOptions_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 12
13 struct GrContextOptions { 13 struct GrContextOptions {
14 GrContextOptions() 14 GrContextOptions()
15 : fDrawPathToCompressedTexture(false) 15 : fDrawPathToCompressedTexture(false)
16 , fSuppressPrints(false) 16 , fSuppressPrints(false)
17 , fMaxTextureSizeOverride(SK_MaxS32) 17 , fMaxTextureSizeOverride(SK_MaxS32)
18 , fSuppressDualSourceBlending(false) 18 , fSuppressDualSourceBlending(false)
19 , fGeometryBufferMapThreshold(1 << 15) {} 19 , fGeometryBufferMapThreshold(-1) {}
20 20
21 // EXPERIMENTAL 21 // EXPERIMENTAL
22 // May be removed in the future, or may become standard depending 22 // May be removed in the future, or may become standard depending
23 // on the outcomes of a variety of internal tests. 23 // on the outcomes of a variety of internal tests.
24 bool fDrawPathToCompressedTexture; 24 bool fDrawPathToCompressedTexture;
25 25
26 // Suppress prints for the GrContext. 26 // Suppress prints for the GrContext.
27 bool fSuppressPrints; 27 bool fSuppressPrints;
28 28
29 /** Overrides: These options override feature detection using backend API qu eries. These 29 /** Overrides: These options override feature detection using backend API qu eries. These
30 overrides can only reduce the feature set or limits, never increase them beyond the 30 overrides can only reduce the feature set or limits, never increase them beyond the
31 detected values. */ 31 detected values. */
32 32
33 int fMaxTextureSizeOverride; 33 int fMaxTextureSizeOverride;
34 bool fSuppressDualSourceBlending; 34 bool fSuppressDualSourceBlending;
35 35
36 /** fGeometryBufferMapThreshold gives a threshold (in bytes) for when Gr sho uld 36 /** the threshold in bytes above which we will use a buffer mapping API to m ap vertex and index
37 map a GrGeometryBuffer to update its contents. It will use map() if the 37 buffers to CPU memory in order to update them. A value of -1 means the GrContext should
38 size of the updated region is greater than the threshold. Otherwise it w ill 38 deduce the optimal value for this platform. */
39 use updateData(). */ 39 int fGeometryBufferMapThreshold;
40 size_t fGeometryBufferMapThreshold;
41 }; 40 };
42 41
43 #endif 42 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrCaps.h ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698