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

Unified Diff: src/effects/SkMagnifierImageFilter.cpp

Issue 1438003003: Move all ShaderBuilder files to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@glslProgBuild
Patch Set: nits 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/effects/SkLumaColorFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkMagnifierImageFilter.cpp
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index c7d3d5ae2d1a48ceefa471ca09fb22498ea54ca6..2d90c4478139d27dbc0192633c7a5c3d33f6f764 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -19,7 +19,8 @@
#include "effects/GrSingleTextureEffect.h"
#include "gl/GrGLFragmentProcessor.h"
#include "gl/GrGLTexture.h"
-#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLFragmentShaderBuilder.h"
+#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
class GrMagnifierEffect : public GrSingleTextureEffect {
@@ -121,23 +122,19 @@ GrGLMagnifierEffect::GrGLMagnifierEffect(const GrProcessor&) {
void GrGLMagnifierEffect::emitCode(EmitArgs& args) {
fOffsetVar = args.fBuilder->addUniform(
- GrGLProgramBuilder::kFragment_Visibility |
- GrGLProgramBuilder::kVertex_Visibility,
+ GrGLSLProgramBuilder::kFragment_Visibility,
kVec2f_GrSLType, kDefault_GrSLPrecision, "Offset");
fInvZoomVar = args.fBuilder->addUniform(
- GrGLProgramBuilder::kFragment_Visibility |
- GrGLProgramBuilder::kVertex_Visibility,
+ GrGLSLProgramBuilder::kFragment_Visibility,
kVec2f_GrSLType, kDefault_GrSLPrecision, "InvZoom");
fInvInsetVar = args.fBuilder->addUniform(
- GrGLProgramBuilder::kFragment_Visibility |
- GrGLProgramBuilder::kVertex_Visibility,
+ GrGLSLProgramBuilder::kFragment_Visibility,
kVec2f_GrSLType, kDefault_GrSLPrecision, "InvInset");
fBoundsVar = args.fBuilder->addUniform(
- GrGLProgramBuilder::kFragment_Visibility |
- GrGLProgramBuilder::kVertex_Visibility,
+ GrGLSLProgramBuilder::kFragment_Visibility,
kVec4f_GrSLType, kDefault_GrSLPrecision, "Bounds");
- GrGLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder();
+ GrGLSLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder();
SkString coords2D = fsBuilder->ensureFSCoords2D(args.fCoords, 0);
fsBuilder->codeAppendf("\t\tvec2 coord = %s;\n", coords2D.c_str());
fsBuilder->codeAppendf("\t\tvec2 zoom_coord = %s + %s * %s;\n",
« no previous file with comments | « src/effects/SkLumaColorFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698