Fix for Ubuntu compile warning
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955913002
Review-Url: https://codereview.chromium.org/1955913002
diff --git a/src/core/SkMaskCache.cpp b/src/core/SkMaskCache.cpp
index da7b538..eb7c8f0 100644
--- a/src/core/SkMaskCache.cpp
+++ b/src/core/SkMaskCache.cpp
@@ -110,16 +110,15 @@
SkASSERT(1 == count || 2 == count);
SkIRect ir;
rects[0].roundOut(&ir);
- fSizes[0] = SkSize::Make(0, 0);
- fSizes[1] = SkSize::Make(0, 0);
- fSizes[2] = SkSize::Make(0, 0);
- fSizes[3] = SkSize::Make(rects[0].x() - ir.x(), rects[0].y() - ir.y());
- for (int i = 0; i < count; i++) {
- fSizes[i] = SkSize::Make(rects[i].width(), rects[i].height());
- }
+ fSizes[0] = SkSize::Make(rects[0].width(), rects[0].height());
if (2 == count) {
+ fSizes[1] = SkSize::Make(rects[1].width(), rects[1].height());
fSizes[2] = SkSize::Make(rects[0].x() - rects[1].x(), rects[0].y() - rects[1].y());
+ } else {
+ fSizes[1] = SkSize::Make(0, 0);
+ fSizes[2] = SkSize::Make(0, 0);
}
+ fSizes[3] = SkSize::Make(rects[0].x() - ir.x(), rects[0].y() - ir.y());
this->init(&gRectsBlurKeyNamespaceLabel, 0,
sizeof(fSigma) + sizeof(fStyle) + sizeof(fQuality) + sizeof(fSizes));