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

Unified Diff: src/ports/SkImageDecoder_WIC.cpp

Issue 1823743002: Disable the WIC encoder for jpegs (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 | « no previous file | 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 c7222e635a993f97f5e07ee0bc140f64b1864f5b..5febd856d6cc87c209957f134f3b36af9814ea85 100644
--- a/src/ports/SkImageDecoder_WIC.cpp
+++ b/src/ports/SkImageDecoder_WIC.cpp
@@ -411,6 +411,10 @@ bool SkImageEncoder_WIC::onEncode(SkWStream* stream
if (SUCCEEDED(hr)) {
hr = piBitmapFrameEncode->SetPixelFormat(&formatGUID);
}
+ if (SUCCEEDED(hr)) {
msarett 2016/03/21 20:09:28 Adding back in code that I deleted in https://code
+ //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)) {
@@ -440,7 +444,6 @@ static SkImageEncoder* sk_imageencoder_wic_factory(SkImageEncoder::Type t) {
switch (t) {
case SkImageEncoder::kBMP_Type:
case SkImageEncoder::kICO_Type:
- case SkImageEncoder::kJPEG_Type:
case SkImageEncoder::kPNG_Type:
break;
default:
« 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