OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 | 8 |
9 #include "SkRasterizer.h" | 9 #include "SkRasterizer.h" |
10 #include "SkDraw.h" | 10 #include "SkDraw.h" |
11 #include "SkMaskFilter.h" | 11 #include "SkMaskFilter.h" |
12 #include "SkPath.h" | 12 #include "SkPath.h" |
| 13 #include "SkStrokeRec.h" |
13 | 14 |
14 bool SkRasterizer::rasterize(const SkPath& fillPath, const SkMatrix& matrix, | 15 bool SkRasterizer::rasterize(const SkPath& fillPath, const SkMatrix& matrix, |
15 const SkIRect* clipBounds, SkMaskFilter* filter, | 16 const SkIRect* clipBounds, SkMaskFilter* filter, |
16 SkMask* mask, SkMask::CreateMode mode) const { | 17 SkMask* mask, SkMask::CreateMode mode) const { |
17 SkIRect storage; | 18 SkIRect storage; |
18 | 19 |
19 if (clipBounds && filter && SkMask::kJustRenderImage_CreateMode != mode) { | 20 if (clipBounds && filter && SkMask::kJustRenderImage_CreateMode != mode) { |
20 SkIPoint margin; | 21 SkIPoint margin; |
21 SkMask srcM, dstM; | 22 SkMask srcM, dstM; |
22 | 23 |
(...skipping 11 matching lines...) Expand all Loading... |
34 | 35 |
35 /* Our default implementation of the virtual method just scan converts | 36 /* Our default implementation of the virtual method just scan converts |
36 */ | 37 */ |
37 bool SkRasterizer::onRasterize(const SkPath& fillPath, const SkMatrix& matrix, | 38 bool SkRasterizer::onRasterize(const SkPath& fillPath, const SkMatrix& matrix, |
38 const SkIRect* clipBounds, | 39 const SkIRect* clipBounds, |
39 SkMask* mask, SkMask::CreateMode mode) const { | 40 SkMask* mask, SkMask::CreateMode mode) const { |
40 SkPath devPath; | 41 SkPath devPath; |
41 | 42 |
42 fillPath.transform(matrix, &devPath); | 43 fillPath.transform(matrix, &devPath); |
43 return SkDraw::DrawToMask(devPath, clipBounds, nullptr, nullptr, mask, mode, | 44 return SkDraw::DrawToMask(devPath, clipBounds, nullptr, nullptr, mask, mode, |
44 SkPaint::kFill_Style); | 45 SkStrokeRec::kFill_InitStyle); |
45 } | 46 } |
OLD | NEW |