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

Unified Diff: src/gpu/gl/GrGLProgram.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/SkGpuDevice.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgram.h
===================================================================
--- src/gpu/gl/GrGLProgram.h (revision 8448)
+++ src/gpu/gl/GrGLProgram.h (working copy)
@@ -102,7 +102,11 @@
*
* The color and coverage params override the GrDrawState's getColor() and getCoverage() values.
*/
- void setData(GrGpuGL*, GrColor color, GrColor coverage, SharedGLState*);
+ void setData(GrGpuGL*,
+ GrColor color,
+ GrColor coverage,
+ const GrDeviceCoordTexture* dstCopy, // can be NULL
+ SharedGLState*);
private:
GrGLProgram(const GrGLContext& gl,
@@ -154,11 +158,18 @@
UniformHandle fColorUni;
UniformHandle fCoverageUni;
UniformHandle fColorFilterUni;
+
// We use the render target height to provide a y-down frag coord when specifying
// origin_upper_left is not supported.
UniformHandle fRTHeightUni;
+
+ // Uniforms for computing texture coords to do the dst-copy lookup
+ UniformHandle fDstCopyTopLeftUni;
+ UniformHandle fDstCopyScaleUni;
+ UniformHandle fDstCopySamplerUni;
+
// An array of sampler uniform handles for each effect.
- SamplerUniSArray fSamplerUnis[GrDrawState::kNumStages];
+ SamplerUniSArray fEffectSamplerUnis[GrDrawState::kNumStages];
UniformHandles() {
fViewMatrixUni = GrGLUniformManager::kInvalidUniformHandle;
@@ -166,6 +177,9 @@
fCoverageUni = GrGLUniformManager::kInvalidUniformHandle;
fColorFilterUni = GrGLUniformManager::kInvalidUniformHandle;
fRTHeightUni = GrGLUniformManager::kInvalidUniformHandle;
+ fDstCopyTopLeftUni = GrGLUniformManager::kInvalidUniformHandle;
+ fDstCopyScaleUni = GrGLUniformManager::kInvalidUniformHandle;
+ fDstCopySamplerUni = GrGLUniformManager::kInvalidUniformHandle;
}
};
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698