| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 Gr1DKernelEffect_DEFINED | 8 #ifndef Gr1DKernelEffect_DEFINED |
| 9 #define Gr1DKernelEffect_DEFINED | 9 #define Gr1DKernelEffect_DEFINED |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 , fRadius(radius) {} | 36 , fRadius(radius) {} |
| 37 | 37 |
| 38 virtual ~Gr1DKernelEffect() {}; | 38 virtual ~Gr1DKernelEffect() {}; |
| 39 | 39 |
| 40 static int WidthFromRadius(int radius) { return 2 * radius + 1; } | 40 static int WidthFromRadius(int radius) { return 2 * radius + 1; } |
| 41 | 41 |
| 42 int radius() const { return fRadius; } | 42 int radius() const { return fRadius; } |
| 43 int width() const { return WidthFromRadius(fRadius); } | 43 int width() const { return WidthFromRadius(fRadius); } |
| 44 Direction direction() const { return fDirection; } | 44 Direction direction() const { return fDirection; } |
| 45 | 45 |
| 46 SkString dumpInfo() const override { |
| 47 SkString str; |
| 48 str.appendf("Direction: %s, Radius: %d ", kX_Direction == fDirection ? "
X" : "Y", fRadius); |
| 49 str.append(INHERITED::dumpInfo()); |
| 50 return str; |
| 51 } |
| 52 |
| 46 private: | 53 private: |
| 47 | 54 |
| 48 Direction fDirection; | 55 Direction fDirection; |
| 49 int fRadius; | 56 int fRadius; |
| 50 | 57 |
| 51 typedef GrSingleTextureEffect INHERITED; | 58 typedef GrSingleTextureEffect INHERITED; |
| 52 }; | 59 }; |
| 53 | 60 |
| 54 #endif | 61 #endif |
| OLD | NEW |