Closed Bug 1147894 Opened 5 years ago Closed 5 years ago

Make TextureHost::SetCompositor less error prone


(Core :: Graphics: Layers, defect)

Not set



Tracking Status
firefox39 --- fixed


(Reporter: nical, Assigned: nical)



(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+
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.