RESOLVED FIXED 73266
[Chromium] Avoid ASSERT_NOT_REACHED() from creating FBO with content texture of size 0
https://bugs.webkit.org/show_bug.cgi?id=73266
Summary [Chromium] Avoid ASSERT_NOT_REACHED() from creating FBO with content texture ...
Daniel Sievers
Reported 2011-11-28 16:34:43 PST
[Chromium] Avoid ASSERT_NOT_REACHED() from creating FBO with content texture of size 0
Attachments
Patch (6.43 KB, patch)
2011-11-28 16:37 PST, Daniel Sievers
no flags
Patch (6.93 KB, patch)
2011-11-28 17:56 PST, Daniel Sievers
no flags
Patch (6.91 KB, patch)
2011-11-29 10:27 PST, Daniel Sievers
no flags
Daniel Sievers
Comment 1 2011-11-28 16:37:58 PST
Daniel Sievers
Comment 2 2011-11-28 16:39:29 PST
Hrm on second though, we might want to have that check also before this early return, right? // If neither this layer nor any of its children were added, early out. if (sortingStartIndex == descendants.size()) return; Do we need to duplicate the logic instead where we call renderSurface->clearLayerList()? (In reply to comment #1) > Created an attachment (id=116849) [details] > Patch
Adrienne Walker
Comment 3 2011-11-28 16:50:18 PST
Comment on attachment 116849 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=116849&action=review > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:383 > // If neither this layer nor any of its children were added, early out. > if (sortingStartIndex == descendants.size()) > return; This little patch of code should move too, because descendants.size() could be zero, causing a problem for descendants.at(0) in the sort at the end.
Vangelis Kokkevis
Comment 4 2011-11-28 16:59:24 PST
Comment on attachment 116849 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=116849&action=review Don't you also need to clear the layer's RS at the drawOpacity == 0 early-out? > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:382 > if (sortingStartIndex == descendants.size()) You'll also want to clear the RS here. Maybe it would be best to split the cleanup into a separate function that calls: if (layer->renderSurface() && layer != rootLayer) renderSurfaceList.remove(layer->renderSurface()); layer->clearRenderSurface(); > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:446 > + renderSurfaceLayerList.removeLast(); You can nest this inside the previous if (layer->renderSurface() && layer != rootLayer) {} clause .
Daniel Sievers
Comment 5 2011-11-28 17:56:05 PST
Daniel Sievers
Comment 6 2011-11-28 17:56:24 PST
(In reply to comment #3) > (From update of attachment 116849 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=116849&action=review > > > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:383 > > // If neither this layer nor any of its children were added, early out. > > if (sortingStartIndex == descendants.size()) > > return; > > This little patch of code should move too, because descendants.size() could be zero, causing a problem for descendants.at(0) in the sort at the end. Done.
Daniel Sievers
Comment 7 2011-11-28 17:57:26 PST
(In reply to comment #4) > (From update of attachment 116849 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=116849&action=review > > Don't you also need to clear the layer's RS at the drawOpacity == 0 early-out? > > > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:382 > > if (sortingStartIndex == descendants.size()) > > You'll also want to clear the RS here. Maybe it would be best to split the cleanup into a separate function that calls: > I'll deal with resetting the render surfaces for the early returns separately in https://bugs.webkit.org/show_bug.cgi?id=73270. I uploaded a different test there that exemplifies the problem. > if (layer->renderSurface() && layer != rootLayer) > renderSurfaceList.remove(layer->renderSurface()); > layer->clearRenderSurface(); > > > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:446 > > + renderSurfaceLayerList.removeLast(); > > You can nest this inside the previous > if (layer->renderSurface() && layer != rootLayer) {} clause . Done.
James Robinson
Comment 8 2011-11-28 17:57:55 PST
Comment on attachment 116863 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=116863&action=review Vangelis or Enne, could you give this another look? > Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp:480 > + renderSurface1->setOpacity(0.9f); drop the trailing 'f' - see http://www.webkit.org/coding/coding-style.html "Floating point literals" > Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp:483 > + setLayerPropertiesForTesting(renderSurface1.get(), identityMatrix, identityMatrix, FloatPoint(0.0f, 0.0f), FloatPoint(0.0f, 0.0f), IntSize(10, 10), false); the 0.0f isn't needed here. FloatPoint() or FloatPoint::zero() would be even better
Adrienne Walker
Comment 9 2011-11-28 18:02:51 PST
Comment on attachment 116863 [details] Patch Looks good to me.
Vangelis Kokkevis
Comment 10 2011-11-28 18:34:45 PST
Comment on attachment 116863 [details] Patch Looks good
James Robinson
Comment 11 2011-11-28 18:47:18 PST
Comment on attachment 116863 [details] Patch R=me in that case
Daniel Sievers
Comment 12 2011-11-29 10:27:36 PST
Daniel Sievers
Comment 13 2011-11-29 16:36:08 PST
James, could you cq+ for me in case your comments are addressed? thanks! (In reply to comment #12) > Created an attachment (id=116996) [details] > Patch
WebKit Review Bot
Comment 14 2011-11-30 03:00:21 PST
Comment on attachment 116996 [details] Patch Clearing flags on attachment: 116996 Committed r101472: <http://trac.webkit.org/changeset/101472>
WebKit Review Bot
Comment 15 2011-11-30 03:00:26 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.