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

Unified Diff: tests/GLProgramsTest.cpp

Issue 1860593002: One signature for creating unit tests that run on premade GrContexts (Closed) Base URL: https://skia.googlesource.com/skia.git@try_no_native
Patch Set: another guess to fix windows Created 4 years, 8 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 | « tests/FloatingPointTextureTest.cpp ('k') | tests/GpuColorFilterTest.cpp » ('j') | 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 52d1e0375cee85a6074eb3fda4ed2147de173a88..cf442fd2b85c31c30f57d036f9db25620c331ff8 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -422,16 +422,19 @@ static int get_glprograms_max_stages(GrContext* context) {
return 0;
}
-static void test_glprograms_native(skiatest::Reporter* reporter, GrContext* context) {
- int maxStages = get_glprograms_max_stages(context);
+static void test_glprograms_native(skiatest::Reporter* reporter,
+ const sk_gpu_test::ContextInfo& ctxInfo) {
+ int maxStages = get_glprograms_max_stages(ctxInfo.fGrContext);
if (maxStages == 0) {
return;
}
- REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(context, maxStages));
+ REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(ctxInfo.fGrContext, maxStages));
}
-static void test_glprograms_other_contexts(skiatest::Reporter* reporter, GrContext* context) {
- int maxStages = get_glprograms_max_stages(context);
+static void test_glprograms_other_contexts(
+ skiatest::Reporter* reporter,
+ const sk_gpu_test::ContextInfo& ctxInfo) {
+ int maxStages = get_glprograms_max_stages(ctxInfo.fGrContext);
#ifdef SK_BUILD_FOR_WIN
// Some long shaders run out of temporary registers in the D3D compiler on ANGLE and
// command buffer.
@@ -440,7 +443,7 @@ static void test_glprograms_other_contexts(skiatest::Reporter* reporter, GrConte
if (maxStages == 0) {
return;
}
- REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(context, maxStages));
+ REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(ctxInfo.fGrContext, maxStages));
}
DEF_GPUTEST(GLPrograms, reporter, /*factory*/) {
« no previous file with comments | « tests/FloatingPointTextureTest.cpp ('k') | tests/GpuColorFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698