Remove coverage from grpaint
BUG=skia: Review URL: https://codereview.chromium.org/683133006
This commit is contained in:
parent
b969fc0f83
commit
4052a8e4f2
@ -66,12 +66,6 @@ public:
|
||||
void setColor(GrColor color) { fColor = color; }
|
||||
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.
|
||||
*/
|
||||
@ -125,7 +119,6 @@ public:
|
||||
fDither = paint.fDither;
|
||||
|
||||
fColor = paint.fColor;
|
||||
fCoverage = paint.fCoverage;
|
||||
|
||||
fColorStages = paint.fColorStages;
|
||||
fCoverageStages = paint.fCoverageStages;
|
||||
@ -140,7 +133,6 @@ public:
|
||||
this->resetBlend();
|
||||
this->resetOptions();
|
||||
this->resetColor();
|
||||
this->resetCoverage();
|
||||
this->resetStages();
|
||||
}
|
||||
|
||||
@ -214,7 +206,6 @@ private:
|
||||
bool fDither;
|
||||
|
||||
GrColor fColor;
|
||||
uint8_t fCoverage;
|
||||
|
||||
void resetBlend() {
|
||||
fSrcBlendCoeff = kOne_GrBlendCoeff;
|
||||
@ -230,10 +221,6 @@ private:
|
||||
fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff);
|
||||
}
|
||||
|
||||
void resetCoverage() {
|
||||
fCoverage = 0xff;
|
||||
}
|
||||
|
||||
void resetStages() {
|
||||
fColorStages.reset();
|
||||
fCoverageStages.reset();
|
||||
|
@ -236,7 +236,7 @@ void GrDrawState::setFromPaint(const GrPaint& paint, const SkMatrix& vm, GrRende
|
||||
this->setState(GrDrawState::kHWAntialias_StateBit, paint.isAntiAlias());
|
||||
|
||||
this->setBlendFunc(paint.getSrcBlendCoeff(), paint.getDstBlendCoeff());
|
||||
this->setCoverage(paint.getCoverage());
|
||||
this->setCoverage(0xFF);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -53,7 +53,7 @@ bool GrPaint::getOpaqueAndKnownColor(GrColor* solidColor,
|
||||
// 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();
|
||||
|
Loading…
Reference in New Issue
Block a user