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

Unified Diff: tests/GLProgramsTest.cpp

Issue 1441533003: Update testing frameworks/tests for MDB (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix ref counting bug 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 d69a0dc8a2dfa9a3c53a1d9e66fccf9bdab94ed5..ce247df59cd03cbde666f40da45d161e344337f6 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -301,9 +301,7 @@ static void set_random_stencil(GrPipelineBuilder* pipelineBuilder, SkRandom* ran
}
}
-bool GrDrawingManager::ProgramUnitTest(GrContext* context,
- GrDrawTarget* drawTarget,
- int maxStages) {
+bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages) {
GrDrawingManager* drawingManager = context->drawingManager();
// setup dummy textures
@@ -358,7 +356,10 @@ bool GrDrawingManager::ProgramUnitTest(GrContext* context,
set_random_state(&pipelineBuilder, &random);
set_random_stencil(&pipelineBuilder, &random);
- drawTarget->drawBatch(pipelineBuilder, batch);
+ GrTestTarget tt;
+ context->getTestTarget(&tt);
+
+ tt.target()->drawBatch(pipelineBuilder, batch);
}
// Flush everything, test passes if flush is successful(ie, no asserts are hit, no crashes)
drawingManager->flush();
@@ -389,7 +390,10 @@ bool GrDrawingManager::ProgramUnitTest(GrContext* context,
BlockInputFragmentProcessor::Create(fp));
builder.addColorFragmentProcessor(blockFP);
- drawTarget->drawBatch(builder, batch);
+ GrTestTarget tt;
+ context->getTestTarget(&tt);
+
+ tt.target()->drawBatch(builder, batch);
drawingManager->flush();
}
}
@@ -443,10 +447,7 @@ DEF_GPUTEST(GLPrograms, reporter, factory) {
maxStages = 2;
}
#endif
- GrTestTarget testTarget;
- context->getTestTarget(&testTarget);
- REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(
- context, testTarget.target(), maxStages));
+ REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(context, 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