Changeset 121864 in webkit


Ignore:
Timestamp:
Jul 4, 2012 10:27:20 AM (12 years ago)
Author:
danakj@chromium.org
Message:

[chromium] Clear RenderSurfaces still when no idle paint will be done
https://bugs.webkit.org/show_bug.cgi?id=90553

Reviewed by Adrienne Walker.

Source/WebCore:

Currently if idle painting is disabled, updateLayers() will early-out.
But this prevents it from doing cleanup and clearing all RenderSurface
pointers, leaving the layer tree in an unexpected state.

Tests: CCLayerTreeHostTestCompositeAndReadbackCleanup

  • platform/graphics/chromium/cc/CCLayerTreeHost.cpp:

(WebCore::CCLayerTreeHost::updateLayers):

Source/WebKit/chromium:

  • tests/CCLayerTreeHostTest.cpp:

(CCLayerTreeHostTestCompositeAndReadbackCleanup):
(WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::CCLayerTreeHostTestCompositeAndReadbackCleanup):
(WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::beginTest):
(WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::afterTest):
(WTF):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r121861 r121864  
     12012-07-04  Dana Jansens  <danakj@chromium.org>
     2
     3        [chromium] Clear RenderSurfaces still when no idle paint will be done
     4        https://bugs.webkit.org/show_bug.cgi?id=90553
     5
     6        Reviewed by Adrienne Walker.
     7
     8        Currently if idle painting is disabled, updateLayers() will early-out.
     9        But this prevents it from doing cleanup and clearing all RenderSurface
     10        pointers, leaving the layer tree in an unexpected state.
     11
     12        Tests: CCLayerTreeHostTestCompositeAndReadbackCleanup
     13
     14        * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
     15        (WebCore::CCLayerTreeHost::updateLayers):
     16
    1172012-07-04  John Mellor  <johnme@chromium.org>
    218
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp

    r121601 r121864  
    494494
    495495    paintLayerContents(updateList, PaintVisible, updater);
    496     if (!m_triggerIdlePaints)
    497         return;
    498 
    499     // The second (idle) paint will be a no-op in layers where painting already occured above.
    500     // FIXME: This pass can be merged with the visible pass now that textures
    501     //        are prioritized above.
    502     paintLayerContents(updateList, PaintIdle, updater);
     496
     497    if (m_triggerIdlePaints) {
     498        // The second (idle) paint will be a no-op in layers where painting already occured above.
     499        // FIXME: This pass can be merged with the visible pass now that textures
     500        //        are prioritized above.
     501        paintLayerContents(updateList, PaintIdle, updater);
     502    }
    503503
    504504    for (size_t i = 0; i < updateList.size(); ++i)
  • trunk/Source/WebKit/chromium/ChangeLog

    r121863 r121864  
     12012-07-04  Dana Jansens  <danakj@chromium.org>
     2
     3        [chromium] Clear RenderSurfaces still when no idle paint will be done
     4        https://bugs.webkit.org/show_bug.cgi?id=90553
     5
     6        Reviewed by Adrienne Walker.
     7
     8        * tests/CCLayerTreeHostTest.cpp:
     9        (CCLayerTreeHostTestCompositeAndReadbackCleanup):
     10        (WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::CCLayerTreeHostTestCompositeAndReadbackCleanup):
     11        (WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::beginTest):
     12        (WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::afterTest):
     13        (WTF):
     14
    1152012-07-04  Dana Jansens  <danakj@chromium.org>
    216
  • trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp

    r121863 r121864  
    22522252}
    22532253
     2254class CCLayerTreeHostTestCompositeAndReadbackCleanup : public CCLayerTreeHostTest {
     2255public:
     2256    CCLayerTreeHostTestCompositeAndReadbackCleanup() { }
     2257
     2258    virtual void beginTest()
     2259    {
     2260        LayerChromium* rootLayer = m_layerTreeHost->rootLayer();
     2261
     2262        OwnArrayPtr<char> pixels(adoptArrayPtr(new char[4]));
     2263        m_layerTreeHost->compositeAndReadback(static_cast<void*>(pixels.get()), IntRect(0, 0, 1, 1));
     2264        EXPECT_FALSE(rootLayer->renderSurface());
     2265
     2266        endTest();
     2267    }
     2268
     2269    virtual void afterTest()
     2270    {
     2271    }
     2272};
     2273
     2274SINGLE_AND_MULTI_THREAD_TEST_F(CCLayerTreeHostTestCompositeAndReadbackCleanup)
     2275
    22542276} // namespace
Note: See TracChangeset for help on using the changeset viewer.