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

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

Issue 25023003: Implement color filter as GrGLEffect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 2 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 | Annotate | Revision Log
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 maxValidIndex = geoSrc.fIndexBuffer->sizeInBytes() / sizeof(uint 16_t); 381 maxValidIndex = geoSrc.fIndexBuffer->sizeInBytes() / sizeof(uint 16_t);
382 break; 382 break;
383 } 383 }
384 if (maxIndex > maxValidIndex) { 384 if (maxIndex > maxValidIndex) {
385 GrCrash("Index reads outside valid index range."); 385 GrCrash("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.effectiveColorStageCount(); ++s) {
392 const GrEffectRef& effect = *drawState.getColorStage(s).getEffect(); 392 const GrEffectRef& effect = *drawState.getEffectiveColorStage(s).getEffe ct();
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.effectiveCoverageStageCount(); ++s) {
400 const GrEffectRef& effect = *drawState.getCoverageStage(s).getEffect(); 400 const GrEffectRef& effect = *drawState.getEffectiveCoverageStage(s).getE ffect();
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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]); 990 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]);
991 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor t]); 991 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor t]);
992 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); 992 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]);
993 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]); 993 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]);
994 GrPrintf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport]) ; 994 GrPrintf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport]) ;
995 GrPrintf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]); 995 GrPrintf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]);
996 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize); 996 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize);
997 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize); 997 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize);
998 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount); 998 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount);
999 } 999 }
OLDNEW
« src/gpu/GrDrawState.h ('K') | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698