[chromium] Don't call deleteTexture on a texture attached to an FBO that is not currently bound
Created attachment 67123 [details] Patch
Note that in addition to this not quite doing what we want, ANGLE currently crashes if you delete a texture attached to the non-current FBO. The ANGLE crash will be fixed as well.
Comment on attachment 67123 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=67123&action=prettypatch Basically looks fine. One comment. > WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp:121 > + m_context->deleteTexture(m_internal->offscreenColorTexture); You don't really need to delete the texture and create a new one in this case. All you need is to call texImage2D against the texture object again to reallocate its storage to the new size. You might consider doing that instead.
(In reply to comment #3) > (From update of attachment 67123 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=67123&action=prettypatch > > Basically looks fine. One comment. > > > WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp:121 > > + m_context->deleteTexture(m_internal->offscreenColorTexture); > You don't really need to delete the texture and create a new one in this case. All you need is to call texImage2D against the texture object again to reallocate its storage to the new size. You might consider doing that instead. That's a very good point. I'll update the patch to do it that way instead. Do I have to respecify the texParameters()s after doing that?
Created attachment 67138 [details] Patch
Patch assumes I don't have to specify the texParameters again (which from basic testing appears to be the case).
Comment on attachment 67138 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=67138&action=prettypatch Looks good to me. To answer your question above, no, you don't need to respecify the texture parameters -- they are associated with the texture object, and you are not deleting that, only reallocating its associated texel storage.
Committed r67156: <http://trac.webkit.org/changeset/67156>