| 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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const overri
de { | 1107 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const overri
de { |
| 1108 out->setUnknownFourComponents(); | 1108 out->setUnknownFourComponents(); |
| 1109 out->setUsingLCDCoverage(); | 1109 out->setUsingLCDCoverage(); |
| 1110 } | 1110 } |
| 1111 | 1111 |
| 1112 const char* name() const override { return "Test LCD Text Batch"; } | 1112 const char* name() const override { return "Test LCD Text Batch"; } |
| 1113 void initBatchTracker(const GrPipelineOptimizations&) override {} | 1113 void initBatchTracker(const GrPipelineOptimizations&) override {} |
| 1114 bool onCombineIfPossible(GrBatch*, const GrCaps&) override { return fal
se; } | 1114 bool onCombineIfPossible(GrBatch*, const GrCaps&) override { return fal
se; } |
| 1115 void onPrepareDraws(Target*) override {}; | 1115 void onPrepareDraws(Target*) const override {}; |
| 1116 | 1116 |
| 1117 typedef GrVertexBatch INHERITED; | 1117 typedef GrVertexBatch INHERITED; |
| 1118 } testLCDCoverageBatch; | 1118 } testLCDCoverageBatch; |
| 1119 | 1119 |
| 1120 GrProcOptInfo colorPOI, covPOI; | 1120 GrProcOptInfo colorPOI, covPOI; |
| 1121 colorPOI.calcColorWithBatch(&testLCDCoverageBatch, nullptr, 0); | 1121 colorPOI.calcColorWithBatch(&testLCDCoverageBatch, nullptr, 0); |
| 1122 covPOI.calcCoverageWithBatch(&testLCDCoverageBatch, nullptr, 0); | 1122 covPOI.calcCoverageWithBatch(&testLCDCoverageBatch, nullptr, 0); |
| 1123 | 1123 |
| 1124 SkASSERT(kRGBA_GrColorComponentFlags == colorPOI.validFlags()); | 1124 SkASSERT(kRGBA_GrColorComponentFlags == colorPOI.validFlags()); |
| 1125 SkASSERT(covPOI.isFourChannelOutput()); | 1125 SkASSERT(covPOI.isFourChannelOutput()); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 xp->getOptimizations(colorPOI, covPOI, false, 0, caps); | 1213 xp->getOptimizations(colorPOI, covPOI, false, 0, caps); |
| 1214 TEST_ASSERT(!xp->hasSecondaryOutput()); | 1214 TEST_ASSERT(!xp->hasSecondaryOutput()); |
| 1215 } | 1215 } |
| 1216 } | 1216 } |
| 1217 } | 1217 } |
| 1218 ctx->getGpu()->deleteTestingOnlyBackendTexture(backendTex); | 1218 ctx->getGpu()->deleteTestingOnlyBackendTexture(backendTex); |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 #endif | 1221 #endif |
| 1222 | 1222 |
| OLD | NEW |