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

Unified Diff: include/gpu/GrXferProcessor.h

Issue 808813002: Add Coverage Drawing XP (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more nits 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 | « gyp/gpu.gypi ('k') | include/gpu/effects/GrPorterDuffXferProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrXferProcessor.h
diff --git a/include/gpu/GrXferProcessor.h b/include/gpu/GrXferProcessor.h
index bab6141f440de9ff7f5a90f4f328a8638f0dbbf0..80e375c03c36279fb1c9f68f07a8b0dc9b6d5492 100644
--- a/include/gpu/GrXferProcessor.h
+++ b/include/gpu/GrXferProcessor.h
@@ -86,11 +86,9 @@ public:
* A caller who calls this function on a XP is required to honor the returned OptFlags
* and color values for its draw.
*/
- // TODO: remove need for isCoverageDrawing once coverageDrawing is its own XP.
// TODO: remove need for colorWriteDisabled once colorWriteDisabled is its own XP.
virtual OptFlags getOptimizations(const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- bool isCoverageDrawing,
bool colorWriteDisabled,
bool doesStencilWrite,
GrColor* overrideColor,
@@ -127,7 +125,6 @@ public:
return this->onIsEqual(that);
}
-
protected:
GrXferProcessor() : fWillReadDstColor(false) {}
@@ -138,11 +135,6 @@ protected:
*/
void setWillReadDstColor() { fWillReadDstColor = true; }
- /**
- * Subclass implements this to support getConstantColorComponents(...).
- */
- virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const = 0;
-
private:
virtual bool onIsEqual(const GrXferProcessor&) const = 0;
@@ -181,30 +173,27 @@ public:
* fractional pixel coverage generated by the fragment shader.
*
* This function considers the known color and coverage input into the xfer processor and
- * certain state information (isCoverageDrawing and colorWriteDisabled) to determine whether
+ * certain state information (colorWriteDisabled) to determine whether
* coverage can be handled correctly.
*/
- // TODO: remove need for isCoverageDrawing once coverageDrawing is its own XP.
// TODO: remove need for colorWriteDisabled once colorWriteDisabled is its own XP.
virtual bool canApplyCoverage(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
- bool isCoverageDrawing, bool colorWriteDisabled) const = 0;
+ bool colorWriteDisabled) const = 0;
/**
* This function returns true if the destination pixel values will be read for blending during
* draw.
*/
- // TODO: remove need for isCoverageDrawing once coverageDrawing is its own XP.
// TODO: remove need for colorWriteDisabled once only XP can read dst.
virtual bool willBlendWithDst(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
- bool isCoverageDrawing, bool colorWriteDisabled) const = 0;
+ bool colorWriteDisabled) const = 0;
/**
* Determines whether multiplying the computed per-pixel color by the pixel's fractional
* coverage before the blend will give the correct final destination color. In general it
* will not as coverage is applied after blending.
*/
- // TODO: remove need for isCoverageDrawing once coverageDrawing is its own XP.
- virtual bool canTweakAlphaForCoverage(bool isCoverageDrawing) const = 0;
+ virtual bool canTweakAlphaForCoverage() const = 0;
virtual bool getOpaqueAndKnownColor(const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI, GrColor* solidColor,
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/effects/GrPorterDuffXferProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698