Closed Bug 793604 Opened 12 years ago Closed 1 year ago

Merge LayerOGL CleanupResources and Destroy

Categories

(Core :: Graphics: Layers, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: karlt, Assigned: karlt)

References

Details

Attachments

(2 files)

The LayerOGL tree has two similar recursive methods, Destroy and
CleanupResources, each with implementations on each of the layer classes.
These methods are similar enough that we should be able to merge these two forms into a single method on each class.

Currently the CleanupResources methods are not really used, from Gecko at
least, and so the simple approach is to remove them.  I'll attach patches here
to do that.  LayerManagerOGL::CleanupResources was already removed in bug
630346 because it was not called.

CleanupResources methods were added in bug 715822, but even in Firefox 12
there were no callers of the LayerManagerOGL method.  Is there an external
caller somewhere?

The CleanupResources methods seem to have bugs if they are ever called twice
because they try to delete textures of the same name again.

If there is reason to keep the CleanupResources methods, I can look at instead
removing the LayerOGL::Destroy methods and making do with CleanupResources.
Assignee: nobody → karlt
Status: NEW → ASSIGNED
Attachment #663942 - Flags: review?(matt.woodrow)
Blocks: 715822
Looks like Bug 806029 will add a CleanupResources caller intended for releasing resources on shadow layers (though it would also be called on regular layers if ClearCachedResources were called on their layer manager).
I can review this as well. I took a look and these patches are a nice clean up but they have rotted. For example we since have usage to CleanupResources here:
http://mxr.mozilla.org/mozilla-central/source/gfx/layers/opengl/LayerManagerOGL.cpp#876

I'd be happy to r+ this with the rot fixed.
Attachment #663942 - Flags: review?(matt.woodrow)
Attachment #663944 - Flags: review?(matt.woodrow)
Severity: normal → S3
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: