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

Unified Diff: src/gpu/gl/GrGLProgramDesc.h

Issue 13314002: Add support for reading the dst pixel value in an effect. Use in a new effect for the kDarken xfer … (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Revert whitespace/comment changes accidentally made in GrGLProgramDesc.cpp Created 7 years, 9 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/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramDesc.h
===================================================================
--- src/gpu/gl/GrGLProgramDesc.h (revision 8448)
+++ src/gpu/gl/GrGLProgramDesc.h (working copy)
@@ -10,6 +10,7 @@
#include "GrGLEffect.h"
#include "GrDrawState.h"
+#include "GrGLShaderBuilder.h"
class GrGpuGL;
@@ -18,9 +19,10 @@
#define GR_GL_EXPERIMENTAL_GS GR_DEBUG
-/** This class describes a program to generate. It also serves as a program cache key. The only
- thing GL-specific about this is the generation of GrGLEffect::EffectKeys. With some refactoring
- it could be made backend-neutral. */
+/** This class describes a program to generate. It also serves as a program cache key. Very little
+ of this is GL-specific. There is the generation of GrGLEffect::EffectKeys and the dst-read part
+ of the key set by GrGLShaderBuilder. If the interfaces that set those portions were abstracted
+ to be API-neutral then so could this class. */
class GrGLProgramDesc {
public:
GrGLProgramDesc() {
@@ -48,6 +50,7 @@
GrBlendCoeff srcCoeff,
GrBlendCoeff dstCoeff,
const GrGpuGL* gpu,
+ const GrDeviceCoordTexture* dstCopy,
GrGLProgramDesc* outDesc);
private:
@@ -86,6 +89,10 @@
#if GR_GL_EXPERIMENTAL_GS
bool fExperimentalGS;
#endif
+ GrGLShaderBuilder::DstReadKey fDstRead; // set by GrGLShaderBuilder if there
+ // are effects that must read the dst.
+ // Otherwise, 0.
+
uint8_t fColorInput; // casts to enum ColorInput
uint8_t fCoverageInput; // casts to enum ColorInput
uint8_t fDualSrcOutput; // casts to enum DualSrcOutput
@@ -98,8 +105,10 @@
int8_t fCoverageAttributeIndex;
int8_t fLocalCoordsAttributeIndex;
- // GrGLProgram reads the private fields to generate code.
+ // GrGLProgram and GrGLShaderBuilder read the private fields to generate code. TODO: Move all
+ // code generation to GrGLShaderBuilder (and maybe add getters rather than friending).
friend class GrGLProgram;
+ friend class GrGLShaderBuilder;
};
#endif
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698