| 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 #define __STDC_LIMIT_MACROS | 7 #define __STDC_LIMIT_MACROS |
| 8 | 8 |
| 9 #include "SkDraw.h" | 9 #include "SkDraw.h" |
| 10 #include "SkBlitter.h" | 10 #include "SkBlitter.h" |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 r.fRight = x + radius; | 436 r.fRight = x + radius; |
| 437 r.fBottom = y + radius; | 437 r.fBottom = y + radius; |
| 438 | 438 |
| 439 SkScan::AntiFillXRect(r, *rec.fRC, blitter); | 439 SkScan::AntiFillXRect(r, *rec.fRC, blitter); |
| 440 } | 440 } |
| 441 } | 441 } |
| 442 | 442 |
| 443 // If this guy returns true, then chooseProc() must return a valid proc | 443 // If this guy returns true, then chooseProc() must return a valid proc |
| 444 bool PtProcRec::init(SkCanvas::PointMode mode, const SkPaint& paint, | 444 bool PtProcRec::init(SkCanvas::PointMode mode, const SkPaint& paint, |
| 445 const SkMatrix* matrix, const SkRasterClip* rc) { | 445 const SkMatrix* matrix, const SkRasterClip* rc) { |
| 446 if ((unsigned)mode > (unsigned)SkCanvas::kPolygon_PointMode) { |
| 447 return false; |
| 448 } |
| 449 |
| 446 if (paint.getPathEffect()) { | 450 if (paint.getPathEffect()) { |
| 447 return false; | 451 return false; |
| 448 } | 452 } |
| 449 SkScalar width = paint.getStrokeWidth(); | 453 SkScalar width = paint.getStrokeWidth(); |
| 450 if (0 == width) { | 454 if (0 == width) { |
| 451 fMode = mode; | 455 fMode = mode; |
| 452 fPaint = &paint; | 456 fPaint = &paint; |
| 453 fClip = NULL; | 457 fClip = NULL; |
| 454 fRC = rc; | 458 fRC = rc; |
| 455 fRadius = SK_FixedHalf; | 459 fRadius = SK_FixedHalf; |
| (...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2263 mask->fImage = SkMask::AllocImage(size); | 2267 mask->fImage = SkMask::AllocImage(size); |
| 2264 memset(mask->fImage, 0, mask->computeImageSize()); | 2268 memset(mask->fImage, 0, mask->computeImageSize()); |
| 2265 } | 2269 } |
| 2266 | 2270 |
| 2267 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2271 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
| 2268 draw_into_mask(*mask, devPath, style); | 2272 draw_into_mask(*mask, devPath, style); |
| 2269 } | 2273 } |
| 2270 | 2274 |
| 2271 return true; | 2275 return true; |
| 2272 } | 2276 } |
| OLD | NEW |