| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 fMaxVertexAttributes = 0; | 109 fMaxVertexAttributes = 0; |
| 110 fMaxRenderTargetSize = 1; | 110 fMaxRenderTargetSize = 1; |
| 111 fMaxTextureSize = 1; | 111 fMaxTextureSize = 1; |
| 112 fMaxColorSampleCount = 0; | 112 fMaxColorSampleCount = 0; |
| 113 fMaxStencilSampleCount = 0; | 113 fMaxStencilSampleCount = 0; |
| 114 fMaxRasterSamples = 0; | 114 fMaxRasterSamples = 0; |
| 115 | 115 |
| 116 fSuppressPrints = options.fSuppressPrints; | 116 fSuppressPrints = options.fSuppressPrints; |
| 117 fImmediateFlush = options.fImmediateMode; | 117 fImmediateFlush = options.fImmediateMode; |
| 118 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText
ure; | 118 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText
ure; |
| 119 fBufferMapThreshold = options.fBufferMapThreshold; | 119 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; |
| 120 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial
RenderTargetWrite; | 120 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial
RenderTargetWrite; |
| 121 fUseDrawInsteadOfAllRenderTargetWrites = false; | 121 fUseDrawInsteadOfAllRenderTargetWrites = false; |
| 122 | 122 |
| 123 fPreferVRAMUseOverFlushes = true; | 123 fPreferVRAMUseOverFlushes = true; |
| 124 } | 124 } |
| 125 | 125 |
| 126 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { | 126 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { |
| 127 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); | 127 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); |
| 128 // If the max tile override is zero, it means we should use the max texture
size. | 128 // If the max tile override is zero, it means we should use the max texture
size. |
| 129 if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxText
ureSize) { | 129 if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxText
ureSize) { |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 257 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
| 258 GrPixelConfig config = static_cast<GrPixelConfig>(i); | 258 GrPixelConfig config = static_cast<GrPixelConfig>(i); |
| 259 r.appendf("%s is uploadable to a texture: %s\n", | 259 r.appendf("%s is uploadable to a texture: %s\n", |
| 260 kConfigNames[i], | 260 kConfigNames[i], |
| 261 gNY[this->isConfigTexturable(config)]); | 261 gNY[this->isConfigTexturable(config)]); |
| 262 } | 262 } |
| 263 | 263 |
| 264 return r; | 264 return r; |
| 265 } | 265 } |
| OLD | NEW |