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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 | 1141 |
1142 GrXferProcessor::BlendInfo blendInfo; | 1142 GrXferProcessor::BlendInfo blendInfo; |
1143 xp->getBlendInfo(&blendInfo); | 1143 xp->getBlendInfo(&blendInfo); |
1144 TEST_ASSERT(blendInfo.fWriteColor); | 1144 TEST_ASSERT(blendInfo.fWriteColor); |
1145 } | 1145 } |
1146 | 1146 |
1147 DEF_GPUTEST(PorterDuffNoDualSourceBlending, reporter, /*factory*/) { | 1147 DEF_GPUTEST(PorterDuffNoDualSourceBlending, reporter, /*factory*/) { |
1148 GrContextOptions opts; | 1148 GrContextOptions opts; |
1149 opts.fSuppressDualSourceBlending = true; | 1149 opts.fSuppressDualSourceBlending = true; |
1150 sk_gpu_test::GrContextFactory mockFactory(opts); | 1150 sk_gpu_test::GrContextFactory mockFactory(opts); |
1151 GrContext* ctx = mockFactory.get(sk_gpu_test::GrContextFactory::kNull_GLCont
extType); | 1151 GrContext* ctx = mockFactory.get(sk_gpu_test::GrContextFactory::kNullGL_Cont
extType); |
1152 if (!ctx) { | 1152 if (!ctx) { |
1153 SkFAIL("Failed to create null context without ARB_blend_func_extended.")
; | 1153 SkFAIL("Failed to create null context without ARB_blend_func_extended.")
; |
1154 return; | 1154 return; |
1155 } | 1155 } |
1156 | 1156 |
1157 const GrCaps& caps = *ctx->caps(); | 1157 const GrCaps& caps = *ctx->caps(); |
1158 if (caps.shaderCaps()->dualSourceBlendingSupport()) { | 1158 if (caps.shaderCaps()->dualSourceBlendingSupport()) { |
1159 SkFAIL("Null context failed to honor request for no ARB_blend_func_exten
ded."); | 1159 SkFAIL("Null context failed to honor request for no ARB_blend_func_exten
ded."); |
1160 return; | 1160 return; |
1161 } | 1161 } |
(...skipping 48 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 |