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

Unified Diff: src/gpu/GrProcessor.cpp

Issue 791743003: Remove GP from drawstate, revision of invariant output for GP (Closed) Base URL: https://skia.googlesource.com/skia.git@color-to-gp
Patch Set: more windows fix Created 6 years 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/GrProcOptInfo.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProcessor.cpp
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index 2bcd9b46a29feaac6857fde67cfa6f2cec853071..721859b3ef383fcd29634a966d0feb48238ff929 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -145,10 +145,6 @@ bool GrProcessor::hasSameTextureAccesses(const GrProcessor& that) const {
return true;
}
-void GrProcessor::computeInvariantOutput(GrInvariantOutput* inout) const {
- this->onComputeInvariantOutput(inout);
-}
-
///////////////////////////////////////////////////////////////////////////////////////////////////
void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) {
@@ -169,10 +165,37 @@ bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con
return true;
}
+void GrFragmentProcessor::computeInvariantOutput(GrInvariantOutput* inout) const {
+ this->onComputeInvariantOutput(inout);
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+void GrGeometryProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) const {
+ if (fHasVertexColor) {
+ if (fOpaqueVertexColors) {
+ out->setUnknownOpaqueFourComponents();
+ } else {
+ out->setUnknownFourComponents();
+ }
+ } else {
+ out->setKnownFourComponents(fColor);
+ }
+ this->onGetInvariantOutputColor(out);
+}
+
+void GrGeometryProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) const {
+ this->onGetInvariantOutputCoverage(out);
+}
+
///////////////////////////////////////////////////////////////////////////////////////////////////
-void GrGeometryProcessor::computeInvariantColor(GrInvariantOutput* intout) const {
+void GrPathProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) const {
+ out->setKnownFourComponents(fColor);
+}
+void GrPathProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) const {
+ out->setKnownSingleComponent(0xff);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -193,4 +216,3 @@ void GrGeometryData::operator delete(void* target) {
// Initial static variable from GrXPFactory
int32_t GrXPFactory::gCurrXPFClassID =
GrXPFactory::kIllegalXPFClassID;
-
« no previous file with comments | « src/gpu/GrProcOptInfo.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698