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

Unified Diff: src/effects/SkArithmeticMode_gpu.h

Issue 860383007: Move GrXferProcessor subclasses into cpp files (Closed) Base URL: https://skia.googlesource.com/skia.git@playDstCpy
Patch Set: Rebase 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..ddcfb0b2f4c646bea6f08e1b464c9b6b8bc23af2 100644
--- a/src/effects/SkArithmeticMode_gpu.h
+++ b/src/effects/SkArithmeticMode_gpu.h
@@ -71,67 +71,6 @@ private:
// Xfer Processor
///////////////////////////////////////////////////////////////////////////////
-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));
- }
-
- ~GrArithmeticXP() SK_OVERRIDE {};
-
- const char* name() const SK_OVERRIDE { return "Arithmetic"; }
-
- GrGLXferProcessor* createGLInstance() const SK_OVERRIDE;
-
- bool hasSecondaryOutput() const SK_OVERRIDE { return false; }
-
- GrXferProcessor::OptFlags getOptimizations(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI,
- bool doesStencilWrite,
- GrColor* overrideColor,
- const GrDrawTargetCaps& caps) SK_OVERRIDE;
-
- void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const SK_OVERRIDE {
- blendInfo->fSrcBlend = kOne_GrBlendCoeff;
- blendInfo->fDstBlend = kZero_GrBlendCoeff;
- blendInfo->fBlendConstant = 0;
- }
-
- float k1() const { return fK1; }
- float k2() const { return fK2; }
- float k3() const { return fK3; }
- float k4() const { return fK4; }
- 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;
-
- bool onIsEqual(const GrXferProcessor& xpBase) const SK_OVERRIDE {
- const GrArithmeticXP& xp = xpBase.cast<GrArithmeticXP>();
- if (fK1 != xp.fK1 ||
- fK2 != xp.fK2 ||
- fK3 != xp.fK3 ||
- fK4 != xp.fK4 ||
- fEnforcePMColor != xp.fEnforcePMColor) {
- return false;
- }
- return true;
- }
-
- float fK1, fK2, fK3, fK4;
- bool fEnforcePMColor;
-
- typedef GrXferProcessor INHERITED;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-
class GrArithmeticXPFactory : public GrXPFactory {
public:
static GrXPFactory* Create(float k1, float k2, float k3, float k4, bool enforcePMColor) {
@@ -159,10 +98,7 @@ private:
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());
- }
+ const GrDeviceCoordTexture* dstCopy) const SK_OVERRIDE;
bool willReadDstColor() const SK_OVERRIDE { return true; }
« 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