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

Unified Diff: src/core/SkBitmapProvider.cpp

Issue 1893203006: Make all the codecs default profiles based on gDefaultProfileIsSRGB. (Closed) Base URL: https://skia.googlesource.com/skia.git@add-imageinfo-to-SkImage_Base
Patch Set: Make private work. 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
Index: src/core/SkBitmapProvider.cpp
diff --git a/src/core/SkBitmapProvider.cpp b/src/core/SkBitmapProvider.cpp
index 9f6eb94310a54741c1cf584b52fbc0a12b9180d9..d2c5013a10b530d3aad1558c1b4985ceec2e2d13 100644
--- a/src/core/SkBitmapProvider.cpp
+++ b/src/core/SkBitmapProvider.cpp
@@ -45,8 +45,7 @@ bool SkBitmapProvider::validForDrawing() const {
SkImageInfo SkBitmapProvider::info() const {
if (fImage) {
- SkAlphaType at = fImage->isOpaque() ? kOpaque_SkAlphaType : kPremul_SkAlphaType;
- return SkImageInfo::MakeN32(fImage->width(), fImage->height(), at);
+ return as_IB(fImage)->onImageInfo();
} else {
return fBitmap.info();
}
« src/core/SkBitmap.cpp ('K') | « src/core/SkBitmap.cpp ('k') | src/core/SkImageInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698