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 "SkTypes.h" | 8 #include "SkTypes.h" |
9 #if defined(SK_BUILD_FOR_WIN32) | 9 #if defined(SK_BUILD_FOR_WIN32) |
10 | 10 |
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1621 &clipIRect, | 1621 &clipIRect, |
1622 filter, //just to compute how much to draw. | 1622 filter, //just to compute how much to draw. |
1623 &rasteredMask, | 1623 &rasteredMask, |
1624 SkMask::kComputeBoundsAndRenderImage_CreateMode)) { | 1624 SkMask::kComputeBoundsAndRenderImage_CreateMode)) { |
1625 | 1625 |
1626 SkAutoMaskFreeImage rasteredAmi(rasteredMask.fImage); | 1626 SkAutoMaskFreeImage rasteredAmi(rasteredMask.fImage); |
1627 mask = &rasteredMask; | 1627 mask = &rasteredMask; |
1628 | 1628 |
1629 //[Mask -> Mask] | 1629 //[Mask -> Mask] |
1630 SkMask filteredMask; | 1630 SkMask filteredMask; |
1631 if (filter && | 1631 if (filter && filter->filterMask(&filteredMask, *mask, *d.fMatrix, n
ullptr)) { |
1632 filter->filterMask(&filteredMask, *mask, *d.fMatrix, nullptr)) { | |
1633 | |
1634 mask = &filteredMask; | 1632 mask = &filteredMask; |
1635 } else { | |
1636 filteredMask.fImage = nullptr; | |
1637 } | 1633 } |
1638 SkAutoMaskFreeImage filteredAmi(filteredMask.fImage); | 1634 SkAutoMaskFreeImage filteredAmi(filteredMask.fImage); |
1639 | 1635 |
1640 //Draw mask. | 1636 //Draw mask. |
1641 HRV(this->applyMask(d, *mask, ppuScale, shadedPath.get())); | 1637 HRV(this->applyMask(d, *mask, ppuScale, shadedPath.get())); |
1642 } | 1638 } |
1643 return; | 1639 return; |
1644 } | 1640 } |
1645 | 1641 |
1646 //Mask filter | 1642 //Mask filter |
(...skipping 21 matching lines...) Expand all Loading... |
1668 &matrix, | 1664 &matrix, |
1669 &rasteredMask, | 1665 &rasteredMask, |
1670 SkMask::kComputeBoundsAndRenderImage_CreateMode, | 1666 SkMask::kComputeBoundsAndRenderImage_CreateMode, |
1671 paint->getStyle())) { | 1667 paint->getStyle())) { |
1672 | 1668 |
1673 SkAutoMaskFreeImage rasteredAmi(rasteredMask.fImage); | 1669 SkAutoMaskFreeImage rasteredAmi(rasteredMask.fImage); |
1674 mask = &rasteredMask; | 1670 mask = &rasteredMask; |
1675 | 1671 |
1676 //[Mask -> Mask] | 1672 //[Mask -> Mask] |
1677 SkMask filteredMask; | 1673 SkMask filteredMask; |
1678 if (filter->filterMask(&filteredMask, | 1674 if (filter->filterMask(&filteredMask, rasteredMask, matrix, nullptr)
) { |
1679 rasteredMask, | |
1680 matrix, | |
1681 nullptr)) { | |
1682 mask = &filteredMask; | 1675 mask = &filteredMask; |
1683 } else { | |
1684 filteredMask.fImage = nullptr; | |
1685 } | 1676 } |
1686 SkAutoMaskFreeImage filteredAmi(filteredMask.fImage); | 1677 SkAutoMaskFreeImage filteredAmi(filteredMask.fImage); |
1687 | 1678 |
1688 //Draw mask. | 1679 //Draw mask. |
1689 HRV(this->applyMask(d, *mask, ppuScale, shadedPath.get())); | 1680 HRV(this->applyMask(d, *mask, ppuScale, shadedPath.get())); |
1690 } | 1681 } |
1691 return; | 1682 return; |
1692 } | 1683 } |
1693 | 1684 |
1694 //Get the figures from the shaded geometry. | 1685 //Get the figures from the shaded geometry. |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2268 //SkXPSDevice* dev = new SkXPSDevice(this); | 2259 //SkXPSDevice* dev = new SkXPSDevice(this); |
2269 //SkSize s = SkSize::Make(width, height); | 2260 //SkSize s = SkSize::Make(width, height); |
2270 //dev->BeginCanvas(s, s, SkMatrix::I()); | 2261 //dev->BeginCanvas(s, s, SkMatrix::I()); |
2271 //return dev; | 2262 //return dev; |
2272 } | 2263 } |
2273 #endif | 2264 #endif |
2274 return new SkXPSDevice(this->fXpsFactory.get()); | 2265 return new SkXPSDevice(this->fXpsFactory.get()); |
2275 } | 2266 } |
2276 | 2267 |
2277 #endif//defined(SK_BUILD_FOR_WIN32) | 2268 #endif//defined(SK_BUILD_FOR_WIN32) |
OLD | NEW |