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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 break; | 384 break; |
385 } | 385 } |
386 if (maxIndex > maxValidIndex) { | 386 if (maxIndex > maxValidIndex) { |
387 SkFAIL("Index reads outside valid index range."); | 387 SkFAIL("Index reads outside valid index range."); |
388 } | 388 } |
389 } | 389 } |
390 | 390 |
391 SkASSERT(drawState.getRenderTarget()); | 391 SkASSERT(drawState.getRenderTarget()); |
392 | 392 |
393 if (drawState.hasGeometryProcessor()) { | 393 if (drawState.hasGeometryProcessor()) { |
394 const GrGeometryProcessor* gp = drawState.getGeometryProcessor()->getPro
cessor(); | 394 const GrGeometryProcessor* gp = drawState.getGeometryProcessor()->getGeo
metryProcessor(); |
395 int numTextures = gp->numTextures(); | 395 int numTextures = gp->numTextures(); |
396 for (int t = 0; t < numTextures; ++t) { | 396 for (int t = 0; t < numTextures; ++t) { |
397 GrTexture* texture = gp->texture(t); | 397 GrTexture* texture = gp->texture(t); |
398 SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget()); | 398 SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget()); |
399 } | 399 } |
400 } | 400 } |
401 | 401 |
402 for (int s = 0; s < drawState.numColorStages(); ++s) { | 402 for (int s = 0; s < drawState.numColorStages(); ++s) { |
403 const GrProcessor* effect = drawState.getColorStage(s).getProcessor(); | 403 const GrProcessor* effect = drawState.getColorStage(s).getProcessor(); |
404 int numTextures = effect->numTextures(); | 404 int numTextures = effect->numTextures(); |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 | 1151 |
1152 uint32_t GrDrawTargetCaps::CreateUniqueID() { | 1152 uint32_t GrDrawTargetCaps::CreateUniqueID() { |
1153 static int32_t gUniqueID = SK_InvalidUniqueID; | 1153 static int32_t gUniqueID = SK_InvalidUniqueID; |
1154 uint32_t id; | 1154 uint32_t id; |
1155 do { | 1155 do { |
1156 id = static_cast<uint32_t>(sk_atomic_inc(&gUniqueID) + 1); | 1156 id = static_cast<uint32_t>(sk_atomic_inc(&gUniqueID) + 1); |
1157 } while (id == SK_InvalidUniqueID); | 1157 } while (id == SK_InvalidUniqueID); |
1158 return id; | 1158 return id; |
1159 } | 1159 } |
1160 | 1160 |
OLD | NEW |