diff options
author | 2016-03-18 12:13:47 -0700 | |
---|---|---|
committer | 2016-03-18 12:13:47 -0700 | |
commit | e820dfebbc652bfc4a653f07a29f5fe371eb019b (patch) | |
tree | a0bcb4e0bea909195ec49c6221f6449ae8275c98 /src/ports | |
parent | b5a94e3e24ef16f96ecfbe4ee427f7a0c69d7290 (diff) |
Remove uses of SkImageDecoder from gms
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1791583002
Committed: https://skia.googlesource.com/skia/+/d427266a58af7e6ea6c12c9cd56ade3e179a0c04
Review URL: https://codereview.chromium.org/1791583002
Diffstat (limited to 'src/ports')
-rw-r--r-- | src/ports/SkImageDecoder_WIC.cpp | 7 |
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)) { |