RESOLVED INVALID 90576
[chromium] TextureLayerChromium: Only check context status if client provides a context.
https://bugs.webkit.org/show_bug.cgi?id=90576
Summary [chromium] TextureLayerChromium: Only check context status if client provides...
Jonathan Backer
Reported 2012-07-04 12:52:56 PDT
[chromium] TextureLayerChromium: Only check context status if client provides a context.
Attachments
Patch (1.76 KB, patch)
2012-07-04 12:57 PDT, Jonathan Backer
no flags
Patch (2.64 KB, patch)
2012-07-04 13:26 PDT, Jonathan Backer
no flags
Jonathan Backer
Comment 1 2012-07-04 12:57:25 PDT
Jonathan Backer
Comment 2 2012-07-04 12:58:56 PDT
Adrienne Walker
Comment 3 2012-07-04 13:10:38 PDT
Comment on attachment 150834 [details] Patch There are a bunch of other places in TextureLayerChromium where the TextureLayerChromiumClient's context is used. Should those be robust to a null context as well, and maybe a comment added to the TextureLayerChromiumClient declaration that context is optional?
Jonathan Backer
Comment 4 2012-07-04 13:19:49 PDT
(In reply to comment #3) > (From update of attachment 150834 [details]) > There are a bunch of other places in TextureLayerChromium where the TextureLayerChromiumClient's context is used. Should those be robust to a null context as well, and maybe a comment added to the TextureLayerChromiumClient declaration that context is optional? AFAIK, the other references are for rate limiting and we have ASSERTs in CCLayerTreeHost for that. I'm happy to add ASSERTs in TextureLayerChromium w.r.t. to rate limiting if it improves readability. But perhaps a comment suffices?
Jonathan Backer
Comment 5 2012-07-04 13:26:52 PDT
Dana Jansens
Comment 6 2012-07-04 13:38:20 PDT
Comment on attachment 150838 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=150838&action=review > Source/WebCore/platform/graphics/chromium/TextureLayerChromium.cpp:137 > + if (m_client->context()) > + m_contextLost = m_client->context()->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERROR; Would m_contextLost = m_client->context() && m_client->context()->... be any more/less correct? I just wonder about the fact you can come by here and not change m_contextLost at all. What if you had a context and it was lost and now you don't have a context, what should this variable's state be? Maybe this is completely not possible and not worth considering?
Jonathan Backer
Comment 7 2012-07-04 13:53:26 PDT
(In reply to comment #6) > (From update of attachment 150838 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=150838&action=review > > > Source/WebCore/platform/graphics/chromium/TextureLayerChromium.cpp:137 > > + if (m_client->context()) > > + m_contextLost = m_client->context()->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERROR; > > Would m_contextLost = m_client->context() && m_client->context()->... be any more/less correct? I just wonder about the fact you can come by here and not change m_contextLost at all. What if you had a context and it was lost and now you don't have a context, what should this variable's state be? Maybe this is completely not possible and not worth considering? AFAIK, m_contextLost is a one way switch. Once it's set, TLC::drawsContent() will return false and TLC::update() will not be called again.
Jonathan Backer
Comment 8 2012-07-13 07:05:42 PDT
I've plumbed through a context (the one where the texture IDs are created).
Adam Barth
Comment 9 2012-07-27 01:14:15 PDT
Comment on attachment 150838 [details] Patch Cleared review? from attachment 150838 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Note You need to log in before you can comment on or make changes to this bug.