Remove coverage from grpaint
BUG=skia:
Review URL: https://codereview.chromium.org/683133006
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index c5563f0..d44dd89 100644
--- a/include/gpu/GrPaint.h
+++ b/include/gpu/GrPaint.h
@@ -67,12 +67,6 @@
GrColor getColor() const { return fColor; }
/**
- * Applies fractional coverage to the entire drawn primitive. Defaults to 0xff.
- */
- void setCoverage(uint8_t coverage) { fCoverage = coverage; }
- uint8_t getCoverage() const { return fCoverage; }
-
- /**
* Should primitives be anti-aliased or not. Defaults to false.
*/
void setAntiAlias(bool aa) { fAntiAlias = aa; }
@@ -125,7 +119,6 @@
fDither = paint.fDither;
fColor = paint.fColor;
- fCoverage = paint.fCoverage;
fColorStages = paint.fColorStages;
fCoverageStages = paint.fCoverageStages;
@@ -140,7 +133,6 @@
this->resetBlend();
this->resetOptions();
this->resetColor();
- this->resetCoverage();
this->resetStages();
}
@@ -214,7 +206,6 @@
bool fDither;
GrColor fColor;
- uint8_t fCoverage;
void resetBlend() {
fSrcBlendCoeff = kOne_GrBlendCoeff;
@@ -230,10 +221,6 @@
fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff);
}
- void resetCoverage() {
- fCoverage = 0xff;
- }
-
void resetStages() {
fColorStages.reset();
fCoverageStages.reset();
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index 1f9f696..dcf8d30 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -236,7 +236,7 @@
this->setState(GrDrawState::kHWAntialias_StateBit, paint.isAntiAlias());
this->setBlendFunc(paint.getSrcBlendCoeff(), paint.getDstBlendCoeff());
- this->setCoverage(paint.getCoverage());
+ this->setCoverage(0xFF);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/GrPaint.cpp b/src/gpu/GrPaint.cpp
index 94ea291..56e8aa0 100644
--- a/src/gpu/GrPaint.cpp
+++ b/src/gpu/GrPaint.cpp
@@ -53,7 +53,7 @@
// TODO: Share this implementation with GrDrawState
GrProcessor::InvariantOutput inout;
- inout.fColor = GrColorPackRGBA(fCoverage, fCoverage, fCoverage, fCoverage);
+ inout.fColor = 0xFFFFFFFF;
inout.fValidFlags = kRGBA_GrColorComponentFlags;
inout.fIsSingleComponent = true;
int count = fCoverageStages.count();