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

Unified Diff: include/core/SkPixmap.h

Issue 1463373002: scaling API on SkPixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « include/core/SkImage.h ('k') | src/core/SkBitmapController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPixmap.h
diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h
index faae85e797e7f262f63a165f2fa9e690779236c2..da97025cab03ae032dd3a7750607143c3fe5e9b9 100644
--- a/include/core/SkPixmap.h
+++ b/include/core/SkPixmap.h
@@ -9,6 +9,7 @@
#define SkPixmap_DEFINED
#include "SkColor.h"
+#include "SkFilterQuality.h"
#include "SkImageInfo.h"
class SkColorTable;
@@ -135,6 +136,15 @@ public:
}
/**
+ * Copy the pixels from this pixmap into the dst pixmap, converting as needed into dst's
+ * colortype/alphatype. If the conversion cannot be performed, false is returned.
+ *
+ * If dst's dimensions differ from the src dimension, the image will be scaled, applying the
+ * specified filter-quality.
+ */
+ bool scalePixels(const SkPixmap& dst, SkFilterQuality) const;
+
+ /**
* Returns true if pixels were written to (e.g. if colorType is kUnknown_SkColorType, this
* will return false). If subset does not intersect the bounds of this pixmap, returns false.
*/
« no previous file with comments | « include/core/SkImage.h ('k') | src/core/SkBitmapController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698