projects
/
platform
/
core
/
uifw
/
lottie-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82c9493
)
lottie/vector: optimize when the rle bounding rect is inside the clip rect.
14/193314/2
author
subhransu mohanty
<sub.mohanty@samsung.com>
Mon, 19 Nov 2018 07:23:49 +0000
(16:23 +0900)
committer
subhransu mohanty
<sub.mohanty@samsung.com>
Mon, 19 Nov 2018 07:25:21 +0000
(16:25 +0900)
Change-Id: I30c512af527fe8f34d3259b0ec9579aa50765716
src/vector/vrle.cpp
patch
|
blob
|
history
diff --git
a/src/vector/vrle.cpp
b/src/vector/vrle.cpp
index
3d4393d
..
7db043b
100644
(file)
--- a/
src/vector/vrle.cpp
+++ b/
src/vector/vrle.cpp
@@
-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;