| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "SkGpuBlurUtils.h" | 8 #include "SkGpuBlurUtils.h" |
| 9 | 9 |
| 10 #include "SkRect.h" | 10 #include "SkRect.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 | 141 |
| 142 GrTexture* GaussianBlur(GrContext* context, | 142 GrTexture* GaussianBlur(GrContext* context, |
| 143 GrTexture* srcTexture, | 143 GrTexture* srcTexture, |
| 144 bool canClobberSrc, | 144 bool canClobberSrc, |
| 145 const SkRect& rect, | 145 const SkRect& rect, |
| 146 bool cropToRect, | 146 bool cropToRect, |
| 147 float sigmaX, | 147 float sigmaX, |
| 148 float sigmaY) { | 148 float sigmaY) { |
| 149 SkASSERT(NULL != context); | 149 SkASSERT(context); |
| 150 | 150 |
| 151 GrContext::AutoRenderTarget art(context); | 151 GrContext::AutoRenderTarget art(context); |
| 152 | 152 |
| 153 GrContext::AutoMatrix am; | 153 GrContext::AutoMatrix am; |
| 154 am.setIdentity(context); | 154 am.setIdentity(context); |
| 155 | 155 |
| 156 SkIRect clearRect; | 156 SkIRect clearRect; |
| 157 int scaleFactorX, radiusX; | 157 int scaleFactorX, radiusX; |
| 158 int scaleFactorY, radiusY; | 158 int scaleFactorY, radiusY; |
| 159 int maxTextureSize = context->getMaxTextureSize(); | 159 int maxTextureSize = context->getMaxTextureSize(); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 } else if (srcTexture == temp2.texture()) { | 300 } else if (srcTexture == temp2.texture()) { |
| 301 return temp2.detach(); | 301 return temp2.detach(); |
| 302 } else { | 302 } else { |
| 303 srcTexture->ref(); | 303 srcTexture->ref(); |
| 304 return srcTexture; | 304 return srcTexture; |
| 305 } | 305 } |
| 306 } | 306 } |
| 307 #endif | 307 #endif |
| 308 | 308 |
| 309 } | 309 } |
| OLD | NEW |