We do alias src and dst when building the BBH. This meant we calculated
the wrong bounds in LayoutTests/ietestcenter/css3/text/textshadow-010.htm.
Not sure how best to test this inside Skia. It may become moot after I
work through the API changes we were talking about today, but if not I'll
make sure it's tested somehow before I'm done with SkDrawLoopers.
BUG=skia:3186
Review URL: https://codereview.chromium.org/
760023004
return true;
}
-void SkDrawLooper::computeFastBounds(const SkPaint& paint, const SkRect& src,
+void SkDrawLooper::computeFastBounds(const SkPaint& paint, const SkRect& s,
SkRect* dst) const {
+ // src and dst rects may alias and we need to keep the original src, so copy it.
+ const SkRect src = s;
+
SkCanvas canvas;
SkSmallAllocator<1, 32> allocator;
void* buffer = allocator.reserveT<SkDrawLooper::Context>(this->contextSize());