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

Unified Diff: src/core/SkBitmapScaler.cpp

Issue 1897043002: Pass through the profile info when creating a high-quality scaled offscreen. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/core/SkBitmapScaler.cpp
diff --git a/src/core/SkBitmapScaler.cpp b/src/core/SkBitmapScaler.cpp
index 398e20c24622d707018a7ddef1c513e366de33bd..fb72875443ddd5f663038e567c95090c86d55cb8 100644
--- a/src/core/SkBitmapScaler.cpp
+++ b/src/core/SkBitmapScaler.cpp
@@ -250,7 +250,10 @@ bool SkBitmapScaler::Resize(SkBitmap* resultPtr, const SkPixmap& source, ResizeM
}
SkBitmap result;
- result.setInfo(SkImageInfo::MakeN32(destWidth, destHeight, source.alphaType()));
+ // Note: pass along the profile information even thought this is no the right answer because
reed1 2016/04/18 20:37:08 possibly use source.info().makeWH(destWidth, dest
+ // this could be scaling in sRGB.
+ result.setInfo(SkImageInfo::MakeN32(destWidth, destHeight,
+ source.alphaType(), source.info().profileType()));
result.allocPixels(allocator, nullptr);
SkPixmap resultPM;
« 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