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

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

Issue 1896013003: Revert of Refactor how we store and use samplers in Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « gyp/gpu.gypi ('k') | src/effects/gradients/SkGradientShader.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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBlurMaskFilter.h" 8 #include "SkBlurMaskFilter.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkGpuBlurUtils.h" 10 #include "SkGpuBlurUtils.h"
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 private: 684 private:
685 typedef GrGLSLProgramDataManager::UniformHandle UniformHandle; 685 typedef GrGLSLProgramDataManager::UniformHandle UniformHandle;
686 686
687 UniformHandle fProxyRectUniform; 687 UniformHandle fProxyRectUniform;
688 UniformHandle fProfileSizeUniform; 688 UniformHandle fProfileSizeUniform;
689 689
690 typedef GrGLSLFragmentProcessor INHERITED; 690 typedef GrGLSLFragmentProcessor INHERITED;
691 }; 691 };
692 692
693 void OutputRectBlurProfileLookup(GrGLSLFPFragmentBuilder* fragBuilder, 693 void OutputRectBlurProfileLookup(GrGLSLFPFragmentBuilder* fragBuilder,
694 GrGLSLFragmentProcessor::SamplerHandle sampler, 694 const GrGLSLSampler& sampler,
695 const char *output, 695 const char *output,
696 const char *profileSize, const char *loc, 696 const char *profileSize, const char *loc,
697 const char *blurred_width, 697 const char *blurred_width,
698 const char *sharp_width) { 698 const char *sharp_width) {
699 fragBuilder->codeAppendf("float %s;", output); 699 fragBuilder->codeAppendf("float %s;", output);
700 fragBuilder->codeAppendf("{"); 700 fragBuilder->codeAppendf("{");
701 fragBuilder->codeAppendf("float coord = ((abs(%s - 0.5 * %s) - 0.5 * %s)) / %s;", 701 fragBuilder->codeAppendf("float coord = ((abs(%s - 0.5 * %s) - 0.5 * %s)) / %s;",
702 loc, blurred_width, sharp_width, profileSize); 702 loc, blurred_width, sharp_width, profileSize);
703 fragBuilder->codeAppendf("%s = ", output); 703 fragBuilder->codeAppendf("%s = ", output);
704 fragBuilder->appendTextureLookup(sampler, "vec2(coord,0.5)"); 704 fragBuilder->appendTextureLookup(sampler, "vec2(coord,0.5)");
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 } else { 1315 } else {
1316 str->append("None"); 1316 str->append("None");
1317 } 1317 }
1318 str->append("))"); 1318 str->append("))");
1319 } 1319 }
1320 #endif 1320 #endif
1321 1321
1322 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1322 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1323 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1323 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1324 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1324 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698