OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkMaskFilter.h" | 10 #include "SkMaskFilter.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 if (!clipper.done()) { | 201 if (!clipper.done()) { |
202 const SkIRect& cr = clipper.rect(); | 202 const SkIRect& cr = clipper.rect(); |
203 do { | 203 do { |
204 draw_nine_clipped(mask, outerR, center, fillCenter, cr, blitter); | 204 draw_nine_clipped(mask, outerR, center, fillCenter, cr, blitter); |
205 clipper.next(); | 205 clipper.next(); |
206 } while (!clipper.done()); | 206 } while (!clipper.done()); |
207 } | 207 } |
208 } | 208 } |
209 | 209 |
210 static int countNestedRects(const SkPath& path, SkRect rects[2]) { | 210 static int countNestedRects(const SkPath& path, SkRect rects[2]) { |
211 if (path.isNestedRects(rects)) { | 211 if (path.isNestedFillRects(rects)) { |
212 return 2; | 212 return 2; |
213 } | 213 } |
214 return path.isRect(&rects[0]); | 214 return path.isRect(&rects[0]); |
215 } | 215 } |
216 | 216 |
217 bool SkMaskFilter::filterRRect(const SkRRect& devRRect, const SkMatrix& matrix, | 217 bool SkMaskFilter::filterRRect(const SkRRect& devRRect, const SkMatrix& matrix, |
218 const SkRasterClip& clip, SkBlitter* blitter, | 218 const SkRasterClip& clip, SkBlitter* blitter, |
219 SkPaint::Style style) const { | 219 SkPaint::Style style) const { |
220 // Attempt to speed up drawing by creating a nine patch. If a nine patch | 220 // Attempt to speed up drawing by creating a nine patch. If a nine patch |
221 // cannot be used, return false to allow our caller to recover and perform | 221 // cannot be used, return false to allow our caller to recover and perform |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 srcM.fRowBytes = 0; | 353 srcM.fRowBytes = 0; |
354 srcM.fFormat = SkMask::kA8_Format; | 354 srcM.fFormat = SkMask::kA8_Format; |
355 | 355 |
356 SkIPoint margin; // ignored | 356 SkIPoint margin; // ignored |
357 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) { | 357 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) { |
358 dst->set(dstM.fBounds); | 358 dst->set(dstM.fBounds); |
359 } else { | 359 } else { |
360 dst->set(srcM.fBounds); | 360 dst->set(srcM.fBounds); |
361 } | 361 } |
362 } | 362 } |
OLD | NEW |