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

Side by Side Diff: src/effects/SkBlurMaskFilter.cpp

Issue 1453623003: Move glsl onto EmitArgs struct for emitCode (Closed) Base URL: https://skia.googlesource.com/skia.git@moveShaders
Patch Set: nit 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 void GrGLRectBlurEffect::GenKey(GrSLPrecision precision, GrProcessorKeyBuilder* b) { 717 void GrGLRectBlurEffect::GenKey(GrSLPrecision precision, GrProcessorKeyBuilder* b) {
718 b->add32(precision); 718 b->add32(precision);
719 } 719 }
720 720
721 721
722 void GrGLRectBlurEffect::emitCode(EmitArgs& args) { 722 void GrGLRectBlurEffect::emitCode(EmitArgs& args) {
723 723
724 const char *rectName; 724 const char *rectName;
725 const char *profileSizeName; 725 const char *profileSizeName;
726 726
727 const char* precisionString = GrGLSLShaderVar::PrecisionString(args.fBuilder ->glslCaps(), 727 const char* precisionString = GrGLSLShaderVar::PrecisionString(args.fGLSLCap s, fPrecision);
728 fPrecision);
729 fProxyRectUniform = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragmen t_Visibility, 728 fProxyRectUniform = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragmen t_Visibility,
730 kVec4f_GrSLType, 729 kVec4f_GrSLType,
731 fPrecision, 730 fPrecision,
732 "proxyRect", 731 "proxyRect",
733 &rectName); 732 &rectName);
734 fProfileSizeUniform = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragm ent_Visibility, 733 fProfileSizeUniform = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragm ent_Visibility,
735 kFloat_GrSLType, 734 kFloat_GrSLType,
736 kDefault_GrSLPrecision, 735 kDefault_GrSLPrecision,
737 "profileSize", 736 "profileSize",
738 &profileSizeName); 737 &profileSizeName);
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 } else { 1303 } else {
1305 str->append("None"); 1304 str->append("None");
1306 } 1305 }
1307 str->append("))"); 1306 str->append("))");
1308 } 1307 }
1309 #endif 1308 #endif
1310 1309
1311 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1310 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1312 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1311 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1313 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1312 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698