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 : 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 , fGeometryBufferMapThreshold(-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 , fUseShaderSwizzling(false) {} | 25 , fUseShaderSwizzling(false) {} |
25 | 26 |
26 // EXPERIMENTAL | 27 // EXPERIMENTAL |
27 // May be removed in the future, or may become standard depending | 28 // May be removed in the future, or may become standard depending |
28 // on the outcomes of a variety of internal tests. | 29 // on the outcomes of a variety of internal tests. |
29 bool fDrawPathToCompressedTexture; | 30 bool fDrawPathToCompressedTexture; |
30 | 31 |
31 // Suppress prints for the GrContext. | 32 // Suppress prints for the GrContext. |
32 bool fSuppressPrints; | 33 bool fSuppressPrints; |
33 | 34 |
(...skipping 16 matching lines...) Expand all Loading... |
50 bool fUseDrawInsteadOfPartialRenderTargetWrite; | 51 bool fUseDrawInsteadOfPartialRenderTargetWrite; |
51 | 52 |
52 /** The GrContext operates in immediate mode. It will issue all draws to the
backend API | 53 /** The GrContext operates in immediate mode. It will issue all draws to the
backend API |
53 immediately. Intended to ease debugging. */ | 54 immediately. Intended to ease debugging. */ |
54 bool fImmediateMode; | 55 bool fImmediateMode; |
55 | 56 |
56 /** For debugging purposes turn each GrBatch's bounds into a clip rect. This
is used to | 57 /** For debugging purposes turn each GrBatch's bounds into a clip rect. This
is used to |
57 verify that the clip bounds are conservative. */ | 58 verify that the clip bounds are conservative. */ |
58 bool fClipBatchToBounds; | 59 bool fClipBatchToBounds; |
59 | 60 |
| 61 /** For debugging purposes draw a wireframe device bounds rect for each GrBa
tch. The wire |
| 62 frame rect is draw before the GrBatch in order to visualize batches that
draw outside |
| 63 of their dev bounds. */ |
| 64 bool fDrawBatchBounds; |
| 65 |
60 /** Force us to do all swizzling manually in the shader and don't rely on ex
tensions to do | 66 /** Force us to do all swizzling manually in the shader and don't rely on ex
tensions to do |
61 swizzling. */ | 67 swizzling. */ |
62 bool fUseShaderSwizzling; | 68 bool fUseShaderSwizzling; |
63 }; | 69 }; |
64 | 70 |
65 #endif | 71 #endif |
OLD | NEW |