aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkDraw.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 3b44895dd0..3c3e3a34fd 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -782,14 +782,6 @@ void SkDraw::drawPoints(SkCanvas::PointMode mode, size_t count,
}
}
-static inline SkPoint* as_lefttop(SkRect* r) {
- return (SkPoint*)(void*)r;
-}
-
-static inline SkPoint* as_rightbottom(SkRect* r) {
- return ((SkPoint*)(void*)r) + 1;
-}
-
static bool easy_rect_join(const SkPaint& paint, const SkMatrix& matrix,
SkPoint* strokeSize) {
if (SkPaint::kMiter_Join != paint.getStrokeJoin() ||
@@ -834,11 +826,11 @@ SkDraw::RectType SkDraw::ComputeRectType(const SkPaint& paint,
}
static const SkPoint* rect_points(const SkRect& r) {
- return (const SkPoint*)(void*)&r;
+ return SkTCast<const SkPoint*>(&r);
}
static SkPoint* rect_points(SkRect& r) {
- return (SkPoint*)(void*)&r;
+ return SkTCast<SkPoint*>(&r);
}
void SkDraw::drawRect(const SkRect& rect, const SkPaint& paint) const {