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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 // setup new clip | 216 // setup new clip |
217 GrFixedClip clip(localDstBounds); | 217 GrFixedClip clip(localDstBounds); |
218 | 218 |
219 sk_sp<GrTexture> srcTexture(sk_ref_sp(origSrc)); | 219 sk_sp<GrTexture> srcTexture(sk_ref_sp(origSrc)); |
220 | 220 |
221 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() || | 221 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() || |
222 kRGBA_8888_GrPixelConfig == srcTexture->config() || | 222 kRGBA_8888_GrPixelConfig == srcTexture->config() || |
223 kSRGBA_8888_GrPixelConfig == srcTexture->config() || | 223 kSRGBA_8888_GrPixelConfig == srcTexture->config() || |
224 kSBGRA_8888_GrPixelConfig == srcTexture->config() || | 224 kSBGRA_8888_GrPixelConfig == srcTexture->config() || |
| 225 kRGBA_half_GrPixelConfig == srcTexture->config() || |
225 kAlpha_8_GrPixelConfig == srcTexture->config()); | 226 kAlpha_8_GrPixelConfig == srcTexture->config()); |
226 | 227 |
227 const int width = dstBounds.width(); | 228 const int width = dstBounds.width(); |
228 const int height = dstBounds.height(); | 229 const int height = dstBounds.height(); |
229 const GrPixelConfig config = srcTexture->config(); | 230 const GrPixelConfig config = srcTexture->config(); |
230 | 231 |
231 sk_sp<GrDrawContext> dstDrawContext(context->makeDrawContext(fit, | 232 sk_sp<GrDrawContext> dstDrawContext(context->makeDrawContext(fit, |
232 width, height,
config, colorSpace, | 233 width, height,
config, colorSpace, |
233 0, kDefault_GrS
urfaceOrigin)); | 234 0, kDefault_GrS
urfaceOrigin)); |
234 if (!dstDrawContext) { | 235 if (!dstDrawContext) { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 dstDrawContext.swap(tmpDrawContext); | 374 dstDrawContext.swap(tmpDrawContext); |
374 } | 375 } |
375 | 376 |
376 return srcDrawContext; | 377 return srcDrawContext; |
377 } | 378 } |
378 | 379 |
379 } | 380 } |
380 | 381 |
381 #endif | 382 #endif |
382 | 383 |
OLD | NEW |