Add mode validation to PtProcRec::init.
BUG=486946 Review URL: https://codereview.chromium.org/1142563003
This commit is contained in:
parent
5a7cd87bd2
commit
3ece53ed30
@ -443,6 +443,10 @@ static void aa_square_proc(const PtProcRec& rec, const SkPoint devPts[],
|
||||
// If this guy returns true, then chooseProc() must return a valid proc
|
||||
bool PtProcRec::init(SkCanvas::PointMode mode, const SkPaint& paint,
|
||||
const SkMatrix* matrix, const SkRasterClip* rc) {
|
||||
if ((unsigned)mode > (unsigned)SkCanvas::kPolygon_PointMode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (paint.getPathEffect()) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user