aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-11-11 13:46:30 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-11 13:46:30 -0800
commit4052a8e4f2b54fb999163edfeec64b0f2c8b9c47 (patch)
tree4f097b5edb58c52f358a17ccf634a28d1c7d3c8c
parentb969fc0f83528c26c6fdf1cbe8b45fb9a4d8a858 (diff)
Remove coverage from grpaint
-rw-r--r--include/gpu/GrPaint.h13
-rw-r--r--src/gpu/GrDrawState.cpp2
-rw-r--r--src/gpu/GrPaint.cpp2
3 files changed, 2 insertions, 15 deletions
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index c5563f00fa..d44dd89e60 100644
--- a/include/gpu/GrPaint.h
+++ b/include/gpu/GrPaint.h
@@ -67,12 +67,6 @@ public:
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 @@ 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();
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index 1f9f6967c2..dcf8d30717 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -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);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/GrPaint.cpp b/src/gpu/GrPaint.cpp
index 94ea29195d..56e8aa02f3 100644
--- a/src/gpu/GrPaint.cpp
+++ b/src/gpu/GrPaint.cpp
@@ -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();