Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Unified Diff: src/gpu/GrInvariantOutput.cpp

Issue 1348583002: Make skpaint->grpaint flow work for composing draws (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused inheriteds to satisfy clang Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrFragmentProcessor.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInvariantOutput.cpp
diff --git a/src/gpu/GrInvariantOutput.cpp b/src/gpu/GrInvariantOutput.cpp
index 4c77df32f47fa3e74f8d873d8b6d130e9f37cd35..8de5817054e6b217ad2611041b787f1ed1d8794a 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
« no previous file with comments | « src/gpu/GrFragmentProcessor.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698