Changeset 116362 in webkit
- Timestamp:
- May 7, 2012 4:00:17 PM (12 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r116359 r116362 1 2012-05-07 Dana Jansens <danakj@chromium.org> 2 3 [chromium] Ensure synchronization in threaded unit tests by checking the sourceFrameNumber() to count commits 4 https://bugs.webkit.org/show_bug.cgi?id=85390 5 6 Reviewed by Adrienne Walker. 7 8 * tests/CCLayerTreeHostTest.cpp: 9 (WTF::CCLayerTreeHostTestScrollMultipleRedraw::beginCommitOnCCThread): 10 (WTF::CCLayerTreeHostTestAtomicCommit::commitCompleteOnCCThread): 11 (WTF::CCLayerTreeHostTestAtomicCommitWithPartialUpdate::commitCompleteOnCCThread): 12 (WTF::CCLayerTreeHostTestScrollChildLayer::beginCommitOnCCThread): 13 1 14 2012-05-07 Adrienne Walker <enne@google.com> 2 15 -
trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
r116270 r116362 1341 1341 { 1342 1342 LayerChromium* root = m_layerTreeHost->rootLayer(); 1343 if (! m_layerTreeHost->frameNumber())1343 if (!impl->sourceFrameNumber()) 1344 1344 EXPECT_EQ(root->scrollPosition(), m_initialScroll); 1345 else if ( m_layerTreeHost->frameNumber() == 1)1345 else if (impl->sourceFrameNumber() == 1) 1346 1346 EXPECT_EQ(root->scrollPosition(), m_initialScroll + m_scrollAmount + m_scrollAmount); 1347 else if ( m_layerTreeHost->frameNumber() == 2)1347 else if (impl->sourceFrameNumber() == 2) 1348 1348 EXPECT_EQ(root->scrollPosition(), m_initialScroll + m_scrollAmount + m_scrollAmount); 1349 1349 } … … 1712 1712 CompositorFakeWebGraphicsContext3DWithTextureTracking* context = static_cast<CompositorFakeWebGraphicsContext3DWithTextureTracking*>(GraphicsContext3DPrivate::extractWebGraphicsContext3D(impl->context())); 1713 1713 1714 switch (impl-> frameNumber()) {1714 switch (impl->sourceFrameNumber()) { 1715 1715 case 0: 1716 1716 // Number of textures should be one. 1717 EXPECT_EQ(1, context->numTextures());1717 ASSERT_EQ(1, context->numTextures()); 1718 1718 // Number of textures used for commit should be one. 1719 1719 EXPECT_EQ(1, context->numUsedTextures()); … … 1726 1726 // Number of textures should be two as the first texture 1727 1727 // is used by impl thread and cannot by used for update. 1728 EXPECT_EQ(2, context->numTextures());1728 ASSERT_EQ(2, context->numTextures()); 1729 1729 // Number of textures used for commit should still be one. 1730 1730 EXPECT_EQ(1, context->numUsedTextures()); … … 1749 1749 EXPECT_EQ(1, context->numUsedTextures()); 1750 1750 1751 if (impl-> frameNumber() < 2) {1751 if (impl->sourceFrameNumber() < 1) { 1752 1752 context->resetUsedTextures(); 1753 1753 postSetNeedsAnimateAndCommitToMainThread(); … … 1816 1816 CompositorFakeWebGraphicsContext3DWithTextureTracking* context = static_cast<CompositorFakeWebGraphicsContext3DWithTextureTracking*>(GraphicsContext3DPrivate::extractWebGraphicsContext3D(impl->context())); 1817 1817 1818 switch (impl-> frameNumber()) {1818 switch (impl->sourceFrameNumber()) { 1819 1819 case 0: 1820 1820 // Number of textures should be two. 1821 EXPECT_EQ(2, context->numTextures());1821 ASSERT_EQ(2, context->numTextures()); 1822 1822 // Number of textures used for commit should be two. 1823 1823 EXPECT_EQ(2, context->numUsedTextures()); … … 1831 1831 // Number of textures should be four as the first two 1832 1832 // textures are used by the impl thread. 1833 EXPECT_EQ(4, context->numTextures());1833 ASSERT_EQ(4, context->numTextures()); 1834 1834 // Number of textures used for commit should still be two. 1835 1835 EXPECT_EQ(2, context->numUsedTextures()); … … 1847 1847 // partial update and the first two textures are used by 1848 1848 // the impl thread. 1849 EXPECT_EQ(3, context->numTextures());1849 ASSERT_EQ(3, context->numTextures()); 1850 1850 // Number of textures used for commit should still be two. 1851 1851 EXPECT_EQ(2, context->numUsedTextures()); … … 1887 1887 // Number of textures used for drawing should two except for frame 4 1888 1888 // where the viewport only contains one layer. 1889 if (impl-> frameNumber() == 4)1889 if (impl->sourceFrameNumber() == 3) 1890 1890 EXPECT_EQ(1, context->numUsedTextures()); 1891 1891 else 1892 1892 EXPECT_EQ(2, context->numUsedTextures()); 1893 1893 1894 if (impl-> frameNumber() < 5) {1894 if (impl->sourceFrameNumber() < 4) { 1895 1895 context->resetUsedTextures(); 1896 1896 postSetNeedsAnimateAndCommitToMainThread();
Note: See TracChangeset
for help on using the changeset viewer.