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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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(drawState.getRenderTarget()); | 390 SkASSERT(drawState.getRenderTarget()); |
391 | 391 |
392 if (drawState.hasGeometryProcessor()) { | 392 if (drawState.hasGeometryProcessor()) { |
393 const GrGeometryProcessor* gp = drawState.getGeometryProcessor()->getGeo metryProcessor(); | 393 const GrGeometryProcessor* gp = drawState.getGeometryProcessor()->getPro cessor(); |
bsalomon
2014/09/29 15:43:19
It seems weird that getGeometryProcessor doesn't r
joshua.litt
2014/09/29 21:05:22
Mind if this is a follow up CL, I agree its poorly
| |
394 int numTextures = gp->numTextures(); | 394 int numTextures = gp->numTextures(); |
395 for (int t = 0; t < numTextures; ++t) { | 395 for (int t = 0; t < numTextures; ++t) { |
396 GrTexture* texture = gp->texture(t); | 396 GrTexture* texture = gp->texture(t); |
397 SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget()); | 397 SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget()); |
398 } | 398 } |
399 } | 399 } |
400 | 400 |
401 for (int s = 0; s < drawState.numColorStages(); ++s) { | 401 for (int s = 0; s < drawState.numColorStages(); ++s) { |
402 const GrProcessor* effect = drawState.getColorStage(s).getProcessor(); | 402 const GrProcessor* effect = drawState.getColorStage(s).getProcessor(); |
403 int numTextures = effect->numTextures(); | 403 int numTextures = effect->numTextures(); |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1150 | 1150 |
1151 uint32_t GrDrawTargetCaps::CreateUniqueID() { | 1151 uint32_t GrDrawTargetCaps::CreateUniqueID() { |
1152 static int32_t gUniqueID = SK_InvalidUniqueID; | 1152 static int32_t gUniqueID = SK_InvalidUniqueID; |
1153 uint32_t id; | 1153 uint32_t id; |
1154 do { | 1154 do { |
1155 id = static_cast<uint32_t>(sk_atomic_inc(&gUniqueID) + 1); | 1155 id = static_cast<uint32_t>(sk_atomic_inc(&gUniqueID) + 1); |
1156 } while (id == SK_InvalidUniqueID); | 1156 } while (id == SK_InvalidUniqueID); |
1157 return id; | 1157 return id; |
1158 } | 1158 } |
1159 | 1159 |
OLD | NEW |