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

Side by Side Diff: src/gpu/GrDrawState.cpp

Issue 681333002: Add Geometry processor to srcAlphaWillBeOne check. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrDrawState.h" 8 #include "GrDrawState.h"
9 9
10 #include "GrOptDrawState.h" 10 #include "GrOptDrawState.h"
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 GrProcessor::InvariantOutput inoutCoverage; 740 GrProcessor::InvariantOutput inoutCoverage;
741 inoutCoverage.fIsSingleComponent = false; 741 inoutCoverage.fIsSingleComponent = false;
742 if (this->hasCoverageVertexAttribute()) { 742 if (this->hasCoverageVertexAttribute()) {
743 inoutCoverage.fValidFlags = 0; 743 inoutCoverage.fValidFlags = 0;
744 inoutCoverage.fColor = 0; // suppresses any warnings. 744 inoutCoverage.fColor = 0; // suppresses any warnings.
745 } else { 745 } else {
746 inoutCoverage.fValidFlags = kRGBA_GrColorComponentFlags; 746 inoutCoverage.fValidFlags = kRGBA_GrColorComponentFlags;
747 inoutCoverage.fColor = this->getCoverageColor(); 747 inoutCoverage.fColor = this->getCoverageColor();
748 } 748 }
749 749
750 if (this->hasGeometryProcessor()) {
751 fGeometryProcessor->computeInvariantOutput(&inoutCoverage);
752 }
753
750 // Run through the coverage stages 754 // Run through the coverage stages
751 for (int s = 0; s < this->numCoverageStages(); ++s) { 755 for (int s = 0; s < this->numCoverageStages(); ++s) {
752 const GrProcessor* processor = this->getCoverageStage(s).getProcesso r(); 756 const GrProcessor* processor = this->getCoverageStage(s).getProcesso r();
753 processor->computeInvariantOutput(&inoutCoverage); 757 processor->computeInvariantOutput(&inoutCoverage);
754 } 758 }
755 759
756 // Since the shader will multiply coverage and color, the only way the f inal A==1 is if 760 // Since the shader will multiply coverage and color, the only way the f inal A==1 is if
757 // coverage and color both have A==1. 761 // coverage and color both have A==1.
758 return (inoutColor.isOpaque() && inoutCoverage.isOpaque()); 762 return (inoutColor.isOpaque() && inoutCoverage.isOpaque());
759 } 763 }
760 764
761 return inoutColor.isOpaque(); 765 return inoutColor.isOpaque();
762 } 766 }
763 767
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698