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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 fMaxRenderTargetSize = 0; | 99 fMaxRenderTargetSize = 0; |
100 fMaxTextureSize = 0; | 100 fMaxTextureSize = 0; |
101 fMaxSampleCount = 0; | 101 fMaxSampleCount = 0; |
102 | 102 |
103 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); | 103 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); |
104 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); | 104 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); |
105 | 105 |
106 fSupressPrints = options.fSuppressPrints; | 106 fSupressPrints = options.fSuppressPrints; |
107 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText
ure; | 107 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText
ure; |
| 108 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; |
108 } | 109 } |
109 | 110 |
110 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { | 111 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { |
111 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); | 112 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); |
112 } | 113 } |
113 | 114 |
114 static SkString map_flags_to_string(uint32_t flags) { | 115 static SkString map_flags_to_string(uint32_t flags) { |
115 SkString str; | 116 SkString str; |
116 if (GrCaps::kNone_MapFlags == flags) { | 117 if (GrCaps::kNone_MapFlags == flags) { |
117 str = "none"; | 118 str = "none"; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); | 213 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); |
213 | 214 |
214 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 215 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
215 r.appendf("%s is uploadable to a texture: %s\n", | 216 r.appendf("%s is uploadable to a texture: %s\n", |
216 kConfigNames[i], | 217 kConfigNames[i], |
217 gNY[fConfigTextureSupport[i]]); | 218 gNY[fConfigTextureSupport[i]]); |
218 } | 219 } |
219 | 220 |
220 return r; | 221 return r; |
221 } | 222 } |
OLD | NEW |