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

Unified Diff: src/gpu/effects/GrCoverageSetOpXP.cpp

Issue 900883002: Revert of Move DstCopy on gpu into the GrXferProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/effects/GrCoverageSetOpXP.h ('k') | src/gpu/effects/GrCustomXfermode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrCoverageSetOpXP.cpp
diff --git a/src/gpu/effects/GrCoverageSetOpXP.cpp b/src/gpu/effects/GrCoverageSetOpXP.cpp
index 7025d20395f2af1b71327506e6b64bbc50756178..fe286f6bf5ceef5e09ca05ea670d08a3126820d8 100644
--- a/src/gpu/effects/GrCoverageSetOpXP.cpp
+++ b/src/gpu/effects/GrCoverageSetOpXP.cpp
@@ -21,6 +21,19 @@
~GrGLCoverageSetOpXP() SK_OVERRIDE {}
+ void emitCode(const EmitArgs& args) SK_OVERRIDE {
+ const GrCoverageSetOpXP& xp = args.fXP.cast<GrCoverageSetOpXP>();
+ GrGLFPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder();
+
+ if (xp.invertCoverage()) {
+ fsBuilder->codeAppendf("%s = 1.0 - %s;", args.fOutputPrimary, args.fInputCoverage);
+ } else {
+ fsBuilder->codeAppendf("%s = %s;", args.fOutputPrimary, args.fInputCoverage);
+ }
+ }
+
+ void setData(const GrGLProgramDataManager&, const GrXferProcessor&) SK_OVERRIDE {};
+
static void GenKey(const GrProcessor& processor, const GrGLCaps& caps,
GrProcessorKeyBuilder* b) {
const GrCoverageSetOpXP& xp = processor.cast<GrCoverageSetOpXP>();
@@ -29,19 +42,6 @@
};
private:
- void onEmitCode(const EmitArgs& args) SK_OVERRIDE {
- const GrCoverageSetOpXP& xp = args.fXP.cast<GrCoverageSetOpXP>();
- GrGLFPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder();
-
- if (xp.invertCoverage()) {
- fsBuilder->codeAppendf("%s = 1.0 - %s;", args.fOutputPrimary, args.fInputCoverage);
- } else {
- fsBuilder->codeAppendf("%s = %s;", args.fOutputPrimary, args.fInputCoverage);
- }
- }
-
- void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) SK_OVERRIDE {};
-
typedef GrGLXferProcessor INHERITED;
};
@@ -56,7 +56,7 @@
GrCoverageSetOpXP::~GrCoverageSetOpXP() {
}
-void GrCoverageSetOpXP::onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const {
+void GrCoverageSetOpXP::getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const {
GrGLCoverageSetOpXP::GenKey(*this, caps, b);
}
@@ -179,10 +179,8 @@
}
}
-GrXferProcessor*
-GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& covPOI,
- const GrDeviceCoordTexture* dstCopy) const {
+GrXferProcessor* GrCoverageSetOpXPFactory::createXferProcessor(const GrProcOptInfo& /* colorPOI*/,
+ const GrProcOptInfo& covPOI) const {
return GrCoverageSetOpXP::Create(fRegionOp, fInvertCoverage);
}
« no previous file with comments | « src/gpu/effects/GrCoverageSetOpXP.h ('k') | src/gpu/effects/GrCustomXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698