From 8ad91a9bf896d728b905124847d74787aac698a7 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Fri, 19 Jan 2018 19:09:32 -0500 Subject: remove unused SkRasterizer Bug: skia:7500 Change-Id: Iaa683cf8f0b18887cce4ec676631d1e1efee1712 Reviewed-on: https://skia-review.googlesource.com/97400 Reviewed-by: Florin Malita Commit-Queue: Mike Reed --- src/xps/SkXPSDevice.cpp | 46 ++-------------------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) (limited to 'src/xps') diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp index 354070ce66..dcf88aac00 100644 --- a/src/xps/SkXPSDevice.cpp +++ b/src/xps/SkXPSDevice.cpp @@ -40,7 +40,6 @@ #include "SkPathOps.h" #include "SkPoint.h" #include "SkRasterClip.h" -#include "SkRasterizer.h" #include "SkSFNTHeader.h" #include "SkShader.h" #include "SkSize.h" @@ -1076,7 +1075,6 @@ static bool rect_must_be_pathed(const SkPaint& paint, const SkMatrix& matrix) { return paint.getPathEffect() || paint.getMaskFilter() || - paint.getRasterizer() || (stroke && ( (matrix.hasPerspective() && !zeroWidth) || SkPaint::kMiter_Join != paint.getStrokeJoin() || @@ -1518,7 +1516,7 @@ void SkXPSDevice::drawPath(const SkPath& platonicPath, SkMatrix matrix = this->ctm(); SkPath* skeletalPath = const_cast(&platonicPath); if (prePathMatrix) { - if (paintHasPathEffect || paint->getRasterizer()) { + if (paintHasPathEffect) { if (!pathIsMutable) { skeletalPath = &modifiedPath; pathIsMutable = true; @@ -1562,11 +1560,10 @@ void SkXPSDevice::drawPath(const SkPath& platonicPath, HRVM(shadedPath->SetGeometryLocal(shadedGeometry.get()), "Could not add the shaded geometry to shaded path."); - SkRasterizer* rasterizer = paint->getRasterizer(); SkMaskFilter* filter = paint->getMaskFilter(); //Determine if we will draw or shade and mask. - if (rasterizer || filter) { + if (filter) { if (paint->getStyle() != SkPaint::kFill_Style) { paint.writable()->setStyle(SkPaint::kFill_Style); } @@ -1581,44 +1578,6 @@ void SkXPSDevice::drawPath(const SkPath& platonicPath, &fill, &stroke)); - //Rasterizer - if (rasterizer) { - SkIRect clipIRect; - SkVector ppuScale; - this->convertToPpm(filter, - &matrix, - &ppuScale, - this->cs().bounds(size(*this)).roundOut(), - &clipIRect); - - SkMask* mask = nullptr; - - //[Fillable-path -> Mask] - SkMask rasteredMask; - if (rasterizer->rasterize( - *fillablePath, - matrix, - &clipIRect, - filter, //just to compute how much to draw. - &rasteredMask, - SkMask::kComputeBoundsAndRenderImage_CreateMode)) { - - SkAutoMaskFreeImage rasteredAmi(rasteredMask.fImage); - mask = &rasteredMask; - - //[Mask -> Mask] - SkMask filteredMask; - if (filter && filter->filterMask(&filteredMask, *mask, this->ctm(), nullptr)) { - mask = &filteredMask; - } - SkAutoMaskFreeImage filteredAmi(filteredMask.fImage); - - //Draw mask. - HRV(this->applyMask(*mask, ppuScale, shadedPath.get())); - } - return; - } - //Mask filter if (filter) { SkIRect clipIRect; @@ -2039,7 +1998,6 @@ static bool text_must_be_pathed(const SkPaint& paint, const SkMatrix& matrix) { || SkPaint::kStroke_Style == style || SkPaint::kStrokeAndFill_Style == style || paint.getMaskFilter() - || paint.getRasterizer() ; } -- cgit v1.2.3