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

Unified Diff: tests/GLProgramsTest.cpp

Issue 1450513002: Revert of Update testing frameworks/tests for MDB (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/GrTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GLProgramsTest.cpp
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 6b68c157007c85c046b841ca88de9bae0f3cacaf..d1798fc8fa70e611f0e8cdd346f504a519450144 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -301,7 +301,9 @@
}
}
-bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages) {
+bool GrDrawingManager::ProgramUnitTest(GrContext* context,
+ GrDrawTarget* drawTarget,
+ int maxStages) {
GrDrawingManager* drawingManager = context->drawingManager();
// setup dummy textures
@@ -356,10 +358,7 @@
set_random_state(&pipelineBuilder, &random);
set_random_stencil(&pipelineBuilder, &random);
- GrTestTarget tt;
- context->getTestTarget(&tt);
-
- tt.target()->drawBatch(pipelineBuilder, batch);
+ drawTarget->drawBatch(pipelineBuilder, batch);
}
// Flush everything, test passes if flush is successful(ie, no asserts are hit, no crashes)
drawingManager->flush();
@@ -390,10 +389,7 @@
BlockInputFragmentProcessor::Create(fp));
builder.addColorFragmentProcessor(blockFP);
- GrTestTarget tt;
- context->getTestTarget(&tt);
-
- tt.target()->drawBatch(builder, batch);
+ drawTarget->drawBatch(builder, batch);
drawingManager->flush();
}
}
@@ -447,7 +443,10 @@
maxStages = 2;
}
#endif
- REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(context, maxStages));
+ GrTestTarget testTarget;
+ context->getTestTarget(&testTarget);
+ REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(
+ context, testTarget.target(), maxStages));
}
}
}
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698