OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrCaps.h" | 9 #include "GrCaps.h" |
10 #include "GrContextOptions.h" | 10 #include "GrContextOptions.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 fMaxTextureSize = 1; | 108 fMaxTextureSize = 1; |
109 fMaxColorSampleCount = 0; | 109 fMaxColorSampleCount = 0; |
110 fMaxStencilSampleCount = 0; | 110 fMaxStencilSampleCount = 0; |
111 fMaxRasterSamples = 0; | 111 fMaxRasterSamples = 0; |
112 | 112 |
113 fSuppressPrints = options.fSuppressPrints; | 113 fSuppressPrints = options.fSuppressPrints; |
114 fImmediateFlush = options.fImmediateMode; | 114 fImmediateFlush = options.fImmediateMode; |
115 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText
ure; | 115 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText
ure; |
116 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; | 116 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; |
117 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial
RenderTargetWrite; | 117 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial
RenderTargetWrite; |
| 118 fUseDrawInsteadOfAllRenderTargetWrites = false; |
118 | 119 |
119 fPreferVRAMUseOverFlushes = true; | 120 fPreferVRAMUseOverFlushes = true; |
120 } | 121 } |
121 | 122 |
122 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { | 123 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { |
123 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); | 124 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); |
124 // If the max tile override is zero, it means we should use the max texture
size. | 125 // If the max tile override is zero, it means we should use the max texture
size. |
125 if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxText
ureSize) { | 126 if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxText
ureSize) { |
126 fMaxTileSize = fMaxTextureSize; | 127 fMaxTileSize = fMaxTextureSize; |
127 } else { | 128 } else { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 248 |
248 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 249 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
249 GrPixelConfig config = static_cast<GrPixelConfig>(i); | 250 GrPixelConfig config = static_cast<GrPixelConfig>(i); |
250 r.appendf("%s is uploadable to a texture: %s\n", | 251 r.appendf("%s is uploadable to a texture: %s\n", |
251 kConfigNames[i], | 252 kConfigNames[i], |
252 gNY[this->isConfigTexturable(config)]); | 253 gNY[this->isConfigTexturable(config)]); |
253 } | 254 } |
254 | 255 |
255 return r; | 256 return r; |
256 } | 257 } |
OLD | NEW |