| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 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 #ifndef GrMatrixConvolutionEffect_DEFINED | 8 #ifndef GrMatrixConvolutionEffect_DEFINED |
| 9 #define GrMatrixConvolutionEffect_DEFINED | 9 #define GrMatrixConvolutionEffect_DEFINED |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, | 21 static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, |
| 22 GrTexture* texture, | 22 GrTexture* texture, |
| 23 const SkIRect& bounds, | 23 const SkIRect& bounds, |
| 24 const SkISize& kernelSize, | 24 const SkISize& kernelSize, |
| 25 const SkScalar* kernel, | 25 const SkScalar* kernel, |
| 26 SkScalar gain, | 26 SkScalar gain, |
| 27 SkScalar bias, | 27 SkScalar bias, |
| 28 const SkIPoint& kernelOffset, | 28 const SkIPoint& kernelOffset, |
| 29 GrTextureDomain::Mode tileMode, | 29 GrTextureDomain::Mode tileMode, |
| 30 bool convolveAlpha) { | 30 bool convolveAlpha) { |
| 31 return SkNEW_ARGS(GrMatrixConvolutionEffect, (procDataManager, | 31 return new GrMatrixConvolutionEffect(procDataManager, texture, bounds, k
ernelSize, kernel, |
| 32 texture, | 32 gain, bias, kernelOffset, tileMode,
convolveAlpha); |
| 33 bounds, | |
| 34 kernelSize, | |
| 35 kernel, | |
| 36 gain, | |
| 37 bias, | |
| 38 kernelOffset, | |
| 39 tileMode, | |
| 40 convolveAlpha)); | |
| 41 } | 33 } |
| 42 | 34 |
| 43 static GrFragmentProcessor* CreateGaussian(GrProcessorDataManager*, | 35 static GrFragmentProcessor* CreateGaussian(GrProcessorDataManager*, |
| 44 GrTexture* texture, | 36 GrTexture* texture, |
| 45 const SkIRect& bounds, | 37 const SkIRect& bounds, |
| 46 const SkISize& kernelSize, | 38 const SkISize& kernelSize, |
| 47 SkScalar gain, | 39 SkScalar gain, |
| 48 SkScalar bias, | 40 SkScalar bias, |
| 49 const SkIPoint& kernelOffset, | 41 const SkIPoint& kernelOffset, |
| 50 GrTextureDomain::Mode tileMode, | 42 GrTextureDomain::Mode tileMode, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 float fKernelOffset[2]; | 88 float fKernelOffset[2]; |
| 97 bool fConvolveAlpha; | 89 bool fConvolveAlpha; |
| 98 GrTextureDomain fDomain; | 90 GrTextureDomain fDomain; |
| 99 | 91 |
| 100 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 92 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
| 101 | 93 |
| 102 typedef GrSingleTextureEffect INHERITED; | 94 typedef GrSingleTextureEffect INHERITED; |
| 103 }; | 95 }; |
| 104 | 96 |
| 105 #endif | 97 #endif |
| OLD | NEW |