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/gl/GrGLXferProcessor.h

Issue 1440073002: Move XferProcessors to glsl (Closed) Base URL: https://skia.googlesource.com/skia.git@fragProcs
Patch Set: Created 5 years, 1 month 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/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLXferProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLXferProcessor.h
diff --git a/src/gpu/gl/GrGLXferProcessor.h b/src/gpu/gl/GrGLXferProcessor.h
deleted file mode 100644
index 1e505f3d07b8c295806e85456cc42e982229aeb0..0000000000000000000000000000000000000000
--- a/src/gpu/gl/GrGLXferProcessor.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef GrGLXferProcessor_DEFINED
-#define GrGLXferProcessor_DEFINED
-
-#include "glsl/GrGLSLProgramDataManager.h"
-#include "glsl/GrGLSLTextureSampler.h"
-
-class GrGLSLXPBuilder;
-class GrXferProcessor;
-
-class GrGLXferProcessor {
-public:
- GrGLXferProcessor() {}
- virtual ~GrGLXferProcessor() {}
-
- typedef GrGLSLTextureSampler::TextureSamplerArray TextureSamplerArray;
- struct EmitArgs {
- EmitArgs(GrGLSLXPBuilder* pb,
- const GrXferProcessor& xp,
- const char* inputColor,
- const char* inputCoverage,
- const char* outputPrimary,
- const char* outputSecondary,
- const TextureSamplerArray& samplers)
- : fPB(pb)
- , fXP(xp)
- , fInputColor(inputColor)
- , fInputCoverage(inputCoverage)
- , fOutputPrimary(outputPrimary)
- , fOutputSecondary(outputSecondary)
- , fSamplers(samplers) {}
-
- GrGLSLXPBuilder* fPB;
- const GrXferProcessor& fXP;
- const char* fInputColor;
- const char* fInputCoverage;
- const char* fOutputPrimary;
- const char* fOutputSecondary;
- const TextureSamplerArray& fSamplers;
- };
- /**
- * This is similar to emitCode() in the base class, except it takes a full shader builder.
- * This allows the effect subclass to emit vertex code.
- */
- void emitCode(const EmitArgs&);
-
- /** A GrGLXferProcessor instance can be reused with any GrGLXferProcessor that produces
- the same stage key; this function reads data from a GrGLXferProcessor and uploads any
- uniform variables required by the shaders created in emitCode(). The GrXferProcessor
- parameter is guaranteed to be of the same type that created this GrGLXferProcessor and
- to have an identical processor key as the one that created this GrGLXferProcessor. This
- function calls onSetData on the subclass of GrGLXferProcessor
- */
- void setData(const GrGLSLProgramDataManager& pdm, const GrXferProcessor& xp);
-
-private:
- /**
- * Called by emitCode() when the XP will not be performing a dst read. This method is
- * responsible for both blending and coverage. A subclass only needs to implement this method if
- * it can construct a GrXferProcessor that will not read the dst color.
- */
- virtual void emitOutputsForBlendState(const EmitArgs&) {
- SkFAIL("emitOutputsForBlendState not implemented.");
- }
-
- /**
- * Called by emitCode() when the XP will perform a dst read. This method only needs to supply
- * the blending logic. The base class applies coverage. A subclass only needs to implement this
- * method if it can construct a GrXferProcessor that reads the dst color.
- */
- virtual void emitBlendCodeForDstRead(GrGLSLXPBuilder*,
- const char* srcColor,
- const char* dstColor,
- const char* outColor,
- const GrXferProcessor&) {
- SkFAIL("emitBlendCodeForDstRead not implemented.");
- }
-
- virtual void onSetData(const GrGLSLProgramDataManager&, const GrXferProcessor&) = 0;
-
- GrGLSLProgramDataManager::UniformHandle fDstTopLeftUni;
- GrGLSLProgramDataManager::UniformHandle fDstScaleUni;
-};
-#endif
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698