Page MenuHomePhabricator

ector_software_rasterizer: Improved masking calculation.
ClosedPublic

Authored by jsuya on May 9 2019, 9:01 PM.

Details

Summary

The memory allocation for the buffer size is improved to
allocate only the width size.

Test Plan

N/A

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jsuya created this revision.May 9 2019, 9:01 PM
jsuya requested review of this revision.May 9 2019, 9:01 PM
jsuya updated this revision to Diff 22072.May 9 2019, 9:10 PM

update code

jsuya updated this revision to Diff 22075.May 9 2019, 11:30 PM

update code

Hermet requested changes to this revision.May 13 2019, 12:25 AM

Please check comments.

src/lib/ector/software/ector_software_rasterizer.c
184

casting to int? not uint32_t?

185

is it correct? not this?
mtarget[i] = (aout << 24) | (0x00ffffff & mtarget[i[);

196–197

Why don't you use double for()?
for (y = 0; y < mask->generic->h; ++y)

for (x = 0; x <mask->generic->x; ++x)

Incremental instruction is better than division "/" one.

This revision now requires changes to proceed.May 13 2019, 12:25 AM
jsuya updated this revision to Diff 22142.May 13 2019, 6:57 PM

Code update
change floating operation to bitwise operation.
and
change single for loop to double for loop.(remove mod and divide calc)

jsuya marked 3 inline comments as done.May 13 2019, 6:58 PM
jsuya added inline comments.
src/lib/ector/software/ector_software_rasterizer.c
185

Changes to bitwise operations were included in this patch.

Hermet requested changes to this revision.May 14 2019, 3:44 AM

Please check comments.

src/lib/ector/software/ector_software_rasterizer.c
156–157

Remove "{}" one line loop code.
see:
for (int i = 0; i < spans->len; i++)

mtarget[i] = draw_mul_256(0xFF - (ttarget[i]>>24), mtarget[i]) + ttarget[i];
180

Remove "{}" one line loop code.
see:
for (int i = 0; i < spans->len; i++)

mtarget[i] = draw_mul_256(0xFF - (ttarget[i]>>24), mtarget[i]) + ttarget[i];
211

Remove "{}" one line loop code.
see:
for (int i = 0; i < spans->len; i++)

mtarget[i] = draw_mul_256(0xFF - (ttarget[i]>>24), mtarget[i]) + ttarget[i];
215

++spans;
count--;

keep code consistency.
spans--;
count--;

This revision now requires changes to proceed.May 14 2019, 3:44 AM
jsuya updated this revision to Diff 22204.May 14 2019, 5:51 PM
jsuya marked 2 inline comments as done.

update code

jsuya marked 4 inline comments as done.May 14 2019, 5:52 PM
Hermet accepted this revision.May 14 2019, 7:21 PM
This revision is now accepted and ready to land.May 14 2019, 7:21 PM
This revision was automatically updated to reflect the committed changes.