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

Unified Diff: src/effects/SkColorCubeFilter.cpp

Issue 920933002: fix for uniform view matrix being uploaded but not used (Closed) Base URL: https://skia.googlesource.com/skia.git@gp_cleanup_1
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 | « no previous file | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorCubeFilter.cpp
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp
index df9f5ea6efbac8811bebfcfa107a102bbbbb3152..31876aa1ec769f0aa89495cfee6bcdeaee9abfb2 100644
--- a/src/effects/SkColorCubeFilter.cpp
+++ b/src/effects/SkColorCubeFilter.cpp
@@ -231,7 +231,6 @@ private:
GrColorCubeEffect(GrTexture* colorCube);
- GrCoordTransform fColorCubeTransform;
GrTextureAccess fColorCubeAccess;
typedef GrFragmentProcessor INHERITED;
@@ -240,10 +239,8 @@ private:
///////////////////////////////////////////////////////////////////////////////
GrColorCubeEffect::GrColorCubeEffect(GrTexture* colorCube)
- : fColorCubeTransform(kLocal_GrCoordSet, colorCube, GrTextureParams::kBilerp_FilterMode)
- , fColorCubeAccess(colorCube, "bgra", GrTextureParams::kBilerp_FilterMode) {
+ : fColorCubeAccess(colorCube, "bgra", GrTextureParams::kBilerp_FilterMode) {
this->initClassID<GrColorCubeEffect>();
- this->addCoordTransform(&fColorCubeTransform);
this->addTextureAccess(&fColorCubeAccess);
}
@@ -319,9 +316,9 @@ void GrColorCubeEffect::GLProcessor::emitCode(GrGLFPBuilder* builder,
// Apply the cube.
fsBuilder->codeAppendf("%s = vec4(mix(", outputColor);
- fsBuilder->appendTextureLookup(samplers[0], cCoords1, coords[0].getType());
+ fsBuilder->appendTextureLookup(samplers[0], cCoords1);
fsBuilder->codeAppend(".rgb, ");
- fsBuilder->appendTextureLookup(samplers[0], cCoords2, coords[0].getType());
+ fsBuilder->appendTextureLookup(samplers[0], cCoords2);
// Premultiply color by alpha. Note that the input alpha is not modified by this shader.
fsBuilder->codeAppendf(".rgb, fract(%s.b)) * vec3(%s), %s.a);\n",
@@ -338,7 +335,6 @@ void GrColorCubeEffect::GLProcessor::setData(const GrGLProgramDataManager& pdman
void GrColorCubeEffect::GLProcessor::GenKey(const GrProcessor& proc,
const GrGLCaps&, GrProcessorKeyBuilder* b) {
- b->add32(1); // Always same shader for now
}
GrFragmentProcessor* SkColorCubeFilter::asFragmentProcessor(GrContext* context) const {
« no previous file with comments | « no previous file | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698