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

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

Issue 885923002: Move DstCopy on gpu into the GrXferProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Some clean up Created 5 years, 11 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
Index: src/gpu/effects/GrDisableColorXP.cpp
diff --git a/src/gpu/effects/GrDisableColorXP.cpp b/src/gpu/effects/GrDisableColorXP.cpp
index 93833851921d3c6eadfa77825b635e4cb5317dc8..62d13033229158fe844c69fb7f6ae4ef651d0a75 100644
--- a/src/gpu/effects/GrDisableColorXP.cpp
+++ b/src/gpu/effects/GrDisableColorXP.cpp
@@ -17,7 +17,10 @@ public:
~GrGLDisableColorXP() SK_OVERRIDE {}
- void emitCode(const EmitArgs& args) SK_OVERRIDE {
+ static void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*) {}
+
+private:
+ void onEmitCode(const EmitArgs& args) SK_OVERRIDE {
// This emit code should be empty. However, on the nexus 6 there is a driver bug where if
// you do not give gl_FragColor a value, the gl context is lost and we end up drawing
// nothing. So this fix just sets the gl_FragColor arbitrarily to 0.
@@ -25,11 +28,8 @@ public:
fsBuilder->codeAppendf("%s = vec4(0);", args.fOutputPrimary);
}
- void setData(const GrGLProgramDataManager&, const GrXferProcessor&) SK_OVERRIDE {}
+ void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) SK_OVERRIDE {}
- static void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*) {}
-
-private:
typedef GrGLXferProcessor INHERITED;
};
@@ -39,7 +39,7 @@ GrDisableColorXP::GrDisableColorXP() {
this->initClassID<GrDisableColorXP>();
}
-void GrDisableColorXP::getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const {
+void GrDisableColorXP::onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const {
GrGLDisableColorXP::GenKey(*this, caps, b);
}
@@ -57,8 +57,11 @@ GrDisableColorXPFactory::GrDisableColorXPFactory() {
this->initClassID<GrDisableColorXPFactory>();
}
-GrXferProcessor* GrDisableColorXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& covPOI) const {
+GrXferProcessor*
+GrDisableColorXPFactory::onCreateXferProcessor(const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& covPOI,
+ const GrDeviceCoordTexture* dstCopy,
+ int32_t dstReadKey) const {
return GrDisableColorXP::Create();
}

Powered by Google App Engine
This is Rietveld 408576698