aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-03-18 12:13:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-18 12:13:47 -0700
commite820dfebbc652bfc4a653f07a29f5fe371eb019b (patch)
treea0bcb4e0bea909195ec49c6221f6449ae8275c98 /src/ports
parentb5a94e3e24ef16f96ecfbe4ee427f7a0c69d7290 (diff)
Remove uses of SkImageDecoder from gms
Diffstat (limited to 'src/ports')
-rw-r--r--src/ports/SkImageDecoder_WIC.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ports/SkImageDecoder_WIC.cpp b/src/ports/SkImageDecoder_WIC.cpp
index fa408836a4..c7222e635a 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)) {