Closed Bug 1387550 Opened 7 years ago Closed 7 years ago

Support tiled drawing of blob images in Gecko

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

Details

Attachments

(1 file)

We'll need this for having sane invalidation.
This add support for tiling to Moz2DImageRenderer by storing the tiling information and then using DrawTargetTiled to do the drawing.
Assignee: nobody → jmuizelaar
Attachment #8897096 - Flags: review?(nical.bugzilla)
Comment on attachment 8897096 [details] [diff] [review]
Add Tiling support to Moz2DImageRenderer

Review of attachment 8897096 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/webrender_bindings/src/bindings.rs
@@ +667,5 @@
>      let mut resources = ResourceUpdates::new();
>      resources.add_image(image_key,
>                          descriptor.into(),
>                          ImageData::new_blob_image(copied_bytes),
> +                        Some(128));

Is this for testing only or do you plan to tile all blob images (128 seems quite small)?
(In reply to Nicolas Silva [:nical] from comment #2)
> Comment on attachment 8897096 [details] [diff] [review]
> Add Tiling support to Moz2DImageRenderer
> 
> Review of attachment 8897096 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/webrender_bindings/src/bindings.rs
> @@ +667,5 @@
> >      let mut resources = ResourceUpdates::new();
> >      resources.add_image(image_key,
> >                          descriptor.into(),
> >                          ImageData::new_blob_image(copied_bytes),
> > +                        Some(128));
> 
> Is this for testing only or do you plan to tile all blob images (128 seems
> quite small)?

Mostly it's an arbitrary choice for testing. That being said, since we're using a texture atlas in the end it's conceivable that small tile sizes might work well.
Sounds like a pref to me :)
Comment on attachment 8897096 [details] [diff] [review]
Add Tiling support to Moz2DImageRenderer

Review of attachment 8897096 [details] [diff] [review]:
-----------------------------------------------------------------

I guess we can adjust the tile size later. It'd be great if you added a pref for this as Milan suggested.
Attachment #8897096 - Flags: review?(nical.bugzilla) → review+
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3e9b7e7116b7
Support tiled drawing of blob images in Gecko.
https://hg.mozilla.org/mozilla-central/rev/3e9b7e7116b7
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: