[webkit-reviews] review requested: [Bug 77135] [chromium] canvas demo is slow due to unnecessary resource cleanups : [Attachment 124764] proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 31 09:56:32 PST 2012


Alok Priyadarshi <alokp at chromium.org> has asked  for review:
Bug 77135: [chromium] canvas demo is slow due to unnecessary resource cleanups
https://bugs.webkit.org/show_bug.cgi?id=77135

Attachment 124764: proposed patch
https://bugs.webkit.org/attachment.cgi?id=124764&action=review

------- Additional Comments from Alok Priyadarshi <alokp at chromium.org>
This patch caches the last valid LTH and clears the resources only when the
layer is moved into another valid LTH. One problem that still needs to be
solved is what happens when a layer is deleted after the LTH.

James suggested this - "If the LTH goes away before the layer, then
~TextureManager nulls out the ManagedTexture's m_manager pointers and the
ManagedTexture is effectively dead." But looking at ManagedTexture
implementation, this does not seem feasible without major refactoring.
ManagedTexture assumes that m_textureManager is valid in quite a few places. Am
I missing something obvious?

Vangelis suggested adding the orphaned layers to a dummy branch in LTH. This
will fix the issue of releasing the layers as soon as LTH is deleted, but if
ref-count the layers in the dummy branch, the layers themselves will not get
deleted when they are detached from the tree.


More information about the webkit-reviews mailing list