Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: src/gpu/GrDrawTarget.cpp

Issue 372773002: Remove use of GrEffectRef from draw state and below. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
382 break; 382 break;
383 } 383 }
384 if (maxIndex > maxValidIndex) { 384 if (maxIndex > maxValidIndex) {
385 SkFAIL("Index reads outside valid index range."); 385 SkFAIL("Index reads outside valid index range.");
386 } 386 }
387 } 387 }
388 388
389 SkASSERT(NULL != drawState.getRenderTarget()); 389 SkASSERT(NULL != drawState.getRenderTarget());
390 390
391 for (int s = 0; s < drawState.numColorStages(); ++s) { 391 for (int s = 0; s < drawState.numColorStages(); ++s) {
392 const GrEffectRef& effect = *drawState.getColorStage(s).getEffect(); 392 const GrEffect* effect = drawState.getColorStage(s).getEffect();
393 int numTextures = effect->numTextures(); 393 int numTextures = effect->numTextures();
394 for (int t = 0; t < numTextures; ++t) { 394 for (int t = 0; t < numTextures; ++t) {
395 GrTexture* texture = effect->texture(t); 395 GrTexture* texture = effect->texture(t);
396 SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget()); 396 SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget());
397 } 397 }
398 } 398 }
399 for (int s = 0; s < drawState.numCoverageStages(); ++s) { 399 for (int s = 0; s < drawState.numCoverageStages(); ++s) {
400 const GrEffectRef& effect = *drawState.getCoverageStage(s).getEffect(); 400 const GrEffect* effect = drawState.getCoverageStage(s).getEffect();
401 int numTextures = effect->numTextures(); 401 int numTextures = effect->numTextures();
402 for (int t = 0; t < numTextures; ++t) { 402 for (int t = 0; t < numTextures; ++t) {
403 GrTexture* texture = effect->texture(t); 403 GrTexture* texture = effect->texture(t);
404 SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget()); 404 SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget());
405 } 405 }
406 } 406 }
407 407
408 SkASSERT(drawState.validateVertexAttribs()); 408 SkASSERT(drawState.validateVertexAttribs());
409 #endif 409 #endif
410 if (NULL == drawState.getRenderTarget()) { 410 if (NULL == drawState.getRenderTarget()) {
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 1161 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
1162 1162
1163 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 1163 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
1164 r.appendf("%s is uploadable to a texture: %s\n", 1164 r.appendf("%s is uploadable to a texture: %s\n",
1165 kConfigNames[i], 1165 kConfigNames[i],
1166 gNY[fConfigTextureSupport[i]]); 1166 gNY[fConfigTextureSupport[i]]);
1167 } 1167 }
1168 1168
1169 return r; 1169 return r;
1170 } 1170 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698