aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-01-04 10:44:42 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-04 16:37:18 +0000
commit8c852be264d003b2e610c5b8634bc0f81c46bbba (patch)
treed67ab88ace56ed44725325310325428ffdb09437 /src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp
parent1e854246e6ce431838de882116b86f085eb7b08e (diff)
Removing tracking of whether GP/FP coverage calculations are used by XP.
Remove readsCoverage from GrPipelineOptimizations Remove kNone from GrDefaultGeoProc::Coverage Remove kIgnoreCoverage from GrXferProcessor::OptFlags Remove GrPipeline::fIgnoresCoverage Change-Id: I8f0c9337ee98b9c77af1e9a8a184519ce63822d4 Reviewed-on: https://skia-review.googlesource.com/6552 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp')
-rw-r--r--src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp b/src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp
index 10053fe577..284556b112 100644
--- a/src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp
+++ b/src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp
@@ -27,14 +27,11 @@ static const int kIndicesPerInstance = 6;
The vertex attrib order is always pos, color, [local coords].
*/
static sk_sp<GrGeometryProcessor> make_persp_gp(const SkMatrix& viewMatrix,
- bool readsCoverage,
bool hasExplicitLocalCoords,
const SkMatrix* localMatrix) {
SkASSERT(viewMatrix.hasPerspective() || (localMatrix && localMatrix->hasPerspective()));
using namespace GrDefaultGeoProcFactory;
- Color color(Color::kAttribute_Type);
- Coverage coverage(readsCoverage ? Coverage::kSolid_Type : Coverage::kNone_Type);
// If we have perspective on the viewMatrix then we won't map on the CPU, nor will we map
// the local rect on the cpu (in case the localMatrix also has perspective).
@@ -44,14 +41,16 @@ static sk_sp<GrGeometryProcessor> make_persp_gp(const SkMatrix& viewMatrix,
LocalCoords localCoords(hasExplicitLocalCoords ? LocalCoords::kHasExplicit_Type
: LocalCoords::kUsePosition_Type,
localMatrix);
- return GrDefaultGeoProcFactory::Make(color, coverage, localCoords, viewMatrix);
+ return GrDefaultGeoProcFactory::Make(Color::kAttribute_Type, Coverage::kSolid_Type,
+ localCoords, viewMatrix);
} else if (hasExplicitLocalCoords) {
LocalCoords localCoords(LocalCoords::kHasExplicit_Type, localMatrix);
- return GrDefaultGeoProcFactory::Make(color, coverage, localCoords, SkMatrix::I());
+ return GrDefaultGeoProcFactory::Make(Color::kAttribute_Type, Coverage::kSolid_Type,
+ localCoords, SkMatrix::I());
} else {
LocalCoords localCoords(LocalCoords::kUsePosition_Type, localMatrix);
- return GrDefaultGeoProcFactory::MakeForDeviceSpace(color, coverage, localCoords,
- viewMatrix);
+ return GrDefaultGeoProcFactory::MakeForDeviceSpace(
+ Color::kAttribute_Type, Coverage::kSolid_Type, localCoords, viewMatrix);
}
}
@@ -142,7 +141,6 @@ private:
void onPrepareDraws(Target* target) const override {
sk_sp<GrGeometryProcessor> gp = make_persp_gp(fViewMatrix,
- fOptimizations.readsCoverage(),
fHasLocalRect,
fHasLocalMatrix ? &fLocalMatrix : nullptr);
if (!gp) {