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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 if (paint.getMaskFilter()->canFilterMaskGPU(devRRect.rect(), | 557 if (paint.getMaskFilter()->canFilterMaskGPU(devRRect.rect(), |
558 draw.fClip->getBound
s(), | 558 draw.fClip->getBound
s(), |
559 *draw.fMatrix, | 559 *draw.fMatrix, |
560 &maskRect)) { | 560 &maskRect)) { |
561 SkIRect finalIRect; | 561 SkIRect finalIRect; |
562 maskRect.roundOut(&finalIRect); | 562 maskRect.roundOut(&finalIRect); |
563 if (draw.fClip->quickReject(finalIRect)) { | 563 if (draw.fClip->quickReject(finalIRect)) { |
564 // clipped out | 564 // clipped out |
565 return; | 565 return; |
566 } | 566 } |
567 if (paint.getMaskFilter()->directFilterRRectMaskGPU(fContext
, | 567 if (paint.getMaskFilter()->directFilterRRectMaskGPU(fContext
->textureProvider(), |
| 568 fDrawCon
text, |
568 fRenderT
arget, | 569 fRenderT
arget, |
569 &grPaint
, | 570 &grPaint
, |
570 fClip, | 571 fClip, |
571 *draw.fM
atrix, | 572 *draw.fM
atrix, |
572 strokeIn
fo, | 573 strokeIn
fo, |
573 devRRect
)) { | 574 devRRect
)) { |
574 return; | 575 return; |
575 } | 576 } |
576 } | 577 } |
577 | 578 |
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1886 #endif | 1887 #endif |
1887 } | 1888 } |
1888 | 1889 |
1889 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1890 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
1890 // We always return a transient cache, so it is freed after each | 1891 // We always return a transient cache, so it is freed after each |
1891 // filter traversal. | 1892 // filter traversal. |
1892 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 1893 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
1893 } | 1894 } |
1894 | 1895 |
1895 #endif | 1896 #endif |
OLD | NEW |