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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 fBlendEquationSupport = kBasic_BlendEquationSupport; | 100 fBlendEquationSupport = kBasic_BlendEquationSupport; |
101 fAdvBlendEqBlacklist = 0; | 101 fAdvBlendEqBlacklist = 0; |
102 | 102 |
103 fMapBufferFlags = kNone_MapFlags; | 103 fMapBufferFlags = kNone_MapFlags; |
104 | 104 |
105 fMaxRenderTargetSize = 1; | 105 fMaxRenderTargetSize = 1; |
106 fMaxTextureSize = 1; | 106 fMaxTextureSize = 1; |
107 fMaxColorSampleCount = 0; | 107 fMaxColorSampleCount = 0; |
108 fMaxStencilSampleCount = 0; | 108 fMaxStencilSampleCount = 0; |
| 109 fMaxRasterSamples = 0; |
109 | 110 |
110 fSuppressPrints = options.fSuppressPrints; | 111 fSuppressPrints = options.fSuppressPrints; |
111 fImmediateFlush = options.fImmediateMode; | 112 fImmediateFlush = options.fImmediateMode; |
112 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText
ure; | 113 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText
ure; |
113 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; | 114 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; |
114 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial
RenderTargetWrite; | 115 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial
RenderTargetWrite; |
115 | 116 |
116 fPreferVRAMUseOverFlushes = true; | 117 fPreferVRAMUseOverFlushes = true; |
117 } | 118 } |
118 | 119 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 r.appendf("Prefer VRAM Use over flushes [workaround] : %s\n", gNY[fPreferVRA
MUseOverFlushes]); | 172 r.appendf("Prefer VRAM Use over flushes [workaround] : %s\n", gNY[fPreferVRA
MUseOverFlushes]); |
172 | 173 |
173 if (this->advancedBlendEquationSupport()) { | 174 if (this->advancedBlendEquationSupport()) { |
174 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac
klist); | 175 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac
klist); |
175 } | 176 } |
176 | 177 |
177 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); | 178 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); |
178 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize)
; | 179 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize)
; |
179 r.appendf("Max Color Sample Count : %d\n", fMaxColorSampleCount)
; | 180 r.appendf("Max Color Sample Count : %d\n", fMaxColorSampleCount)
; |
180 r.appendf("Max Stencil Sample Count : %d\n", fMaxStencilSampleCoun
t); | 181 r.appendf("Max Stencil Sample Count : %d\n", fMaxStencilSampleCoun
t); |
| 182 r.appendf("Max Raster Samples : %d\n", fMaxRasterSamples); |
181 | 183 |
182 static const char* kBlendEquationSupportNames[] = { | 184 static const char* kBlendEquationSupportNames[] = { |
183 "Basic", | 185 "Basic", |
184 "Advanced", | 186 "Advanced", |
185 "Advanced Coherent", | 187 "Advanced Coherent", |
186 }; | 188 }; |
187 GR_STATIC_ASSERT(0 == kBasic_BlendEquationSupport); | 189 GR_STATIC_ASSERT(0 == kBasic_BlendEquationSupport); |
188 GR_STATIC_ASSERT(1 == kAdvanced_BlendEquationSupport); | 190 GR_STATIC_ASSERT(1 == kAdvanced_BlendEquationSupport); |
189 GR_STATIC_ASSERT(2 == kAdvancedCoherent_BlendEquationSupport); | 191 GR_STATIC_ASSERT(2 == kAdvancedCoherent_BlendEquationSupport); |
190 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kBlendEquationSupportNames) == kLast_BlendEq
uationSupport + 1); | 192 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kBlendEquationSupportNames) == kLast_BlendEq
uationSupport + 1); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 245 |
244 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 246 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
245 GrPixelConfig config = static_cast<GrPixelConfig>(i); | 247 GrPixelConfig config = static_cast<GrPixelConfig>(i); |
246 r.appendf("%s is uploadable to a texture: %s\n", | 248 r.appendf("%s is uploadable to a texture: %s\n", |
247 kConfigNames[i], | 249 kConfigNames[i], |
248 gNY[this->isConfigTexturable(config)]); | 250 gNY[this->isConfigTexturable(config)]); |
249 } | 251 } |
250 | 252 |
251 return r; | 253 return r; |
252 } | 254 } |
OLD | NEW |