Closed Bug 1147894 Opened 9 years ago Closed 9 years ago

Make TextureHost::SetCompositor less error prone

Categories

(Core :: Graphics: Layers, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: nical, Assigned: nical)

Details

Attachments

(2 files, 1 obsolete file)

SetCompositor is called in a bunch of places, often several times per texture and frame. It makes things a bit hard to reason about because setting a null compositor can have big implications on what the texture needs to do with its memory and will be able to do until the end of the frame, and in general we don't really expect SetCompositor to set a null compositor (although in some rare case it does happen.
Continutation of one of Sotaro's recent patches in bug 1124907. With this, we have the guarantee that if mCompositor is null, it means mCompositor has always been null, which simplifies things (no more "what if the compositor was not null there and got nulled out there and then...". If we want to add back the possibility to remove the reference to the compositor, let's add a RemoveCompositor to make the logic easy, but I don't see a use for it at the moment.
Attachment #8583831 - Flags: review?(sotaro.ikeda.g)
Attached patch Remove OpUpdatedTexture (obsolete) — Splinter Review
Simplify things further a bit by removing the OpUpdated Texture message. OpUpdatesTexture is only used by ImageClient and CanvasClient, its region parameter is always null, so we can just remove it and let ImageHost takes care of calling TextureHost::Updated. This is more in line with what the tiling code does (the compositable manually managing TextureHost::Updated()).
Attachment #8583835 - Flags: review?(sotaro.ikeda.g)
Sorry, forgot to hg qrefresh before uploading the patch.
Attachment #8583838 - Flags: review?(sotaro.ikeda.g)
Attachment #8583835 - Attachment is obsolete: true
Attachment #8583835 - Flags: review?(sotaro.ikeda.g)
Attachment #8583831 - Flags: review?(sotaro.ikeda.g) → review+
Attachment #8583838 - Flags: review?(sotaro.ikeda.g) → review+
https://hg.mozilla.org/mozilla-central/rev/f39fd4c98562
https://hg.mozilla.org/mozilla-central/rev/f1dfed74dc9a
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: