Differentiate animated image results
Prior to this CL, a kAnimated_Mode CodecSrc (which draws a strip of
all frames in an image) has the same name as a non-animated one. This
means that Gold compares the two. Someone triaging will see two very
different images (a strip versus a single image) and think one of them
is wrong.
With this change, the two will have different names so they will not
be compared with one another.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2446543003
Review-Url: https://codereview.chromium.org/2446543003
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 9efccd3..06ca750 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -721,8 +721,13 @@
Name CodecSrc::name() const {
if (1.0f == fScale) {
- return SkOSPath::Basename(fPath.c_str());
+ Name name = SkOSPath::Basename(fPath.c_str());
+ if (fMode == kAnimated_Mode) {
+ name.append("_animated");
+ }
+ return name;
}
+ SkASSERT(fMode != kAnimated_Mode);
return get_scaled_name(fPath, fScale);
}