| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The Android Open Source Project | 2 * Copyright 2011 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 "SkBlurImageFilter.h" | 8 #include "SkBlurImageFilter.h" |
| 9 | 9 |
| 10 #include "SkAutoPixmapStorage.h" | 10 #include "SkAutoPixmapStorage.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 | 109 |
| 110 offset->fX = dstBounds.fLeft; | 110 offset->fX = dstBounds.fLeft; |
| 111 offset->fY = dstBounds.fTop; | 111 offset->fY = dstBounds.fTop; |
| 112 inputBounds.offset(-inputOffset); | 112 inputBounds.offset(-inputOffset); |
| 113 dstBounds.offset(-inputOffset); | 113 dstBounds.offset(-inputOffset); |
| 114 SkRect inputBoundsF(SkRect::Make(inputBounds)); | 114 SkRect inputBoundsF(SkRect::Make(inputBounds)); |
| 115 SkAutoTUnref<GrTexture> tex(SkGpuBlurUtils::GaussianBlur(context, | 115 SkAutoTUnref<GrTexture> tex(SkGpuBlurUtils::GaussianBlur(context, |
| 116 inputTexture, | 116 inputTexture, |
| 117 false, | 117 false, |
| 118 source->props()
.allowSRGBInputs(), | 118 source->props()
.isGammaCorrect(), |
| 119 SkRect::Make(ds
tBounds), | 119 SkRect::Make(ds
tBounds), |
| 120 &inputBoundsF, | 120 &inputBoundsF, |
| 121 sigma.x(), | 121 sigma.x(), |
| 122 sigma.y())); | 122 sigma.y())); |
| 123 if (!tex) { | 123 if (!tex) { |
| 124 return nullptr; | 124 return nullptr; |
| 125 } | 125 } |
| 126 | 126 |
| 127 return SkSpecialImage::MakeFromGpu(source->internal_getProxy(), | 127 return SkSpecialImage::MakeFromGpu(source->internal_getProxy(), |
| 128 SkIRect::MakeWH(dstBounds.width(), ds
tBounds.height()), | 128 SkIRect::MakeWH(dstBounds.width(), ds
tBounds.height()), |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 str->appendf("SkBlurImageFilter: ("); | 242 str->appendf("SkBlurImageFilter: ("); |
| 243 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight); | 243 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight); |
| 244 | 244 |
| 245 if (this->getInput(0)) { | 245 if (this->getInput(0)) { |
| 246 this->getInput(0)->toString(str); | 246 this->getInput(0)->toString(str); |
| 247 } | 247 } |
| 248 | 248 |
| 249 str->append("))"); | 249 str->append("))"); |
| 250 } | 250 } |
| 251 #endif | 251 #endif |
| OLD | NEW |