aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/xps
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-19 19:09:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-21 18:24:11 +0000
commit8ad91a9bf896d728b905124847d74787aac698a7 (patch)
tree4a5ac4b68bb0a5f5b5d6e6447ffb02b5173b912b /src/xps
parent07853659fae395877fd5e09e92ae3b690ba3c222 (diff)
remove unused SkRasterizer
Bug: skia:7500 Change-Id: Iaa683cf8f0b18887cce4ec676631d1e1efee1712 Reviewed-on: https://skia-review.googlesource.com/97400 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/xps')
-rw-r--r--src/xps/SkXPSDevice.cpp46
1 files changed, 2 insertions, 44 deletions
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<SkPath*>(&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()
;
}