| 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 , fMinTextureSizeOverride(0) |
| 18 , fSuppressDualSourceBlending(false) | 19 , fSuppressDualSourceBlending(false) |
| 19 , fGeometryBufferMapThreshold(1 << 15) {} | 20 , fGeometryBufferMapThreshold(1 << 15) {} |
| 20 | 21 |
| 21 // EXPERIMENTAL | 22 // EXPERIMENTAL |
| 22 // May be removed in the future, or may become standard depending | 23 // May be removed in the future, or may become standard depending |
| 23 // on the outcomes of a variety of internal tests. | 24 // on the outcomes of a variety of internal tests. |
| 24 bool fDrawPathToCompressedTexture; | 25 bool fDrawPathToCompressedTexture; |
| 25 | 26 |
| 26 // Suppress prints for the GrContext. | 27 // Suppress prints for the GrContext. |
| 27 bool fSuppressPrints; | 28 bool fSuppressPrints; |
| 28 | 29 |
| 29 /** Overrides: These options override feature detection using backend API qu
eries. These | 30 /** 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 | 31 overrides can only reduce the feature set or limits, never increase them
beyond the |
| 31 detected values. */ | 32 detected values. */ |
| 32 | 33 |
| 33 int fMaxTextureSizeOverride; | 34 int fMaxTextureSizeOverride; |
| 35 int fMinTextureSizeOverride; |
| 34 bool fSuppressDualSourceBlending; | 36 bool fSuppressDualSourceBlending; |
| 35 | 37 |
| 36 /** fGeometryBufferMapThreshold gives a threshold (in bytes) for when Gr sho
uld | 38 /** fGeometryBufferMapThreshold gives a threshold (in bytes) for when Gr sho
uld |
| 37 map a GrGeometryBuffer to update its contents. It will use map() if the | 39 map a GrGeometryBuffer to update its contents. It will use map() if the |
| 38 size of the updated region is greater than the threshold. Otherwise it w
ill | 40 size of the updated region is greater than the threshold. Otherwise it w
ill |
| 39 use updateData(). */ | 41 use updateData(). */ |
| 40 size_t fGeometryBufferMapThreshold; | 42 size_t fGeometryBufferMapThreshold; |
| 41 }; | 43 }; |
| 42 | 44 |
| 43 #endif | 45 #endif |
| OLD | NEW |