[blob image] Skip over items that aren't in bounds

RESOLVED FIXED in Firefox 63

Status

()

enhancement
P3
normal
RESOLVED FIXED
Last year
Last year

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Tracking

63 Branch
mozilla63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

We already have the bounds at hand. It's easy for us to skip over the parts of the blob image that aren't used.
Blocks: 1480196
Priority: -- → P3
Comment on attachment 8997585 [details]
Bug 1480608. Skip over items that aren't in DrawTarget/DirtyRect.

https://reviewboard.mozilla.org/r/261274/#review268384

::: gfx/webrender_bindings/Moz2DImageRenderer.cpp:290
(Diff revision 1)
>      int ReadInt() {
>        int ret;

Unrelated to this patch, but should these ints be int32_ts as well?

::: gfx/webrender_bindings/Moz2DImageRenderer.cpp:320
(Diff revision 1)
> -    reader.SkipBounds();
> +    auto combinedBounds = absBounds.Intersect(reader.ReadBounds());
> +    if (combinedBounds.IsEmpty()) {

You're not using the value of combinedBounds, so this could be written as a boolean Intersects check instead.

auto itemBounds = reader.ReadBounds();
if (!absBounds.Intersects(itemBounds)) {
  ...
}
Attachment #8997585 - Flags: review?(mstange) → review+
Comment on attachment 8997585 [details]
Bug 1480608. Skip over items that aren't in DrawTarget/DirtyRect.

https://reviewboard.mozilla.org/r/261274/#review268804

::: gfx/webrender_bindings/Moz2DImageRenderer.cpp:320
(Diff revision 1)
> -    reader.SkipBounds();
> +    auto combinedBounds = absBounds.Intersect(reader.ReadBounds());
> +    if (combinedBounds.IsEmpty()) {

There's no implementation of Intersects() and it's unclear what the semantics of it should be.
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/00ff83d23238
Skip over items that aren't in DrawTarget/DirtyRect. r=mstange
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6c2a436870e0
Skip over items that aren't in DrawTarget/DirtyRect. r=mstange
https://hg.mozilla.org/mozilla-central/rev/6c2a436870e0
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Flags: needinfo?(jmuizelaar)
Assignee: nobody → jmuizelaar
You need to log in before you can comment on or make changes to this bug.