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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 509153002: Initial change to create GeometryProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: last warning Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 9605781d34d62f625fcb2c46efeff0d8238ed9b1..191194eb509904ee623d95888b58e8acf0dcc0d5 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -389,6 +389,15 @@ bool GrDrawTarget::checkDraw(GrPrimitiveType type, int startVertex,
SkASSERT(NULL != drawState.getRenderTarget());
+ if (drawState.hasGeometryProcessor()) {
+ const GrEffect* effect = drawState.getGeometryProcessor()->getEffect();
+ int numTextures = effect->numTextures();
+ for (int t = 0; t < numTextures; ++t) {
+ GrTexture* texture = effect->texture(t);
+ SkASSERT(texture->asRenderTarget() != drawState.getRenderTarget());
+ }
+ }
+
for (int s = 0; s < drawState.numColorStages(); ++s) {
const GrEffect* effect = drawState.getColorStage(s).getEffect();
int numTextures = effect->numTextures();
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698