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

Unified Diff: include/core/SkRect.h

Issue 797963002: pass dst-rect through from drawBitmapRect for better precision (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « include/core/SkDraw.h ('k') | src/core/SkBitmapDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkRect.h
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index 0038c7c2fa2bbe3ad4fa14f403151ef9553063c6..8e4d669c48279c02c08ede805d43f44c935b9dcd 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -395,6 +395,12 @@ struct SK_API SkRect {
return r;
}
+ static SkRect SK_WARN_UNUSED_RESULT MakeIWH(int w, int h) {
+ SkRect r;
+ r.set(0, 0, SkIntToScalar(w), SkIntToScalar(h));
+ return r;
+ }
+
static SkRect SK_WARN_UNUSED_RESULT MakeSize(const SkSize& size) {
SkRect r;
r.set(0, 0, size.width(), size.height());
« no previous file with comments | « include/core/SkDraw.h ('k') | src/core/SkBitmapDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698