aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrInvariantOutput.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-09-28 06:26:28 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-28 06:26:29 -0700
commitf1b7a1d82860e106ed7d3e0e876419e65783fb84 (patch)
tree8177909b7cf258639fccd47037befeae6c649c29 /src/gpu/GrInvariantOutput.cpp
parent67c6513a96f0dbfeff2bee1c444a5ac9f07857c6 (diff)
Make skpaint->grpaint flow work for composing draws (verts and atlas)
One side effect is that the SkShader's (or implicit shader's) fragment processor is responsible for the transition from an unpremul paint color to a premul color. Review URL: https://codereview.chromium.org/1348583002
Diffstat (limited to 'src/gpu/GrInvariantOutput.cpp')
-rw-r--r--src/gpu/GrInvariantOutput.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/gpu/GrInvariantOutput.cpp b/src/gpu/GrInvariantOutput.cpp
index 4c77df32f4..8de5817054 100644
--- a/src/gpu/GrInvariantOutput.cpp
+++ b/src/gpu/GrInvariantOutput.cpp
@@ -17,8 +17,6 @@ void GrInvariantOutput::validate() const {
}
}
- SkASSERT(this->validPreMulColor());
-
// If we claim that we are not using the input color we must not be modulating the input.
SkASSERT(fNonMulStageFound || fWillUseInputColor);
}
@@ -30,28 +28,5 @@ bool GrInvariantOutput::colorComponentsAllEqual() const {
GrColorUnpackB(fColor) == colorA);
}
-bool GrInvariantOutput::validPreMulColor() const {
- if (kA_GrColorComponentFlag & fValidFlags) {
- float c[4];
- GrColorToRGBAFloat(fColor, c);
- if (kR_GrColorComponentFlag & fValidFlags) {
- if (c[0] > c[3]) {
- return false;
- }
- }
- if (kG_GrColorComponentFlag & fValidFlags) {
- if (c[1] > c[3]) {
- return false;
- }
- }
- if (kB_GrColorComponentFlag & fValidFlags) {
- if (c[2] > c[3]) {
- return false;
- }
- }
- }
- return true;
-}
-
#endif // end DEBUG