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

Unified Diff: src/ports/SkImageDecoder_WIC.cpp

Issue 1791583002: Remove uses of SkImageDecoder from gms (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « gm/tiledscaledbitmap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkImageDecoder_WIC.cpp
diff --git a/src/ports/SkImageDecoder_WIC.cpp b/src/ports/SkImageDecoder_WIC.cpp
index fa408836a4a4c09f71d3389ea1121b9d3f653cc8..c7222e635a993f97f5e07ee0bc140f64b1864f5b 100644
--- a/src/ports/SkImageDecoder_WIC.cpp
+++ b/src/ports/SkImageDecoder_WIC.cpp
@@ -404,16 +404,13 @@ bool SkImageEncoder_WIC::onEncode(SkWStream* stream
hr = piBitmapFrameEncode->SetSize(width, height);
}
- //Set the pixel format of the frame.
+ //Set the pixel format of the frame. If native encoded format cannot match BGRA,
+ //it will choose the closest pixel format that it supports.
const WICPixelFormatGUID formatDesired = GUID_WICPixelFormat32bppBGRA;
WICPixelFormatGUID formatGUID = formatDesired;
if (SUCCEEDED(hr)) {
hr = piBitmapFrameEncode->SetPixelFormat(&formatGUID);
}
- if (SUCCEEDED(hr)) {
- //Be sure the image format is the one requested.
- hr = IsEqualGUID(formatGUID, formatDesired) ? S_OK : E_FAIL;
- }
//Write the pixels into the frame.
if (SUCCEEDED(hr)) {
« no previous file with comments | « gm/tiledscaledbitmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698