Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1338)

Unified Diff: src/core/SkDraw.cpp

Issue 742663002: add roundOut that returns its result (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDraw.cpp
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 95d348efc5578c1227ea25891bf5ad8ea5f71584..7ccd258ba87a5cd3e1c8e8a3c6ddc21ca4635e76 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -813,8 +813,7 @@ void SkDraw::drawRect(const SkRect& rect, const SkPaint& paint) const {
devRect.sort();
// look for the quick exit, before we build a blitter
- SkIRect ir;
- devRect.roundOut(&ir);
+ SkIRect ir = devRect.roundOut();
if (paint.getStyle() != SkPaint::kFill_Style) {
// extra space for hairlines
if (paint.getStrokeWidth() == 0) {
@@ -1210,11 +1209,8 @@ void SkDraw::drawBitmapAsMask(const SkBitmap& bitmap,
static bool clipped_out(const SkMatrix& m, const SkRasterClip& c,
const SkRect& srcR) {
SkRect dstR;
- SkIRect devIR;
-
m.mapRect(&dstR, srcR);
- dstR.roundOut(&devIR);
- return c.quickReject(devIR);
+ return c.quickReject(dstR.roundOut());
}
static bool clipped_out(const SkMatrix& matrix, const SkRasterClip& clip,
@@ -2282,7 +2278,7 @@ void SkDraw::validate() const {
#include "SkBlitter.h"
static bool compute_bounds(const SkPath& devPath, const SkIRect* clipBounds,
- const SkMaskFilter* filter, const SkMatrix* filterMatrix,
+ const SkMaskFilter* filter, const SkMatrix* filterMatrix,
SkIRect* bounds) {
if (devPath.isEmpty()) {
return false;
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698