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

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

Issue 1831133004: Revert of Consolidate GPU buffer implementations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/GrTypesPriv.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 * 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 , fMaxTileSizeOverride(0) 18 , fMaxTileSizeOverride(0)
19 , fSuppressDualSourceBlending(false) 19 , fSuppressDualSourceBlending(false)
20 , fBufferMapThreshold(-1) 20 , fGeometryBufferMapThreshold(-1)
21 , fUseDrawInsteadOfPartialRenderTargetWrite(false) 21 , fUseDrawInsteadOfPartialRenderTargetWrite(false)
22 , fImmediateMode(false) 22 , fImmediateMode(false)
23 , fClipBatchToBounds(false) 23 , fClipBatchToBounds(false)
24 , fDrawBatchBounds(false) 24 , fDrawBatchBounds(false)
25 , fMaxBatchLookback(-1) 25 , fMaxBatchLookback(-1)
26 , fMaxBatchLookahead(-1) 26 , fMaxBatchLookahead(-1)
27 , fUseShaderSwizzling(false) {} 27 , fUseShaderSwizzling(false) {}
28 28
29 // EXPERIMENTAL 29 // EXPERIMENTAL
30 // May be removed in the future, or may become standard depending 30 // May be removed in the future, or may become standard depending
31 // on the outcomes of a variety of internal tests. 31 // on the outcomes of a variety of internal tests.
32 bool fDrawPathToCompressedTexture; 32 bool fDrawPathToCompressedTexture;
33 33
34 // Suppress prints for the GrContext. 34 // Suppress prints for the GrContext.
35 bool fSuppressPrints; 35 bool fSuppressPrints;
36 36
37 /** Overrides: These options override feature detection using backend API qu eries. These 37 /** Overrides: These options override feature detection using backend API qu eries. These
38 overrides can only reduce the feature set or limits, never increase them beyond the 38 overrides can only reduce the feature set or limits, never increase them beyond the
39 detected values. */ 39 detected values. */
40 40
41 int fMaxTextureSizeOverride; 41 int fMaxTextureSizeOverride;
42 /** If non-zero, overrides the maximum size of a tile for sw-backed images a nd bitmaps rendered 42 /** If non-zero, overrides the maximum size of a tile for sw-backed images a nd bitmaps rendered
43 by SkGpuDevice. */ 43 by SkGpuDevice. */
44 int fMaxTileSizeOverride; 44 int fMaxTileSizeOverride;
45 bool fSuppressDualSourceBlending; 45 bool fSuppressDualSourceBlending;
46 46
47 /** the threshold in bytes above which we will use a buffer mapping API to m ap vertex and index 47 /** the threshold in bytes above which we will use a buffer mapping API to m ap vertex and index
48 buffers to CPU memory in order to update them. A value of -1 means the GrContext should 48 buffers to CPU memory in order to update them. A value of -1 means the GrContext should
49 deduce the optimal value for this platform. */ 49 deduce the optimal value for this platform. */
50 int fBufferMapThreshold; 50 int fGeometryBufferMapThreshold;
51 51
52 /** some gpus have problems with partial writes of the rendertarget */ 52 /** some gpus have problems with partial writes of the rendertarget */
53 bool fUseDrawInsteadOfPartialRenderTargetWrite; 53 bool fUseDrawInsteadOfPartialRenderTargetWrite;
54 54
55 /** The GrContext operates in immediate mode. It will issue all draws to the backend API 55 /** The GrContext operates in immediate mode. It will issue all draws to the backend API
56 immediately. Intended to ease debugging. */ 56 immediately. Intended to ease debugging. */
57 bool fImmediateMode; 57 bool fImmediateMode;
58 58
59 /** For debugging purposes turn each GrBatch's bounds into a clip rect. This is used to 59 /** For debugging purposes turn each GrBatch's bounds into a clip rect. This is used to
60 verify that the clip bounds are conservative. */ 60 verify that the clip bounds are conservative. */
61 bool fClipBatchToBounds; 61 bool fClipBatchToBounds;
62 62
63 /** For debugging purposes draw a wireframe device bounds rect for each GrBa tch. The wire 63 /** For debugging purposes draw a wireframe device bounds rect for each GrBa tch. The wire
64 frame rect is draw before the GrBatch in order to visualize batches that draw outside 64 frame rect is draw before the GrBatch in order to visualize batches that draw outside
65 of their dev bounds. */ 65 of their dev bounds. */
66 bool fDrawBatchBounds; 66 bool fDrawBatchBounds;
67 67
68 /** For debugging, override the default maximum look-back or look-ahead wind ow for GrBatch 68 /** For debugging, override the default maximum look-back or look-ahead wind ow for GrBatch
69 combining. */ 69 combining. */
70 int fMaxBatchLookback; 70 int fMaxBatchLookback;
71 int fMaxBatchLookahead; 71 int fMaxBatchLookahead;
72 72
73 /** Force us to do all swizzling manually in the shader and don't rely on ex tensions to do 73 /** Force us to do all swizzling manually in the shader and don't rely on ex tensions to do
74 swizzling. */ 74 swizzling. */
75 bool fUseShaderSwizzling; 75 bool fUseShaderSwizzling;
76 }; 76 };
77 77
78 #endif 78 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrCaps.h ('k') | include/gpu/GrTypesPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698