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

Unified Diff: src/gpu/GrPrimitiveProcessor.h

Issue 1285193004: Move willColorBlendWithDst from pipeline builder to GrPipelineOptimizations. (Closed) Base URL: https://skia.googlesource.com/skia.git@xpfail
Patch Set: Address comment Created 5 years, 4 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/GrPipelineBuilder.cpp ('k') | src/gpu/GrReorderCommandBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPrimitiveProcessor.h
diff --git a/src/gpu/GrPrimitiveProcessor.h b/src/gpu/GrPrimitiveProcessor.h
index 67b00840f061d5ba4fe1b787f1bbef2312a39dce..6d336048c85124f378b4db34381e237a948a7eb0 100644
--- a/src/gpu/GrPrimitiveProcessor.h
+++ b/src/gpu/GrPrimitiveProcessor.h
@@ -113,6 +113,19 @@ public:
return false;
}
+ /**
+ * Returns true if the pipeline's color output will be affected by the existing render target
+ * destination pixel values (meaning we need to be careful with overlapping draws). Note that we
+ * can conflate coverage and color, so the destination color may still bleed into pixels that
+ * have partial coverage, even if this function returns false.
+ *
+ * The above comment seems incorrect for the use case. This funciton is used to turn two
+ * overlapping draws into a single draw (really to stencil multiple paths and do a single
+ * cover). It seems that what really matters is whether the dst is read for color OR for
+ * coverage.
+ */
+ bool willColorBlendWithDst() const { return SkToBool(kWillColorBlendWithDst_Flag & fFlags); }
+
private:
enum {
// If this is not set the primitive processor need not produce a color output
@@ -131,6 +144,8 @@ private:
// If this flag is set the GrPrimitiveProcessor must produce fOverrideColor as its
// output color. If not set fOverrideColor is to be ignored.
kUseOverrideColor_Flag = 0x10,
+
+ kWillColorBlendWithDst_Flag = 0x20,
};
uint32_t fFlags;
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/GrReorderCommandBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698