| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkGpuDevice.h" | 8 #include "SkGpuDevice.h" |
| 9 | 9 |
| 10 #include "GrBlurUtils.h" | 10 #include "GrBlurUtils.h" |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 if (paint.getMaskFilter()->canFilterMaskGPU(devRRect, | 429 if (paint.getMaskFilter()->canFilterMaskGPU(devRRect, |
| 430 draw.fRC->getBounds(
), | 430 draw.fRC->getBounds(
), |
| 431 *draw.fMatrix, | 431 *draw.fMatrix, |
| 432 &maskRect)) { | 432 &maskRect)) { |
| 433 SkIRect finalIRect; | 433 SkIRect finalIRect; |
| 434 maskRect.roundOut(&finalIRect); | 434 maskRect.roundOut(&finalIRect); |
| 435 if (draw.fRC->quickReject(finalIRect)) { | 435 if (draw.fRC->quickReject(finalIRect)) { |
| 436 // clipped out | 436 // clipped out |
| 437 return; | 437 return; |
| 438 } | 438 } |
| 439 if (paint.getMaskFilter()->directFilterRRectMaskGPU(fContext
->textureProvider(), | 439 if (paint.getMaskFilter()->directFilterRRectMaskGPU(fContext
, |
| 440 fDrawCon
text.get(), | 440 fDrawCon
text.get(), |
| 441 &grPaint
, | 441 &grPaint
, |
| 442 fClip, | 442 fClip, |
| 443 *draw.fM
atrix, | 443 *draw.fM
atrix, |
| 444 style.st
rokeRec(), | 444 style.st
rokeRec(), |
| 445 devRRect
)) { | 445 devRRect
)) { |
| 446 return; | 446 return; |
| 447 } | 447 } |
| 448 } | 448 } |
| 449 | 449 |
| (...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { | 1755 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { |
| 1756 ASSERT_SINGLE_OWNER | 1756 ASSERT_SINGLE_OWNER |
| 1757 // We always return a transient cache, so it is freed after each | 1757 // We always return a transient cache, so it is freed after each |
| 1758 // filter traversal. | 1758 // filter traversal. |
| 1759 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); | 1759 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); |
| 1760 } | 1760 } |
| 1761 | 1761 |
| 1762 #endif | 1762 #endif |
| OLD | NEW |