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 | 9 |
10 | 10 |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 maxValidIndex = static_cast<int>(geoSrc.fIndexBuffer->gpuMemoryS
ize() / sizeof(uint16_t)); | 382 maxValidIndex = static_cast<int>(geoSrc.fIndexBuffer->gpuMemoryS
ize() / sizeof(uint16_t)); |
383 break; | 383 break; |
384 } | 384 } |
385 if (maxIndex > maxValidIndex) { | 385 if (maxIndex > maxValidIndex) { |
386 SkFAIL("Index reads outside valid index range."); | 386 SkFAIL("Index reads outside valid index range."); |
387 } | 387 } |
388 } | 388 } |
389 | 389 |
390 SkASSERT(NULL != drawState.getRenderTarget()); | 390 SkASSERT(NULL != drawState.getRenderTarget()); |
391 | 391 |
| 392 if (drawState.hasGeometryProcessor()) { |
| 393 const GrEffect* effect = drawState.getGeometryProcessor()->getEffect(); |
| 394 int numTextures = effect->numTextures(); |
| 395 for (int t = 0; t < numTextures; ++t) { |
| 396 GrTexture* texture = effect->texture(t); |
| 397 SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget()); |
| 398 } |
| 399 } |
| 400 |
392 for (int s = 0; s < drawState.numColorStages(); ++s) { | 401 for (int s = 0; s < drawState.numColorStages(); ++s) { |
393 const GrEffect* effect = drawState.getColorStage(s).getEffect(); | 402 const GrEffect* effect = drawState.getColorStage(s).getEffect(); |
394 int numTextures = effect->numTextures(); | 403 int numTextures = effect->numTextures(); |
395 for (int t = 0; t < numTextures; ++t) { | 404 for (int t = 0; t < numTextures; ++t) { |
396 GrTexture* texture = effect->texture(t); | 405 GrTexture* texture = effect->texture(t); |
397 SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget()); | 406 SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget()); |
398 } | 407 } |
399 } | 408 } |
400 for (int s = 0; s < drawState.numCoverageStages(); ++s) { | 409 for (int s = 0; s < drawState.numCoverageStages(); ++s) { |
401 const GrEffect* effect = drawState.getCoverageStage(s).getEffect(); | 410 const GrEffect* effect = drawState.getCoverageStage(s).getEffect(); |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); | 1141 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); |
1133 | 1142 |
1134 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 1143 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
1135 r.appendf("%s is uploadable to a texture: %s\n", | 1144 r.appendf("%s is uploadable to a texture: %s\n", |
1136 kConfigNames[i], | 1145 kConfigNames[i], |
1137 gNY[fConfigTextureSupport[i]]); | 1146 gNY[fConfigTextureSupport[i]]); |
1138 } | 1147 } |
1139 | 1148 |
1140 return r; | 1149 return r; |
1141 } | 1150 } |
OLD | NEW |