| 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 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 kNone_GrColorComponentFlags, | 1186 kNone_GrColorComponentFlags, |
| 1187 kG_GrColorComponentFlag | kA_GrColorComponentFlag, | 1187 kG_GrColorComponentFlag | kA_GrColorComponentFlag, |
| 1188 kRGBA_GrColorComponentFlags | 1188 kRGBA_GrColorComponentFlags |
| 1189 }; | 1189 }; |
| 1190 GR_STATIC_ASSERT(SK_ARRAY_COUNT(testColors) == SK_ARRAY_COUNT(testColorFlags
)); | 1190 GR_STATIC_ASSERT(SK_ARRAY_COUNT(testColors) == SK_ARRAY_COUNT(testColorFlags
)); |
| 1191 | 1191 |
| 1192 for (size_t c = 0; c < SK_ARRAY_COUNT(testColors); c++) { | 1192 for (size_t c = 0; c < SK_ARRAY_COUNT(testColors); c++) { |
| 1193 GrPipelineOptimizations optimizations; | 1193 GrPipelineOptimizations optimizations; |
| 1194 optimizations.fColorPOI.calcWithInitialValues(nullptr, 0, testColors[c],
testColorFlags[c], | 1194 optimizations.fColorPOI.calcWithInitialValues(nullptr, 0, testColors[c],
testColorFlags[c], |
| 1195 false); | 1195 false); |
| 1196 optimizations.fOverrides.fUsePLSDstRead = false; |
| 1196 for (int f = 0; f <= 1; f++) { | 1197 for (int f = 0; f <= 1; f++) { |
| 1197 if (!f) { | 1198 if (!f) { |
| 1198 optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, 0, | 1199 optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, 0, |
| 1199 kNone_GrColorCo
mponentFlags, true); | 1200 kNone_GrColorCo
mponentFlags, true); |
| 1200 } else { | 1201 } else { |
| 1201 optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, GrC
olorPackA4(255), | 1202 optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, GrC
olorPackA4(255), |
| 1202 kRGBA_GrColorCo
mponentFlags, true); | 1203 kRGBA_GrColorCo
mponentFlags, true); |
| 1203 } | 1204 } |
| 1204 for (int m = 0; m <= SkXfermode::kLastCoeffMode; m++) { | 1205 for (int m = 0; m <= SkXfermode::kLastCoeffMode; m++) { |
| 1205 SkXfermode::Mode xfermode = static_cast<SkXfermode::Mode>(m); | 1206 SkXfermode::Mode xfermode = static_cast<SkXfermode::Mode>(m); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1216 xp->getOptimizations(optimizations, false, 0, caps); | 1217 xp->getOptimizations(optimizations, false, 0, caps); |
| 1217 TEST_ASSERT(!xp->hasSecondaryOutput()); | 1218 TEST_ASSERT(!xp->hasSecondaryOutput()); |
| 1218 } | 1219 } |
| 1219 } | 1220 } |
| 1220 } | 1221 } |
| 1221 ctx->getGpu()->deleteTestingOnlyBackendTexture(backendTex); | 1222 ctx->getGpu()->deleteTestingOnlyBackendTexture(backendTex); |
| 1222 } | 1223 } |
| 1223 | 1224 |
| 1224 #endif | 1225 #endif |
| 1225 | 1226 |
| OLD | NEW |