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

Unified Diff: src/codec/SkCodecPriv.h

Issue 1390213002: Add subsetting to SkScanlineDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@fill-refactor
Patch Set: Rebase to manage dependencies Created 5 years, 2 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
Index: src/codec/SkCodecPriv.h
diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h
index 0442625dd20b858ee7e9cd84877f3417124fcbd1..2f1b3c1c0bcf4832308de2ac557c8effab518cdc 100644
--- a/src/codec/SkCodecPriv.h
+++ b/src/codec/SkCodecPriv.h
@@ -31,6 +31,8 @@
#define COMPUTE_RESULT_ALPHA \
SkSwizzler::GetResult(zeroAlpha, maxAlpha);
+inline float get_scale_from_sample_size(uint32_t sampleSize) { return 1.0f / (float) sampleSize; }
scroggo 2015/10/08 20:16:07 This change (moving this function here, removing S
msarett 2015/10/09 20:03:44 I'll remove this from the change. Right now, get_
+
/*
* returns a scaled dimension based on the original dimension and the sampleSize
* NOTE: we round down here for scaled dimension to match the behavior of SkImageDecoder

Powered by Google App Engine
This is Rietveld 408576698