[Webkit-unassigned] [Bug 56514] [chromium] Properly reset VideoLayerChromium textures after lost renderer context

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 18 17:52:02 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56514





--- Comment #11 from Kenneth Russell <kbr at google.com>  2011-03-18 17:52:02 PST ---
(From update of attachment 86237)
View in context: https://bugs.webkit.org/attachment.cgi?id=86237&action=review

Looks better overall, but a few questions. Also please mark the bug cq? if you would like me to cq+ it.

> Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp:96
> +        Texture texture = m_textures[plane];
> +        if (!texture.isEmpty && texture.ownedByLayerRenderer)
> +            GLC(context, context->deleteTexture(texture.id));

The fact that this code is only in the destructor looks suspicious to me. Since cleanupResources() might be called multiple times (though perhaps only in response to the GPU process being restarted?) it seems this code should be placed elsewhere and called multiple times from code below. I might be wrong about that though.

> Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp:365
> +        m_textures[plane].id = 0;
> +        m_textures[plane].size = IntSize();
> +        m_textures[plane].visibleSize = IntSize();
> +        m_textures[plane].ownedByLayerRenderer = false;
> +        m_textures[plane].isEmpty = true;

What if m_textures[plane] was previously non-empty and was owned by the layer renderer? The overwrite of id here will cause a resource leak. Or is it guaranteed that if this is called, m_textures only contained stale data from an earlier GPU process?

> Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp:378
> +        m_textures[plane].id = frame->texture(plane);
> +        m_textures[plane].size = frame->requiredTextureSize(plane);
> +        m_textures[plane].visibleSize = computeVisibleSize(frame, plane);
> +        m_textures[plane].ownedByLayerRenderer = false;
> +        m_textures[plane].isEmpty = false;

Same basic question here.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list