RESOLVED FIXED69585
[chromium] Implement checkerboarding for missing layer tiles
https://bugs.webkit.org/show_bug.cgi?id=69585
Summary [chromium] Implement checkerboarding for missing layer tiles
Vangelis Kokkevis
Reported 2011-10-06 17:17:52 PDT
When drawing on the thread, missing layer tiles are currently skipped, exposing the background. We should instead draw something nicer in their place.
Attachments
Patch (13.12 KB, patch)
2011-10-06 18:04 PDT, Vangelis Kokkevis
no flags
Patch (11.45 KB, patch)
2011-11-03 17:23 PDT, Adrienne Walker
no flags
Addressed review comments, rebased (13.43 KB, patch)
2011-11-03 18:19 PDT, Adrienne Walker
jamesr: review+
Vangelis Kokkevis
Comment 1 2011-10-06 18:04:14 PDT
Vangelis Kokkevis
Comment 2 2011-10-06 18:05:17 PDT
Not quite ready for review yet. Need to verify how it works with the compositor thread.
Adrienne Walker
Comment 3 2011-10-10 13:06:34 PDT
Comment on attachment 110070 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=110070&action=review Is there some way to test this automatically? Even something like LayoutTestController.checkerboardMainLayer() would let us smoke test this. I think you're also missing a cleanup()/clear() call for this new program in LayerRendererChromium::cleanupSharedObjects(). > Source/WebCore/platform/graphics/chromium/ProgramBinding.cpp:85 > + LOG_ERROR("Shader compile error: %s\n", infoLog); This is great. > Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:43 > +// Determines the size of the checkerboard pattern. For the pattern > +// to be seamless across tiles, the frequency needs to be of the form > +// x / (tileSize - 1) where x is the number of checkers that will be visible > +// within a tile of size tileSize. > +static float checkerboardFrequency = 20.0 / 255.0; > + I don't like the hardcoded tile size here. Maybe the constant setting code can do the division. > Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:274 > + if (tile->textureId()) > + context->bindTexture(GraphicsContext3D::TEXTURE_2D, tile->textureId()); > + Maybe move this loose code down within the if (!tile->textureId()) block below?
Adrienne Walker
Comment 4 2011-11-03 17:23:51 PDT
James Robinson
Comment 5 2011-11-03 17:28:24 PDT
Comment on attachment 113589 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=113589&action=review > Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp:296 > + if (m_backgroundColor != backgroundColor) { > + m_backgroundColor = backgroundColor; > + m_layerPropertyChanged = true; please add a section to the CCLayerImplTest verifyLayerChangesAreTrackedProperly unit test for this property > Source/WebKit/chromium/src/WebViewImpl.cpp:2525 > + // FIXME: This will not properly reflect style changes. > + m_nonCompositedContentHost->setBackgroundColor(page()->mainFrame()->view()->documentBackgroundColor()); what about doing this in WebViewImplContentPainter::paint()? that should catch style changes
James Robinson
Comment 6 2011-11-03 17:28:50 PDT
Doesn't seem to apply to ToT
Adrienne Walker
Comment 7 2011-11-03 17:32:15 PDT
(In reply to comment #6) > Doesn't seem to apply to ToT Ah, I see it. I applied it on top of my visibility patch (because that fixes some other correctness issues) and it conflicts with that. I can rebase it if it makes sense to land this first.
Adrienne Walker
Comment 8 2011-11-03 18:19:36 PDT
Created attachment 113601 [details] Addressed review comments, rebased
James Robinson
Comment 9 2011-11-03 18:26:02 PDT
Comment on attachment 113601 [details] Addressed review comments, rebased View in context: https://bugs.webkit.org/attachment.cgi?id=113601&action=review R=me > Source/WebKit/chromium/src/WebViewImpl.cpp:2594 > + // FIXME: This will not properly reflect style changes. nit: i don't think you need this FIXME any more, style changes of the document's background color will definitely cause a repaint which will go through here
Adrienne Walker
Comment 10 2011-11-04 10:45:40 PDT
Note You need to log in before you can comment on or make changes to this bug.