| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 inputTexture.g
et(), | 125 inputTexture.g
et(), |
| 126 source->props(
).isGammaCorrect(), | 126 source->props(
).isGammaCorrect(), |
| 127 dstBounds, | 127 dstBounds, |
| 128 &inputBounds, | 128 &inputBounds, |
| 129 sigma.x(), | 129 sigma.x(), |
| 130 sigma.y())); | 130 sigma.y())); |
| 131 if (!drawContext) { | 131 if (!drawContext) { |
| 132 return nullptr; | 132 return nullptr; |
| 133 } | 133 } |
| 134 | 134 |
| 135 // TODO: Get the colorSpace from the drawContext (once it has one) |
| 135 return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(dstBounds.width(), ds
tBounds.height()), | 136 return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(dstBounds.width(), ds
tBounds.height()), |
| 136 kNeedNewImageUniqueID_SpecialImage, | 137 kNeedNewImageUniqueID_SpecialImage, |
| 137 drawContext->asTexture(), &source->pr
ops()); | 138 drawContext->asTexture(), |
| 139 sk_ref_sp(input->getColorSpace()), &s
ource->props()); |
| 138 } | 140 } |
| 139 #endif | 141 #endif |
| 140 | 142 |
| 141 int kernelSizeX, kernelSizeX3, lowOffsetX, highOffsetX; | 143 int kernelSizeX, kernelSizeX3, lowOffsetX, highOffsetX; |
| 142 int kernelSizeY, kernelSizeY3, lowOffsetY, highOffsetY; | 144 int kernelSizeY, kernelSizeY3, lowOffsetY, highOffsetY; |
| 143 get_box3_params(sigma.x(), &kernelSizeX, &kernelSizeX3, &lowOffsetX, &highOf
fsetX); | 145 get_box3_params(sigma.x(), &kernelSizeX, &kernelSizeX3, &lowOffsetX, &highOf
fsetX); |
| 144 get_box3_params(sigma.y(), &kernelSizeY, &kernelSizeY3, &lowOffsetY, &highOf
fsetY); | 146 get_box3_params(sigma.y(), &kernelSizeY, &kernelSizeY3, &lowOffsetY, &highOf
fsetY); |
| 145 | 147 |
| 146 if (kernelSizeX < 0 || kernelSizeY < 0) { | 148 if (kernelSizeX < 0 || kernelSizeY < 0) { |
| 147 return nullptr; | 149 return nullptr; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 str->appendf("SkBlurImageFilter: ("); | 250 str->appendf("SkBlurImageFilter: ("); |
| 249 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight); | 251 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight); |
| 250 | 252 |
| 251 if (this->getInput(0)) { | 253 if (this->getInput(0)) { |
| 252 this->getInput(0)->toString(str); | 254 this->getInput(0)->toString(str); |
| 253 } | 255 } |
| 254 | 256 |
| 255 str->append("))"); | 257 str->append("))"); |
| 256 } | 258 } |
| 257 #endif | 259 #endif |
| OLD | NEW |