| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } else { | 189 } else { |
| 190 srcRect = localDstBounds; | 190 srcRect = localDstBounds; |
| 191 } | 191 } |
| 192 | 192 |
| 193 scale_rect(&srcRect, 1.0f / scaleFactorX, 1.0f / scaleFactorY); | 193 scale_rect(&srcRect, 1.0f / scaleFactorX, 1.0f / scaleFactorY); |
| 194 srcRect.roundOut(&srcRect); | 194 srcRect.roundOut(&srcRect); |
| 195 scale_rect(&srcRect, static_cast<float>(scaleFactorX), | 195 scale_rect(&srcRect, static_cast<float>(scaleFactorX), |
| 196 static_cast<float>(scaleFactorY)); | 196 static_cast<float>(scaleFactorY)); |
| 197 | 197 |
| 198 // setup new clip | 198 // setup new clip |
| 199 GrClip clip(localDstBounds); | 199 GrFixedClip clip; |
| 200 clip.resetNonAA(localDstBounds); |
| 200 | 201 |
| 201 sk_sp<GrTexture> srcTexture(sk_ref_sp(origSrc)); | 202 sk_sp<GrTexture> srcTexture(sk_ref_sp(origSrc)); |
| 202 | 203 |
| 203 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() || | 204 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() || |
| 204 kRGBA_8888_GrPixelConfig == srcTexture->config() || | 205 kRGBA_8888_GrPixelConfig == srcTexture->config() || |
| 205 kSRGBA_8888_GrPixelConfig == srcTexture->config() || | 206 kSRGBA_8888_GrPixelConfig == srcTexture->config() || |
| 206 kSBGRA_8888_GrPixelConfig == srcTexture->config() || | 207 kSBGRA_8888_GrPixelConfig == srcTexture->config() || |
| 207 kAlpha_8_GrPixelConfig == srcTexture->config()); | 208 kAlpha_8_GrPixelConfig == srcTexture->config()); |
| 208 | 209 |
| 209 const int width = SkScalarFloorToInt(dstBounds.width()); | 210 const int width = SkScalarFloorToInt(dstBounds.width()); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 srcDrawContext = dstDrawContext; | 359 srcDrawContext = dstDrawContext; |
| 359 srcRect = dstRect; | 360 srcRect = dstRect; |
| 360 dstDrawContext.swap(tmpDrawContext); | 361 dstDrawContext.swap(tmpDrawContext); |
| 361 } | 362 } |
| 362 | 363 |
| 363 return srcDrawContext; | 364 return srcDrawContext; |
| 364 } | 365 } |
| 365 #endif | 366 #endif |
| 366 | 367 |
| 367 } | 368 } |
| OLD | NEW |