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

Unified Diff: src/codec/SkSampledCodec.h

Issue 1417583009: Combine native sampling with sampling (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Work around missing initializer_list on mac 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 | « src/codec/SkAndroidCodec.cpp ('k') | src/codec/SkSampledCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkSampledCodec.h
diff --git a/src/codec/SkSampledCodec.h b/src/codec/SkSampledCodec.h
index 277a50f0eea169124b72eba0cfc01142cc9b3b90..bbd7d3599c200b5174e9ec74a3d0009b0cce052d 100644
--- a/src/codec/SkSampledCodec.h
+++ b/src/codec/SkSampledCodec.h
@@ -33,6 +33,19 @@ protected:
AndroidOptions& options) override;
private:
+ /**
+ * Find the best way to account for native scaling.
+ *
+ * Return a size that fCodec can scale to, and adjust sampleSize to finish scaling.
+ *
+ * @param sampleSize As an input, the requested sample size.
+ * As an output, sampling needed after letting fCodec
+ * scale to the returned dimensions.
+ * @param nativeSampleSize Optional output parameter. Will be set to the
+ * effective sample size done by fCodec.
+ * @return SkISize The size that fCodec should scale to.
+ */
+ SkISize accountForNativeScaling(int* sampleSize, int* nativeSampleSize = nullptr) const;
/**
* This fulfills the same contract as onGetAndroidPixels().
« no previous file with comments | « src/codec/SkAndroidCodec.cpp ('k') | src/codec/SkSampledCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698