lottie/vector: optimize when the rle bounding rect is inside the clip rect.

Change-Id: I30c512af527fe8f34d3259b0ec9579aa50765716
This commit is contained in:
subhransu mohanty
2018-11-19 16:23:49 +09:00
parent 82c9493adf
commit dcbdcac43b

View File

@@ -134,8 +134,14 @@ void VRle::VRleData::operator*=(int alpha)
void VRle::VRleData::opIntersect(const VRect &r, VRle::VRleSpanCb cb,
void *userData) const
{
VRect clip = r;
if (empty()) return;
if (r.contains(bbox())) {
cb(mSpans.size(), mSpans.data(), userData);
return;
}
VRect clip = r;
VRleHelper tresult, tmp_obj;
std::array<VRle::Span, 256> array;