OLD | NEW |
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 : fSuppressPrints(false) |
16 , fSuppressPrints(false) | |
17 , fMaxTextureSizeOverride(SK_MaxS32) | 16 , fMaxTextureSizeOverride(SK_MaxS32) |
18 , fMaxTileSizeOverride(0) | 17 , fMaxTileSizeOverride(0) |
19 , fSuppressDualSourceBlending(false) | 18 , fSuppressDualSourceBlending(false) |
20 , fBufferMapThreshold(-1) | 19 , fBufferMapThreshold(-1) |
21 , fUseDrawInsteadOfPartialRenderTargetWrite(false) | 20 , fUseDrawInsteadOfPartialRenderTargetWrite(false) |
22 , fImmediateMode(false) | 21 , fImmediateMode(false) |
23 , fClipBatchToBounds(false) | 22 , fClipBatchToBounds(false) |
24 , fDrawBatchBounds(false) | 23 , fDrawBatchBounds(false) |
25 , fMaxBatchLookback(-1) | 24 , fMaxBatchLookback(-1) |
26 , fMaxBatchLookahead(-1) | 25 , fMaxBatchLookahead(-1) |
27 , fUseShaderSwizzling(false) {} | 26 , fUseShaderSwizzling(false) {} |
28 | 27 |
29 // EXPERIMENTAL | |
30 // May be removed in the future, or may become standard depending | |
31 // on the outcomes of a variety of internal tests. | |
32 bool fDrawPathToCompressedTexture; | |
33 | |
34 // Suppress prints for the GrContext. | 28 // Suppress prints for the GrContext. |
35 bool fSuppressPrints; | 29 bool fSuppressPrints; |
36 | 30 |
37 /** Overrides: These options override feature detection using backend API qu
eries. These | 31 /** 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 | 32 overrides can only reduce the feature set or limits, never increase them
beyond the |
39 detected values. */ | 33 detected values. */ |
40 | 34 |
41 int fMaxTextureSizeOverride; | 35 int fMaxTextureSizeOverride; |
42 /** If non-zero, overrides the maximum size of a tile for sw-backed images a
nd bitmaps rendered | 36 /** If non-zero, overrides the maximum size of a tile for sw-backed images a
nd bitmaps rendered |
43 by SkGpuDevice. */ | 37 by SkGpuDevice. */ |
(...skipping 25 matching lines...) Expand all Loading... |
69 combining. */ | 63 combining. */ |
70 int fMaxBatchLookback; | 64 int fMaxBatchLookback; |
71 int fMaxBatchLookahead; | 65 int fMaxBatchLookahead; |
72 | 66 |
73 /** Force us to do all swizzling manually in the shader and don't rely on ex
tensions to do | 67 /** Force us to do all swizzling manually in the shader and don't rely on ex
tensions to do |
74 swizzling. */ | 68 swizzling. */ |
75 bool fUseShaderSwizzling; | 69 bool fUseShaderSwizzling; |
76 }; | 70 }; |
77 | 71 |
78 #endif | 72 #endif |
OLD | NEW |