OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 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 "GrDrawTarget.h" | 9 #include "GrDrawTarget.h" |
10 | 10 |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 fPathRenderingSupport = false; | 1074 fPathRenderingSupport = false; |
1075 fDstReadInShaderSupport = false; | 1075 fDstReadInShaderSupport = false; |
1076 fDiscardRenderTargetSupport = false; | 1076 fDiscardRenderTargetSupport = false; |
1077 fReuseScratchTextures = true; | 1077 fReuseScratchTextures = true; |
1078 fGpuTracingSupport = false; | 1078 fGpuTracingSupport = false; |
1079 fCompressedTexSubImageSupport = false; | 1079 fCompressedTexSubImageSupport = false; |
1080 fOversizedStencilSupport = false; | 1080 fOversizedStencilSupport = false; |
1081 | 1081 |
1082 fUseDrawInsteadOfClear = false; | 1082 fUseDrawInsteadOfClear = false; |
1083 | 1083 |
| 1084 fBlendEquationSupport = kBasic_BlendEquationSupport; |
1084 fMapBufferFlags = kNone_MapFlags; | 1085 fMapBufferFlags = kNone_MapFlags; |
1085 | 1086 |
1086 fMaxRenderTargetSize = 0; | 1087 fMaxRenderTargetSize = 0; |
1087 fMaxTextureSize = 0; | 1088 fMaxTextureSize = 0; |
1088 fMaxSampleCount = 0; | 1089 fMaxSampleCount = 0; |
1089 | 1090 |
1090 fShaderPrecisionVaries = false; | 1091 fShaderPrecisionVaries = false; |
1091 | 1092 |
1092 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); | 1093 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); |
1093 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); | 1094 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); |
(...skipping 10 matching lines...) Expand all Loading... |
1104 fPathRenderingSupport = other.fPathRenderingSupport; | 1105 fPathRenderingSupport = other.fPathRenderingSupport; |
1105 fDstReadInShaderSupport = other.fDstReadInShaderSupport; | 1106 fDstReadInShaderSupport = other.fDstReadInShaderSupport; |
1106 fDiscardRenderTargetSupport = other.fDiscardRenderTargetSupport; | 1107 fDiscardRenderTargetSupport = other.fDiscardRenderTargetSupport; |
1107 fReuseScratchTextures = other.fReuseScratchTextures; | 1108 fReuseScratchTextures = other.fReuseScratchTextures; |
1108 fGpuTracingSupport = other.fGpuTracingSupport; | 1109 fGpuTracingSupport = other.fGpuTracingSupport; |
1109 fCompressedTexSubImageSupport = other.fCompressedTexSubImageSupport; | 1110 fCompressedTexSubImageSupport = other.fCompressedTexSubImageSupport; |
1110 fOversizedStencilSupport = other.fOversizedStencilSupport; | 1111 fOversizedStencilSupport = other.fOversizedStencilSupport; |
1111 | 1112 |
1112 fUseDrawInsteadOfClear = other.fUseDrawInsteadOfClear; | 1113 fUseDrawInsteadOfClear = other.fUseDrawInsteadOfClear; |
1113 | 1114 |
| 1115 fBlendEquationSupport = other.fBlendEquationSupport; |
1114 fMapBufferFlags = other.fMapBufferFlags; | 1116 fMapBufferFlags = other.fMapBufferFlags; |
1115 | 1117 |
1116 fMaxRenderTargetSize = other.fMaxRenderTargetSize; | 1118 fMaxRenderTargetSize = other.fMaxRenderTargetSize; |
1117 fMaxTextureSize = other.fMaxTextureSize; | 1119 fMaxTextureSize = other.fMaxTextureSize; |
1118 fMaxSampleCount = other.fMaxSampleCount; | 1120 fMaxSampleCount = other.fMaxSampleCount; |
1119 | 1121 |
1120 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende
rSupport)); | 1122 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende
rSupport)); |
1121 memcpy(fConfigTextureSupport, other.fConfigTextureSupport, sizeof(fConfigTex
tureSupport)); | 1123 memcpy(fConfigTextureSupport, other.fConfigTextureSupport, sizeof(fConfigTex
tureSupport)); |
1122 | 1124 |
1123 fShaderPrecisionVaries = other.fShaderPrecisionVaries; | 1125 fShaderPrecisionVaries = other.fShaderPrecisionVaries; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText
ures]); | 1191 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText
ures]); |
1190 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor
t]); | 1192 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor
t]); |
1191 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub
ImageSupport]); | 1193 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub
ImageSupport]); |
1192 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil
Support]); | 1194 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil
Support]); |
1193 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf
Clear]); | 1195 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf
Clear]); |
1194 | 1196 |
1195 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); | 1197 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); |
1196 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize)
; | 1198 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize)
; |
1197 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); | 1199 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); |
1198 | 1200 |
| 1201 static const char* kBlendEquationSupportNames[] = { |
| 1202 "Basic", |
| 1203 "Advanced", |
| 1204 "Advanced Coherent", |
| 1205 }; |
| 1206 GR_STATIC_ASSERT(0 == kBasic_BlendEquationSupport); |
| 1207 GR_STATIC_ASSERT(1 == kAdvanced_BlendEquationSupport); |
| 1208 GR_STATIC_ASSERT(2 == kAdvancedCoherent_BlendEquationSupport); |
| 1209 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kBlendEquationSupportNames) == kLast_BlendEq
uationSupport + 1); |
| 1210 |
| 1211 r.appendf("Blend Equation Support : %s\n", |
| 1212 kBlendEquationSupportNames[fBlendEquationSupport]); |
1199 r.appendf("Map Buffer Support : %s\n", | 1213 r.appendf("Map Buffer Support : %s\n", |
1200 map_flags_to_string(fMapBufferFlags).c_str()); | 1214 map_flags_to_string(fMapBufferFlags).c_str()); |
1201 | 1215 |
1202 static const char* kConfigNames[] = { | 1216 static const char* kConfigNames[] = { |
1203 "Unknown", // kUnknown_GrPixelConfig | 1217 "Unknown", // kUnknown_GrPixelConfig |
1204 "Alpha8", // kAlpha_8_GrPixelConfig, | 1218 "Alpha8", // kAlpha_8_GrPixelConfig, |
1205 "Index8", // kIndex_8_GrPixelConfig, | 1219 "Index8", // kIndex_8_GrPixelConfig, |
1206 "RGB565", // kRGB_565_GrPixelConfig, | 1220 "RGB565", // kRGB_565_GrPixelConfig, |
1207 "RGBA444", // kRGBA_4444_GrPixelConfig, | 1221 "RGBA444", // kRGBA_4444_GrPixelConfig, |
1208 "RGBA8888", // kRGBA_8888_GrPixelConfig, | 1222 "RGBA8888", // kRGBA_8888_GrPixelConfig, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 GrPipelineBuilder::AutoRestoreFragmentProcessors* a
rfp, | 1289 GrPipelineBuilder::AutoRestoreFragmentProcessors* a
rfp, |
1276 GrPipelineBuilder::AutoRestoreStencil* ars, | 1290 GrPipelineBuilder::AutoRestoreStencil* ars, |
1277 GrScissorState* scissorState, | 1291 GrScissorState* scissorState, |
1278 const SkRect* devBounds) { | 1292 const SkRect* devBounds) { |
1279 return fClipMaskManager.setupClipping(pipelineBuilder, | 1293 return fClipMaskManager.setupClipping(pipelineBuilder, |
1280 arfp, | 1294 arfp, |
1281 ars, | 1295 ars, |
1282 scissorState, | 1296 scissorState, |
1283 devBounds); | 1297 devBounds); |
1284 } | 1298 } |
OLD | NEW |