| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 if (!this->applyCropRect(this->mapContext(ctx), inputBounds, &dstBounds)) { | 87 if (!this->applyCropRect(this->mapContext(ctx), inputBounds, &dstBounds)) { |
| 88 return nullptr; | 88 return nullptr; |
| 89 } | 89 } |
| 90 if (!inputBounds.intersect(dstBounds)) { | 90 if (!inputBounds.intersect(dstBounds)) { |
| 91 return nullptr; | 91 return nullptr; |
| 92 } | 92 } |
| 93 | 93 |
| 94 const SkVector sigma = map_sigma(fSigma, ctx.ctm()); | 94 const SkVector sigma = map_sigma(fSigma, ctx.ctm()); |
| 95 | 95 |
| 96 #if SK_SUPPORT_GPU | 96 #if SK_SUPPORT_GPU |
| 97 if (input->peekTexture()) { | 97 if (input->peekTexture() && input->peekTexture()->getContext()) { |
| 98 if (0 == sigma.x() && 0 == sigma.y()) { | 98 if (0 == sigma.x() && 0 == sigma.y()) { |
| 99 offset->fX = inputBounds.x(); | 99 offset->fX = inputBounds.x(); |
| 100 offset->fY = inputBounds.y(); | 100 offset->fY = inputBounds.y(); |
| 101 return input->makeSubset(inputBounds.makeOffset(-inputOffset.x(), | 101 return input->makeSubset(inputBounds.makeOffset(-inputOffset.x(), |
| 102 -inputOffset.y())); | 102 -inputOffset.y())); |
| 103 } | 103 } |
| 104 | 104 |
| 105 GrTexture* inputTexture = input->peekTexture(); | 105 GrTexture* inputTexture = input->peekTexture(); |
| 106 | 106 |
| 107 offset->fX = dstBounds.fLeft; | 107 offset->fX = dstBounds.fLeft; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 str->appendf("SkBlurImageFilter: ("); | 238 str->appendf("SkBlurImageFilter: ("); |
| 239 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight); | 239 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight); |
| 240 | 240 |
| 241 if (this->getInput(0)) { | 241 if (this->getInput(0)) { |
| 242 this->getInput(0)->toString(str); | 242 this->getInput(0)->toString(str); |
| 243 } | 243 } |
| 244 | 244 |
| 245 str->append("))"); | 245 str->append("))"); |
| 246 } | 246 } |
| 247 #endif | 247 #endif |
| OLD | NEW |