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

Unified Diff: src/effects/SkArithmeticMode_gpu.h

Issue 901663007: 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 | « include/gpu/effects/GrPorterDuffXferProcessor.h ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkArithmeticMode_gpu.h
diff --git a/src/effects/SkArithmeticMode_gpu.h b/src/effects/SkArithmeticMode_gpu.h
index b282e224276e35a08c450088695f07520f6afc6d..2998eabc3b48ecdd11411941a150331845f04793 100644
--- a/src/effects/SkArithmeticMode_gpu.h
+++ b/src/effects/SkArithmeticMode_gpu.h
@@ -13,7 +13,6 @@
#if SK_SUPPORT_GPU
#include "GrCoordTransform.h"
-#include "GrDrawTargetCaps.h"
#include "GrFragmentProcessor.h"
#include "GrTextureAccess.h"
#include "GrTypes.h"
@@ -73,16 +72,15 @@
class GrArithmeticXP : public GrXferProcessor {
public:
- static GrXferProcessor* Create(float k1, float k2, float k3, float k4, bool enforcePMColor,
- const GrDeviceCoordTexture* dstCopy,
- bool willReadDstColor) {
- return SkNEW_ARGS(GrArithmeticXP, (k1, k2, k3, k4, enforcePMColor, dstCopy,
- willReadDstColor));
+ static GrXferProcessor* Create(float k1, float k2, float k3, float k4, bool enforcePMColor) {
+ return SkNEW_ARGS(GrArithmeticXP, (k1, k2, k3, k4, enforcePMColor));
}
~GrArithmeticXP() SK_OVERRIDE {};
const char* name() const SK_OVERRIDE { return "Arithmetic"; }
+
+ void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE;
GrGLXferProcessor* createGLInstance() const SK_OVERRIDE;
@@ -107,10 +105,7 @@
bool enforcePMColor() const { return fEnforcePMColor; }
private:
- GrArithmeticXP(float k1, float k2, float k3, float k4, bool enforcePMColor,
- const GrDeviceCoordTexture* dstCopy, bool willReadDstColor);
-
- void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE;
+ GrArithmeticXP(float k1, float k2, float k3, float k4, bool enforcePMColor);
bool onIsEqual(const GrXferProcessor& xpBase) const SK_OVERRIDE {
const GrArithmeticXP& xp = xpBase.cast<GrArithmeticXP>();
@@ -138,6 +133,11 @@
return SkNEW_ARGS(GrArithmeticXPFactory, (k1, k2, k3, k4, enforcePMColor));
}
+ GrXferProcessor* createXferProcessor(const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI) const SK_OVERRIDE {
+ return GrArithmeticXP::Create(fK1, fK2, fK3, fK4, fEnforcePMColor);
+ }
+
bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const SK_OVERRIDE {
return true;
}
@@ -154,17 +154,10 @@
void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
GrXPFactory::InvariantOutput*) const SK_OVERRIDE;
+ bool willReadDst() const SK_OVERRIDE { return true; }
+
private:
GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePMColor);
-
- GrXferProcessor* onCreateXferProcessor(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI,
- const GrDeviceCoordTexture* dstCopy) const SK_OVERRIDE {
- return GrArithmeticXP::Create(fK1, fK2, fK3, fK4, fEnforcePMColor, dstCopy,
- this->willReadDstColor());
- }
-
- bool willReadDstColor() const SK_OVERRIDE { return true; }
bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE {
const GrArithmeticXPFactory& xpf = xpfBase.cast<GrArithmeticXPFactory>();
« no previous file with comments | « include/gpu/effects/GrPorterDuffXferProcessor.h ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698