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

Unified Diff: dm/DM.cpp

Issue 1227843005: Do not attempt to scale webp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index df16182072e200078466011129bab3b18d4c3cf6..dd072dcec6d86fbf87fa1970175b5ce645f79024 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -212,6 +212,11 @@ static void push_codec_srcs(Path path) {
const float scales[] = { 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.750f, 0.875f, 1.0f };
for (float scale : scales) {
+ if (scale != 1.0f && (path.endsWith(".webp") || path.endsWith(".WEBP"))) {
+ // FIXME: skbug.com/4038 Scaling webp seems to leave some pixels uninitialized/
+ // compute their colors based on uninitialized values.
+ continue;
+ }
// Build additional test cases for images that decode natively to non-canvas types
switch(codec->getInfo().colorType()) {
case kGray_8_SkColorType:
« 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