| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkXfermode.h" | 8 #include "SkXfermode.h" |
| 9 #include "Test.h" | 9 #include "Test.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 //////////////////////////////////////////////////////////////////////////////// | 22 //////////////////////////////////////////////////////////////////////////////// |
| 23 | 23 |
| 24 static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
GrCaps& caps); | 24 static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
GrCaps& caps); |
| 25 static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
rCaps& caps); | 25 static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
rCaps& caps); |
| 26 static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
GrCaps& caps); | 26 static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
GrCaps& caps); |
| 27 static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
Caps& caps); | 27 static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
Caps& caps); |
| 28 static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps); | 28 static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps); |
| 29 static void test_lcd_coverage_fallback_case(skiatest::Reporter* reporter, const
GrCaps& caps); | 29 static void test_lcd_coverage_fallback_case(skiatest::Reporter* reporter, const
GrCaps& caps); |
| 30 | 30 |
| 31 DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrPorterDuff, reporter, ctxInfo) { | 31 DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrPorterDuff, reporter, ctxInfo) { |
| 32 const GrCaps& caps = *ctxInfo.fGrContext->getGpu()->caps(); | 32 const GrCaps& caps = *ctxInfo.grContext()->getGpu()->caps(); |
| 33 if (!caps.shaderCaps()->dualSourceBlendingSupport()) { | 33 if (!caps.shaderCaps()->dualSourceBlendingSupport()) { |
| 34 SkFAIL("Null context does not support dual source blending."); | 34 SkFAIL("Null context does not support dual source blending."); |
| 35 return; | 35 return; |
| 36 } | 36 } |
| 37 | 37 |
| 38 test_color_unknown_with_coverage(reporter, caps); | 38 test_color_unknown_with_coverage(reporter, caps); |
| 39 test_color_unknown_no_coverage(reporter, caps); | 39 test_color_unknown_no_coverage(reporter, caps); |
| 40 test_color_opaque_with_coverage(reporter, caps); | 40 test_color_opaque_with_coverage(reporter, caps); |
| 41 test_color_opaque_no_coverage(reporter, caps); | 41 test_color_opaque_no_coverage(reporter, caps); |
| 42 test_lcd_coverage(reporter, caps); | 42 test_lcd_coverage(reporter, caps); |
| (...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 TEST_ASSERT(!xp->hasSecondaryOutput()); | 1210 TEST_ASSERT(!xp->hasSecondaryOutput()); |
| 1211 xp->getOptimizations(optimizations, false, 0, caps); | 1211 xp->getOptimizations(optimizations, false, 0, caps); |
| 1212 TEST_ASSERT(!xp->hasSecondaryOutput()); | 1212 TEST_ASSERT(!xp->hasSecondaryOutput()); |
| 1213 } | 1213 } |
| 1214 } | 1214 } |
| 1215 } | 1215 } |
| 1216 ctx->getGpu()->deleteTestingOnlyBackendTexture(backendTex); | 1216 ctx->getGpu()->deleteTestingOnlyBackendTexture(backendTex); |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 #endif | 1219 #endif |
| OLD | NEW |