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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 } | 904 } |
905 | 905 |
906 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const overri
de { | 906 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const overri
de { |
907 out->setUnknownFourComponents(); | 907 out->setUnknownFourComponents(); |
908 out->setUsingLCDCoverage(); | 908 out->setUsingLCDCoverage(); |
909 } | 909 } |
910 | 910 |
911 const char* name() const override { return "Test LCD Text Batch"; } | 911 const char* name() const override { return "Test LCD Text Batch"; } |
912 void initBatchTracker(const GrPipelineOptimizations&) override {} | 912 void initBatchTracker(const GrPipelineOptimizations&) override {} |
913 bool onCombineIfPossible(GrBatch*, const GrCaps&) override { return fal
se; } | 913 bool onCombineIfPossible(GrBatch*, const GrCaps&) override { return fal
se; } |
914 void generateGeometry(GrBatchTarget*) override {} | 914 void onPrepareDraws(Target*) override {}; |
915 | 915 |
916 } testLCDCoverageBatch; | 916 } testLCDCoverageBatch; |
917 | 917 |
918 GrProcOptInfo colorPOI, covPOI; | 918 GrProcOptInfo colorPOI, covPOI; |
919 colorPOI.calcColorWithBatch(&testLCDCoverageBatch, NULL, 0); | 919 colorPOI.calcColorWithBatch(&testLCDCoverageBatch, NULL, 0); |
920 covPOI.calcCoverageWithBatch(&testLCDCoverageBatch, NULL, 0); | 920 covPOI.calcCoverageWithBatch(&testLCDCoverageBatch, NULL, 0); |
921 | 921 |
922 SkASSERT(kRGBA_GrColorComponentFlags == colorPOI.validFlags()); | 922 SkASSERT(kRGBA_GrColorComponentFlags == colorPOI.validFlags()); |
923 SkASSERT(covPOI.isFourChannelOutput()); | 923 SkASSERT(covPOI.isFourChannelOutput()); |
924 | 924 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 TEST_ASSERT(!xp->hasSecondaryOutput()); | 1008 TEST_ASSERT(!xp->hasSecondaryOutput()); |
1009 xp->getOptimizations(colorPOI, covPOI, false, 0, caps); | 1009 xp->getOptimizations(colorPOI, covPOI, false, 0, caps); |
1010 TEST_ASSERT(!xp->hasSecondaryOutput()); | 1010 TEST_ASSERT(!xp->hasSecondaryOutput()); |
1011 } | 1011 } |
1012 } | 1012 } |
1013 } | 1013 } |
1014 } | 1014 } |
1015 | 1015 |
1016 #endif | 1016 #endif |
1017 | 1017 |
OLD | NEW |