diff options
| author | bsalomon <bsalomon@google.com> | 2016-04-05 12:59:06 -0700 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2016-04-05 12:59:06 -0700 |
| commit | f2f1c17e331fe1e0ce695969970ecebc81e12ceb (patch) | |
| tree | e4dc53ee03e1803307a43917fb440d19cfe3f6f1 /tests/GLProgramsTest.cpp | |
| parent | 4319593988db5796023d9f5f34a8ed285c2097dd (diff) | |
One signature for creating unit tests that run on premade GrContexts
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1860593002
Review URL: https://codereview.chromium.org/1860593002
Diffstat (limited to 'tests/GLProgramsTest.cpp')
| -rw-r--r-- | tests/GLProgramsTest.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index 52d1e0375c..cf442fd2b8 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*/) { |
