| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 srcRect.offset(srcOffset); | 205 srcRect.offset(srcOffset); |
| 206 srcBounds = &localSrcBounds; | 206 srcBounds = &localSrcBounds; |
| 207 } else { | 207 } else { |
| 208 srcRect = localDstBounds; | 208 srcRect = localDstBounds; |
| 209 } | 209 } |
| 210 | 210 |
| 211 scale_irect_roundout(&srcRect, 1.0f / scaleFactorX, 1.0f / scaleFactorY); | 211 scale_irect_roundout(&srcRect, 1.0f / scaleFactorX, 1.0f / scaleFactorY); |
| 212 scale_irect(&srcRect, scaleFactorX, scaleFactorY); | 212 scale_irect(&srcRect, scaleFactorX, scaleFactorY); |
| 213 | 213 |
| 214 // setup new clip | 214 // setup new clip |
| 215 GrClip clip(localDstBounds); | 215 GrFixedClip clip(localDstBounds); |
| 216 | 216 |
| 217 sk_sp<GrTexture> srcTexture(sk_ref_sp(origSrc)); | 217 sk_sp<GrTexture> srcTexture(sk_ref_sp(origSrc)); |
| 218 | 218 |
| 219 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() || | 219 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() || |
| 220 kRGBA_8888_GrPixelConfig == srcTexture->config() || | 220 kRGBA_8888_GrPixelConfig == srcTexture->config() || |
| 221 kSRGBA_8888_GrPixelConfig == srcTexture->config() || | 221 kSRGBA_8888_GrPixelConfig == srcTexture->config() || |
| 222 kSBGRA_8888_GrPixelConfig == srcTexture->config() || | 222 kSBGRA_8888_GrPixelConfig == srcTexture->config() || |
| 223 kAlpha_8_GrPixelConfig == srcTexture->config()); | 223 kAlpha_8_GrPixelConfig == srcTexture->config()); |
| 224 | 224 |
| 225 const int width = dstBounds.width(); | 225 const int width = dstBounds.width(); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 dstDrawContext.swap(tmpDrawContext); | 375 dstDrawContext.swap(tmpDrawContext); |
| 376 } | 376 } |
| 377 | 377 |
| 378 return srcDrawContext; | 378 return srcDrawContext; |
| 379 } | 379 } |
| 380 | 380 |
| 381 } | 381 } |
| 382 | 382 |
| 383 #endif | 383 #endif |
| 384 | 384 |
| OLD | NEW |