| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 /////////////////////////////////////////////////////////////////////////////// | 80 /////////////////////////////////////////////////////////////////////////////// |
| 81 | 81 |
| 82 GrCaps::GrCaps(const GrContextOptions& options) { | 82 GrCaps::GrCaps(const GrContextOptions& options) { |
| 83 fMipMapSupport = false; | 83 fMipMapSupport = false; |
| 84 fNPOTTextureTileSupport = false; | 84 fNPOTTextureTileSupport = false; |
| 85 fTwoSidedStencilSupport = false; | 85 fTwoSidedStencilSupport = false; |
| 86 fStencilWrapOpsSupport = false; | 86 fStencilWrapOpsSupport = false; |
| 87 fDiscardRenderTargetSupport = false; | 87 fDiscardRenderTargetSupport = false; |
| 88 fReuseScratchTextures = true; | 88 fReuseScratchTextures = true; |
| 89 fReuseScratchBuffers = true; |
| 89 fGpuTracingSupport = false; | 90 fGpuTracingSupport = false; |
| 90 fCompressedTexSubImageSupport = false; | 91 fCompressedTexSubImageSupport = false; |
| 91 fOversizedStencilSupport = false; | 92 fOversizedStencilSupport = false; |
| 92 fTextureBarrierSupport = false; | 93 fTextureBarrierSupport = false; |
| 93 | 94 |
| 94 fUseDrawInsteadOfClear = false; | 95 fUseDrawInsteadOfClear = false; |
| 95 | 96 |
| 96 fBlendEquationSupport = kBasic_BlendEquationSupport; | 97 fBlendEquationSupport = kBasic_BlendEquationSupport; |
| 97 fAdvBlendEqBlacklist = 0; | 98 fAdvBlendEqBlacklist = 0; |
| 98 | 99 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 140 |
| 140 SkString GrCaps::dump() const { | 141 SkString GrCaps::dump() const { |
| 141 SkString r; | 142 SkString r; |
| 142 static const char* gNY[] = {"NO", "YES"}; | 143 static const char* gNY[] = {"NO", "YES"}; |
| 143 r.appendf("MIP Map Support : %s\n", gNY[fMipMapSupport]); | 144 r.appendf("MIP Map Support : %s\n", gNY[fMipMapSupport]); |
| 144 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileS
upport]); | 145 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileS
upport]); |
| 145 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilS
upport]); | 146 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilS
upport]); |
| 146 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu
pport]); | 147 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu
pport]); |
| 147 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar
getSupport]); | 148 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar
getSupport]); |
| 148 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText
ures]); | 149 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText
ures]); |
| 150 r.appendf("Reuse Scratch Buffers : %s\n", gNY[fReuseScratchBuff
ers]); |
| 149 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor
t]); | 151 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor
t]); |
| 150 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub
ImageSupport]); | 152 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub
ImageSupport]); |
| 151 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil
Support]); | 153 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil
Support]); |
| 152 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu
pport]); | 154 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu
pport]); |
| 153 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf
Clear]); | 155 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf
Clear]); |
| 154 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n", | 156 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n", |
| 155 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]); | 157 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]); |
| 156 if (this->advancedBlendEquationSupport()) { | 158 if (this->advancedBlendEquationSupport()) { |
| 157 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac
klist); | 159 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac
klist); |
| 158 } | 160 } |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); | 226 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); |
| 225 | 227 |
| 226 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 228 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
| 227 r.appendf("%s is uploadable to a texture: %s\n", | 229 r.appendf("%s is uploadable to a texture: %s\n", |
| 228 kConfigNames[i], | 230 kConfigNames[i], |
| 229 gNY[fConfigTextureSupport[i]]); | 231 gNY[fConfigTextureSupport[i]]); |
| 230 } | 232 } |
| 231 | 233 |
| 232 return r; | 234 return r; |
| 233 } | 235 } |
| OLD | NEW |