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

Unified Diff: src/core/SkBitmapScaler.h

Issue 1588653002: Allow Resize to be called w/ a preallocated pixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox, clarifying dst's treatment Created 4 years, 11 months 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 | « no previous file | src/core/SkBitmapScaler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapScaler.h
diff --git a/src/core/SkBitmapScaler.h b/src/core/SkBitmapScaler.h
index 03feec3e127c239eb4ac056d7845f748775242ab..3d734d6efc5a2dded5836975165941dabce10112 100644
--- a/src/core/SkBitmapScaler.h
+++ b/src/core/SkBitmapScaler.h
@@ -29,6 +29,16 @@ public:
RESIZE_LastMethod = RESIZE_MITCHELL,
};
+ /**
+ * Given already-allocated src and dst pixmaps, this will scale the src pixels using the
+ * specified resize-method and write the results into the pixels pointed to by dst.
+ */
+ static bool Resize(const SkPixmap& dst, const SkPixmap& src, ResizeMethod method);
+
+ /**
+ * Helper function that manages allocating a bitmap to hold the dst pixels, and then calls
+ * the pixmap version of Resize.
+ */
static bool Resize(SkBitmap* result, const SkPixmap& src, ResizeMethod method,
int dest_width, int dest_height, SkBitmap::Allocator* = nullptr);
« no previous file with comments | « no previous file | src/core/SkBitmapScaler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698