| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 fDiscardRenderTargetSupport = false; | 87 fDiscardRenderTargetSupport = false; |
| 88 fReuseScratchTextures = true; | 88 fReuseScratchTextures = true; |
| 89 fGpuTracingSupport = false; | 89 fGpuTracingSupport = false; |
| 90 fCompressedTexSubImageSupport = false; | 90 fCompressedTexSubImageSupport = false; |
| 91 fOversizedStencilSupport = false; | 91 fOversizedStencilSupport = false; |
| 92 fTextureBarrierSupport = false; | 92 fTextureBarrierSupport = false; |
| 93 | 93 |
| 94 fUseDrawInsteadOfClear = false; | 94 fUseDrawInsteadOfClear = false; |
| 95 | 95 |
| 96 fBlendEquationSupport = kBasic_BlendEquationSupport; | 96 fBlendEquationSupport = kBasic_BlendEquationSupport; |
| 97 fAdvBlendEqBlacklist = 0; |
| 98 |
| 97 fMapBufferFlags = kNone_MapFlags; | 99 fMapBufferFlags = kNone_MapFlags; |
| 98 | 100 |
| 99 fMaxRenderTargetSize = 0; | 101 fMaxRenderTargetSize = 0; |
| 100 fMaxTextureSize = 0; | 102 fMaxTextureSize = 0; |
| 101 fMinTextureSize = 0; | 103 fMinTextureSize = 0; |
| 102 fMaxSampleCount = 0; | 104 fMaxSampleCount = 0; |
| 103 | 105 |
| 104 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); | 106 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); |
| 105 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); | 107 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); |
| 106 | 108 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileS
upport]); | 143 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileS
upport]); |
| 142 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilS
upport]); | 144 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilS
upport]); |
| 143 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu
pport]); | 145 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu
pport]); |
| 144 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar
getSupport]); | 146 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar
getSupport]); |
| 145 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText
ures]); | 147 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText
ures]); |
| 146 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor
t]); | 148 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor
t]); |
| 147 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub
ImageSupport]); | 149 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub
ImageSupport]); |
| 148 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil
Support]); | 150 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil
Support]); |
| 149 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu
pport]); | 151 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu
pport]); |
| 150 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf
Clear]); | 152 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf
Clear]); |
| 153 if (this->advancedBlendEquationSupport()) { |
| 154 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac
klist); |
| 155 } |
| 151 | 156 |
| 152 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); | 157 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); |
| 153 r.appendf("Min Texture Size : %d\n", fMinTextureSize); | 158 r.appendf("Min Texture Size : %d\n", fMinTextureSize); |
| 154 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize)
; | 159 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize)
; |
| 155 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); | 160 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); |
| 156 | 161 |
| 157 static const char* kBlendEquationSupportNames[] = { | 162 static const char* kBlendEquationSupportNames[] = { |
| 158 "Basic", | 163 "Basic", |
| 159 "Advanced", | 164 "Advanced", |
| 160 "Advanced Coherent", | 165 "Advanced Coherent", |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); | 221 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); |
| 217 | 222 |
| 218 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 223 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
| 219 r.appendf("%s is uploadable to a texture: %s\n", | 224 r.appendf("%s is uploadable to a texture: %s\n", |
| 220 kConfigNames[i], | 225 kConfigNames[i], |
| 221 gNY[fConfigTextureSupport[i]]); | 226 gNY[fConfigTextureSupport[i]]); |
| 222 } | 227 } |
| 223 | 228 |
| 224 return r; | 229 return r; |
| 225 } | 230 } |
| OLD | NEW |