| 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 fAdvBlendEqBlacklist = 0; | 111 fAdvBlendEqBlacklist = 0; |
| 112 | 112 |
| 113 fMapBufferFlags = kNone_MapFlags; | 113 fMapBufferFlags = kNone_MapFlags; |
| 114 | 114 |
| 115 fMaxVertexAttributes = 0; | 115 fMaxVertexAttributes = 0; |
| 116 fMaxRenderTargetSize = 1; | 116 fMaxRenderTargetSize = 1; |
| 117 fMaxTextureSize = 1; | 117 fMaxTextureSize = 1; |
| 118 fMaxColorSampleCount = 0; | 118 fMaxColorSampleCount = 0; |
| 119 fMaxStencilSampleCount = 0; | 119 fMaxStencilSampleCount = 0; |
| 120 fMaxRasterSamples = 0; | 120 fMaxRasterSamples = 0; |
| 121 fMaxWindowRectangles = 0; |
| 121 | 122 |
| 122 fSuppressPrints = options.fSuppressPrints; | 123 fSuppressPrints = options.fSuppressPrints; |
| 123 fImmediateFlush = options.fImmediateMode; | 124 fImmediateFlush = options.fImmediateMode; |
| 124 fBufferMapThreshold = options.fBufferMapThreshold; | 125 fBufferMapThreshold = options.fBufferMapThreshold; |
| 125 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial
RenderTargetWrite; | 126 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial
RenderTargetWrite; |
| 126 fUseDrawInsteadOfAllRenderTargetWrites = false; | 127 fUseDrawInsteadOfAllRenderTargetWrites = false; |
| 127 fAvoidInstancedDrawsToFPTargets = false; | 128 fAvoidInstancedDrawsToFPTargets = false; |
| 128 | 129 |
| 129 fPreferVRAMUseOverFlushes = true; | 130 fPreferVRAMUseOverFlushes = true; |
| 130 } | 131 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 if (this->advancedBlendEquationSupport()) { | 191 if (this->advancedBlendEquationSupport()) { |
| 191 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac
klist); | 192 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac
klist); |
| 192 } | 193 } |
| 193 | 194 |
| 194 r.appendf("Max Vertex Attributes : %d\n", fMaxVertexAttributes)
; | 195 r.appendf("Max Vertex Attributes : %d\n", fMaxVertexAttributes)
; |
| 195 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); | 196 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); |
| 196 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize)
; | 197 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize)
; |
| 197 r.appendf("Max Color Sample Count : %d\n", fMaxColorSampleCount)
; | 198 r.appendf("Max Color Sample Count : %d\n", fMaxColorSampleCount)
; |
| 198 r.appendf("Max Stencil Sample Count : %d\n", fMaxStencilSampleCoun
t); | 199 r.appendf("Max Stencil Sample Count : %d\n", fMaxStencilSampleCoun
t); |
| 199 r.appendf("Max Raster Samples : %d\n", fMaxRasterSamples); | 200 r.appendf("Max Raster Samples : %d\n", fMaxRasterSamples); |
| 201 r.appendf("Max Window Rectangles : %d\n", fMaxWindowRectangles)
; |
| 200 | 202 |
| 201 static const char* kInstancedSupportNames[] = { | 203 static const char* kInstancedSupportNames[] = { |
| 202 "None", | 204 "None", |
| 203 "Basic", | 205 "Basic", |
| 204 "Multisampled", | 206 "Multisampled", |
| 205 "Mixed Sampled", | 207 "Mixed Sampled", |
| 206 }; | 208 }; |
| 207 GR_STATIC_ASSERT(0 == (int)InstancedSupport::kNone); | 209 GR_STATIC_ASSERT(0 == (int)InstancedSupport::kNone); |
| 208 GR_STATIC_ASSERT(1 == (int)InstancedSupport::kBasic); | 210 GR_STATIC_ASSERT(1 == (int)InstancedSupport::kBasic); |
| 209 GR_STATIC_ASSERT(2 == (int)InstancedSupport::kMultisampled); | 211 GR_STATIC_ASSERT(2 == (int)InstancedSupport::kMultisampled); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 281 |
| 280 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 282 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
| 281 GrPixelConfig config = static_cast<GrPixelConfig>(i); | 283 GrPixelConfig config = static_cast<GrPixelConfig>(i); |
| 282 r.appendf("%s is uploadable to a texture: %s\n", | 284 r.appendf("%s is uploadable to a texture: %s\n", |
| 283 kConfigNames[i], | 285 kConfigNames[i], |
| 284 gNY[this->isConfigTexturable(config)]); | 286 gNY[this->isConfigTexturable(config)]); |
| 285 } | 287 } |
| 286 | 288 |
| 287 return r; | 289 return r; |
| 288 } | 290 } |
| OLD | NEW |