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

Unified Diff: src/images/SkScaledBitmapSampler.cpp

Issue 657863005: Allow index sources to be unpremul. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkScaledBitmapSampler.cpp
diff --git a/src/images/SkScaledBitmapSampler.cpp b/src/images/SkScaledBitmapSampler.cpp
index fe425d58b1cab09ac744114a18b8d0184049391a..11867817819d5cb91f5bfc3ca20c1d1693037455 100644
--- a/src/images/SkScaledBitmapSampler.cpp
+++ b/src/images/SkScaledBitmapSampler.cpp
@@ -396,10 +396,9 @@ static bool Sample_Index_D8888_SkipZ(void* SK_RESTRICT dstRow,
static SkScaledBitmapSampler::RowProc
get_index_to_8888_proc(const SkScaledBitmapSampler::Options& opts) {
- if (!opts.fPremultiplyAlpha) {
- // Unpremultiplied is not supported for an index source.
- return NULL;
- }
+ // The caller is expected to have created the source colortable
+ // properly with respect to premultiplication, so premul makes
reed1 2014/10/24 14:28:54 s/premultiplication/opts.fPremultiplyAlpha
scroggo 2014/10/27 15:07:21 Done.
+ // no difference here.
// Dither makes no difference
if (opts.fSkipZeros) {
return Sample_Index_D8888_SkipZ;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698