| 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 "effects/GrBicubicEffect.h" | 10 #include "effects/GrBicubicEffect.h" |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 SkMaskFilter* filter, const SkRegion& clip, | 585 SkMaskFilter* filter, const SkRegion& clip, |
| 586 GrPaint* grp, SkPaint::Style style) { | 586 GrPaint* grp, SkPaint::Style style) { |
| 587 SkMask srcM, dstM; | 587 SkMask srcM, dstM; |
| 588 | 588 |
| 589 if (!SkDraw::DrawToMask(devPath, &clip.getBounds(), filter, &context->getMat
rix(), &srcM, | 589 if (!SkDraw::DrawToMask(devPath, &clip.getBounds(), filter, &context->getMat
rix(), &srcM, |
| 590 SkMask::kComputeBoundsAndRenderImage_CreateMode, sty
le)) { | 590 SkMask::kComputeBoundsAndRenderImage_CreateMode, sty
le)) { |
| 591 return false; | 591 return false; |
| 592 } | 592 } |
| 593 SkAutoMaskFreeImage autoSrc(srcM.fImage); | 593 SkAutoMaskFreeImage autoSrc(srcM.fImage); |
| 594 | 594 |
| 595 if (!filter->filterMask(&dstM, srcM, context->getMatrix(), NULL)) { | 595 if (!filter->filterMask(&dstM, srcM, context->getMatrix(), NULL, NULL)) { |
| 596 return false; | 596 return false; |
| 597 } | 597 } |
| 598 // this will free-up dstM when we're done (allocated in filterMask()) | 598 // this will free-up dstM when we're done (allocated in filterMask()) |
| 599 SkAutoMaskFreeImage autoDst(dstM.fImage); | 599 SkAutoMaskFreeImage autoDst(dstM.fImage); |
| 600 | 600 |
| 601 if (clip.quickReject(dstM.fBounds)) { | 601 if (clip.quickReject(dstM.fBounds)) { |
| 602 return false; | 602 return false; |
| 603 } | 603 } |
| 604 | 604 |
| 605 // we now have a device-aligned 8bit mask in dstM, ready to be drawn using | 605 // we now have a device-aligned 8bit mask in dstM, ready to be drawn using |
| (...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1858 GrLayerHoister::UnlockLayers(fContext, atlased, nonAtlased, recycled); | 1858 GrLayerHoister::UnlockLayers(fContext, atlased, nonAtlased, recycled); |
| 1859 | 1859 |
| 1860 return true; | 1860 return true; |
| 1861 } | 1861 } |
| 1862 | 1862 |
| 1863 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1863 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
| 1864 // We always return a transient cache, so it is freed after each | 1864 // We always return a transient cache, so it is freed after each |
| 1865 // filter traversal. | 1865 // filter traversal. |
| 1866 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 1866 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
| 1867 } | 1867 } |
| OLD | NEW |