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

Unified Diff: src/effects/SkBlurMaskFilter.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/SkArithmeticMode_gpu.cpp ('k') | src/effects/SkColorCubeFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMaskFilter.cpp
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 13c7d45a0e049338587c0686f7ca1a30c0a250a6..2ec5b90a409ba8a8338e35e6de63a38a2a3f2ac2 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -28,7 +28,8 @@
#include "SkDraw.h"
#include "effects/GrSimpleTextureEffect.h"
#include "gl/GrGLFragmentProcessor.h"
-#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLFragmentShaderBuilder.h"
+#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
#include "glsl/GrGLSLTextureSampler.h"
#endif
@@ -696,7 +697,7 @@ private:
typedef GrGLFragmentProcessor INHERITED;
};
-void OutputRectBlurProfileLookup(GrGLFragmentBuilder* fsBuilder,
+void OutputRectBlurProfileLookup(GrGLSLFragmentBuilder* fsBuilder,
const GrGLSLTextureSampler& sampler,
const char *output,
const char *profileSize, const char *loc,
@@ -725,18 +726,18 @@ void GrGLRectBlurEffect::emitCode(EmitArgs& args) {
const char* precisionString = GrGLSLShaderVar::PrecisionString(args.fBuilder->glslCaps(),
fPrecision);
- fProxyRectUniform = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
+ fProxyRectUniform = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
kVec4f_GrSLType,
fPrecision,
"proxyRect",
&rectName);
- fProfileSizeUniform = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
+ fProfileSizeUniform = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
kFloat_GrSLType,
kDefault_GrSLPrecision,
"profileSize",
&profileSizeName);
- GrGLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder();
+ GrGLSLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder();
const char *fragmentPos = fsBuilder->fragmentPosition();
if (args.fInputColor) {
@@ -816,7 +817,7 @@ GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma, GrTexture *b
}
void GrRectBlurEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+ GrProcessorKeyBuilder* b) const {
GrGLRectBlurEffect::GenKey(fPrecision, b);
}
@@ -1066,23 +1067,23 @@ void GrGLRRectBlurEffect::emitCode(EmitArgs& args) {
// The proxy rect has left, top, right, and bottom edges correspond to
// components x, y, z, and w, respectively.
- fProxyRectUniform = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
- kVec4f_GrSLType,
- kDefault_GrSLPrecision,
- "proxyRect",
- &rectName);
- fCornerRadiusUniform = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
- kFloat_GrSLType,
- kDefault_GrSLPrecision,
- "cornerRadius",
- &cornerRadiusName);
- fBlurRadiusUniform = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
- kFloat_GrSLType,
- kDefault_GrSLPrecision,
- "blurRadius",
- &blurRadiusName);
-
- GrGLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder();
+ fProxyRectUniform = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
+ kVec4f_GrSLType,
+ kDefault_GrSLPrecision,
+ "proxyRect",
+ &rectName);
+ fCornerRadiusUniform = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
+ kFloat_GrSLType,
+ kDefault_GrSLPrecision,
+ "cornerRadius",
+ &cornerRadiusName);
+ fBlurRadiusUniform = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
+ kFloat_GrSLType,
+ kDefault_GrSLPrecision,
+ "blurRadius",
+ &blurRadiusName);
+
+ GrGLSLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder();
const char* fragmentPos = fsBuilder->fragmentPosition();
// warp the fragment position to the appropriate part of the 9patch blur texture
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.cpp ('k') | src/effects/SkColorCubeFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698