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