| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |