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/FloatingPointTextureTest.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/FloatingPointTextureTest.cpp')
-rw-r--r-- | tests/FloatingPointTextureTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp index a20b8a2efa..0880ef67bb 100644 --- a/tests/FloatingPointTextureTest.cpp +++ b/tests/FloatingPointTextureTest.cpp @@ -60,8 +60,8 @@ void runFPTest(skiatest::Reporter* reporter, GrContext* context, static const int FP_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 4/*RGBA*/; static const float kMaxIntegerRepresentableInSPFloatingPoint = 16777216; // 2 ^ 24 -DEF_GPUTEST_FOR_RENDERING_CONTEXTS(FloatingPointTextureTest, reporter, context) { - runFPTest<float>(reporter, context, FLT_MIN, FLT_MAX, FLT_EPSILON, +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(FloatingPointTextureTest, reporter, ctxInfo) { + runFPTest<float>(reporter, ctxInfo.fGrContext, FLT_MIN, FLT_MAX, FLT_EPSILON, kMaxIntegerRepresentableInSPFloatingPoint, FP_CONTROL_ARRAY_SIZE, kRGBA_float_GrPixelConfig); } @@ -69,16 +69,16 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(FloatingPointTextureTest, reporter, context) static const int HALF_ALPHA_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 1 /*alpha-only*/; static const SkHalf kMaxIntegerRepresentableInHalfFloatingPoint = 0x6800; // 2 ^ 11 -DEF_GPUTEST_FOR_RENDERING_CONTEXTS(HalfFloatAlphaTextureTest, reporter, context) { - runFPTest<SkHalf>(reporter, context, SK_HalfMin, SK_HalfMax, SK_HalfEpsilon, +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(HalfFloatAlphaTextureTest, reporter, ctxInfo) { + runFPTest<SkHalf>(reporter, ctxInfo.fGrContext, SK_HalfMin, SK_HalfMax, SK_HalfEpsilon, kMaxIntegerRepresentableInHalfFloatingPoint, HALF_ALPHA_CONTROL_ARRAY_SIZE, kAlpha_half_GrPixelConfig); } static const int HALF_RGBA_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 4 /*RGBA*/; -DEF_GPUTEST_FOR_RENDERING_CONTEXTS(HalfFloatRGBATextureTest, reporter, context) { - runFPTest<SkHalf>(reporter, context, SK_HalfMin, SK_HalfMax, SK_HalfEpsilon, +DEF_GPUTEST_FOR_RENDERING_CONTEXTS(HalfFloatRGBATextureTest, reporter, ctxInfo) { + runFPTest<SkHalf>(reporter, ctxInfo.fGrContext, SK_HalfMin, SK_HalfMax, SK_HalfEpsilon, kMaxIntegerRepresentableInHalfFloatingPoint, HALF_RGBA_CONTROL_ARRAY_SIZE, kRGBA_half_GrPixelConfig); } |